org.bukkit.Material "does not exist"

Started by EnsurdFrndship on Mon, 06/01/2020 - 22:58

Topic category: Troubleshooting, bugs, and solutions

Last seen on 20:43, 10. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
org.bukkit.Material "does not exist"
Tue, 06/02/2020 - 01:07 (edited)

Hello,

     I learned how to make a separate Java file, and a class called "Book" inside book.java. A couple lines of code in book.java return errors because a few imports weren't found. My file uses the imports...

import org.bukkit.importName

   ... and all the lines that contain 'import org.bukkit' seem to give errors. If those imports are stored in a different directory, how can I find them and import them?

 

Edited by EnsurdFrndship on Tue, 06/02/2020 - 01:07
Last seen on 20:43, 10. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Here are my errors. How do I…
Tue, 06/02/2020 - 16:23

Here are my errors. How do I add bukkit to my MCreator project?

Executing Gradle task: runClient
Build info: MCreator 2020.3.22116, forge-1.15.2, 64-bit, 16230 MB, Windows 10, JVM 1.8.0_252, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk
> Configure project :
New Dep: net.minecraftforge:forge:1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1
> Task :compileJava FAILED
C:\Users\12409\MCreatorWorkspaces\scripturecraft\src\main\java\net\mcreator\scripturecraft\Book.java:3: error: package org.bukkit does not exist import org.bukkit.Material;
^
C:\Users\12409\MCreatorWorkspaces\scripturecraft\src\main\java\net\mcreator\scripturecraft\Book.java:4: error: package org.bukkit.inventory does not exist import org.bukkit.inventory.ItemStack;
^
C:\Users\12409\MCreatorWorkspaces\scripturecraft\src\main\java\net\mcreator\scripturecraft\Book.java:5: error: package org.bukkit.inventory.meta does not exist import org.bukkit.inventory.meta.BookMeta;
^
C:\Users\12409\MCreatorWorkspaces\scripturecraft\src\main\java\net\mcreator\scripturecraft\Book.java:15: error: cannot find symbol ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
^
symbol: class ItemStack
location: class Book
C:\Users\12409\MCreatorWorkspaces\scripturecraft\src\main\java\net\mcreator\scripturecraft\Book.java:16: error: cannot find symbol BookMeta bookMeta = (BookMeta) book.getItemMeta();
^
symbol: class BookMeta
location: class Book
5 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#se…
BUILD FAILED in 1s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 1639 milliseconds
 

What is Bukkit code doing in…
Wed, 06/03/2020 - 10:10

What is Bukkit code doing in Fore project code?

Learn Forge concepts or don't mess with code randomly.

Last seen on 20:43, 10. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
   I don't know? I was…
Wed, 06/03/2020 - 17:57

   I don't know? I was copying a Java 'example' on how to make a custom written book in Minecraft (with custom writing in it), (overriding using the GUI interface), and the lines that use, "import org.bukkit.*" in my Java code give me errors.   

Last seen on 20:43, 10. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I found a version of an …
Wed, 06/03/2020 - 20:18

I found a version of an 'example' of code that deals with 'written books' that uses Forge and not Bukkit, but now, when I try to import "net.minecraft.nbt.NBTTagList",  NBTTagList is not a known interface of net.minecraft.nbt. I can import "net.minecraft.nbt.NBTTagList.*" but can not use the class, NBTTagList because it is not found.

Last seen on 20:43, 10. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Does anyone know how I could…
Thu, 06/04/2020 - 00:09

Does anyone know how I could have access to the net.minecraft.nbt.NBTTagList interface?

Last seen on 20:43, 10. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
… or most importantly, the…
Thu, 06/04/2020 - 01:26

… or most importantly, the net.minecraft.nbt.NBTTagString interface?