1.8.8 An internal error occured while attempting to perform this command

Discussion in 'Spigot Plugin Development' started by LetsPlay1, Feb 2, 2020.

  1. Hey,

    I have programmed a shop plugin and every time I issue the / shop command I get an error:

    [21:23:02 ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin CBSystem v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_242]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_242]
    at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
    Caused by: java.lang.NoSuchFieldError: BLOCK_CHEST_OPEN
    at com.schlumpfdm.youtube.main.Shop.openShop(Shop.java:74) ~[?:?]
    at de.tuffi.yt.ShopCommand.onCommand(ShopCommand.java:31) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
    ... 15 more

    The Code is:

    package de.tuffi.yt;

    import com.schlumpfdm.youtube.main.Shop;
    import com.schlumpfdm.youtube.main.ShopItem;
    import org.bukkit.Material;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;

    public class ShopCommand implements CommandExecutor {
    private Main plugin;

    public ShopCommand(Main plugin) {

    this.plugin = plugin;

    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

    Player p = (Player)sender;

    if (args.length == 0) {

    Shop shop = new Shop("§a§lShop", 5, plugin);

    shop.addItem(new ShopItem(Material.BEACON, "Beacon", 25000, 10000, 1));

    shop.openShop(p);

    } else {

    p.sendMessage(Main.pre + " §cBitte verwende /shop!");

    }

    return false;
    }
    }
     
  2. md_5

    Administrator Developer

    You are compiling against a version other than 1.8
     
  3. Okay Thank you