PrisonUtils API (Appears to be Outdated)

Discussion in 'Spigot Plugin Development' started by PCPSells, Jun 19, 2017.

  1. Link -

    Code -
    Code (Text):
    package util;
    import java.util.List;
    import org.bukkit.Material;
    import org.bukkit.block.Block;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import me.mrCookieSlime.PrisonUtils.MiningHandler;
    import net.minecraft.server.v1_11_R1.ItemStack;
    public class MineItemsFix implements Listener {
        MiningHandler handler = new MiningHandler() {
            public List<ItemStack> onMine(Player p, Block b, List<ItemStack> drops, ItemStack tool) {
                if (tool.equals(Material.DIAMOND_PICKAXE)) {
                    if (b.getType().equals(Material.SPONGE)) {
                            p.sendMessage("You shouldn't receive the Sponge in your inventory.");
                    return drops;
    Error -

    No clue how to fix this... any ideas?
  2. Save the file. Sometimes that is what happens. I need to save
  3. Delete this import:
    Code (Text):
    import net.minecraft.server.v1_11_R1.ItemStack;
    Re-import ItemStack with the non-NMS class.
    • Agree Agree x 2
  4. Thank you.
  5. Also, use ==, please.
    • Informative Informative x 1

Share This Page