I have a Minecraft server here, but I need to know how to cancel a certain item that you just can't move? One can't move and everyone else can move.
I just need it. I've already inserted the top one, the bottom one doesn't work. I hope I get good help here.
@EventHandler
public void onDrop (PlayerDropItemEvent e) {
try {
String name = e.getItemDrop (). GetItemStack (). GetItemMeta (). GetDisplayName ();
if (name.equals ("§cCBBlue-Menu")) {
e.setCancelled (true);
return;
}
}
catch (NullPointerException e1) {
}
}
@EventHandler
public void on (InventoryClickEvent e) {
e.setCancelled (true);
"how to move the lower one only a certain one" please what?
I'm sorry for my formula, but I mean that you only cancel a certain item that you just can't move?
Please remove the e1 from there:
catch (NullPointerException) {
No, why should there be an error? He doesn't show it in the console
Ok but i think that's the mistake
Uh no it's not