Solved Dropping Things

Discussion in 'Plugin Development' started by PhilDEV_Acc, Jan 6, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    PhilDEV_Acc

    Hello,
    I coded the PlayerItemDropEvent so that Players cant drop things maybe I coded wrong. I did register the Event timtower;) Code here:

    Code:
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerDropItemEvent;
    
    public class ItemDropEvent implements Listener{
        public void onEvent(PlayerDropItemEvent event) {
          
            event.setCancelled(true);
        }
    
    }
    Thanks for helping.
     
  2. Offline

    timtower Moderator Moderator

    @PhilDEV_Acc You are missing the @EventHandler though this time :p
     
  3. Offline

    PhilDEV_Acc

    Sorry this time I am an Idiot
     
    timtower likes this.
Thread Status:
Not open for further replies.

Share This Page