PrisonUtils API (Appears to be Outdated)

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

  1. Link - https://dev.bukkit.org/projects/prisonutils/pages/api

    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() {
            @SuppressWarnings("unused")
            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)) {
                            drops.clear();
                            p.sendMessage("You shouldn't receive the Sponge in your inventory.");
                            b.setType(Material.SPONGE);
                    }}
                    return drops;
                    }};}
    Error -
    [​IMG]

    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