Solved paper equivalent to spigot BuildTools

senneb

New member
Jun 22, 2022
14
0
1
Until now I have always used spigot, but paper has a beter performance. I need to know how to install and use the paper equivalent to BuildTools, I would prefer mojang mappings if this is an option.
 

senneb

New member
Jun 22, 2022
14
0
1
thx your help was exactly what i needed but now i have another problem
Code:
java.lang.NoClassDefFoundError: net/minecraft/nbt/CompoundTag
        at com.Super_man2006.Shop.ItemManager.Mat.get(Mat.java:26) ~[Skyblock.jar:?]
        at com.Super_man2006.Shop.Tools.StoreItemData.GenerateSellPrice.generateSellPrice(GenerateSellPrice.java:18) ~[Skyblock.jar:?]
        at com.Super_man2006.Shop.Tools.StoreItemData.GenerateJson.generateJson(GenerateJson.java:14) ~[Skyblock.jar:?]
        at com.Super_man2006.Shop.Skyblock.onEnable(Skyblock.java:28) ~[Skyblock.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:501) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:559) ~[paper-1.18.2.jar:git-Paper-277]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:473) ~[paper-1.18.2.jar:git-Paper-277]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.reload(CraftServer.java:1015) ~[paper-1.18.2.jar:git-Paper-277]
        at org.bukkit.Bukkit.reload(Bukkit.java:897) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:905) ~[paper-1.18.2.jar:git-Paper-277]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchServerCommand(CraftServer.java:868) ~[paper-1.18.2.jar:git-Paper-277]
        at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs(DedicatedServer.java:510) ~[paper-1.18.2.jar:git-Paper-277]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:484) ~[paper-1.18.2.jar:git-Paper-277]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1455) ~[paper-1.18.2.jar:git-Paper-277]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225) ~[paper-1.18.2.jar:git-Paper-277]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-277]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.minecraft.nbt.CompoundTag
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:151) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        ... 21 more

com.Super_man2006.Shop.ItemManager.Mat.get(Mat.java:26) this is this line: CompoundTag nbt = new CompoundTag();
Java:
public static ItemStack get(Material mat) {
        ItemStack item = new ItemStack(mat);
        net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
        CompoundTag nbt = new CompoundTag();
        nbt.putBoolean("Vanilla", true);
        nmsItem.setTag(nbt);
        item = CraftItemStack.asCraftMirror(nmsItem);
        return item;

    }
 

electronicboy

Administrator
Staff member
Dec 11, 2021
80
6
17
8
Trying to run a mojang mapped plugin on a spigot mapped server, you need to make sure that you remap the jar using the reobfJar task if using userdev, and grab the correct jar
 

electronicboy

Administrator
Staff member
Dec 11, 2021
80
6
17
8
assuming that you're using the gradle userdev stuff, make sure that you run the reobfJar task, and use the correct jar (the none -dev one)