noel puig
noel puig

Reputation: 73

Eclipse not importing bukkit

I'm new to eclipse, java, and practically everything related to this question..

Im trying to code a minecraft Bukkit plugin, real basic, but it doesn't seem to import the bukkit jar properly. Ive used the Bukkit Buildtools and I got both the spigot file and the bukkit from the Target folder. Here's a screenshot:

enter image description here

enter image description here

Upvotes: 1

Views: 1486

Answers (2)

ananoun
ananoun

Reputation: 109

  1. Did you use the tutorial to make a plugin? It doesn't seem like you did, because you need a Maven Install program to make a Spigot plugin. Read this: https://bukkit.gamepedia.com/Plugin_Tutorial
  2. Your plugin.yml shouldn't be in the same folder as the class folder. Read the tutorial I linked above. Also, you need a pom.xml file. Just read the tutorial...
  3. You don't need CraftBukkit.
  4. Did you import every single thing? Importing "Bukkit" doesn't import everything in Bukkit.

Upvotes: 2

Crashcrafter
Crashcrafter

Reputation: 56

Multiple Reasons why this may not work:

  1. You are using Java 15 JRE. You definitly need JDK 8 for Bukkit and Spigot. If you wanna use Paper, you can use JDK 11

  2. You have bukkit and spigot as dependencies (I would recommend to use paper, because its more up-to-date). Just use one of them, and you dont need craftbukkit until you want to edit packages

  3. If you extend Java Plugin, you have to use the onEnable, onLoad and onDisable-functions. Then you register your EventListener in onEnable and you should be fine. You probably can get the functions by hovering over JavaPlugin.

If you have any questions, feel free to contact me :)

Upvotes: 4

Related Questions