Help with Player EventHandler.

Discussion in 'Plugin Development' started by CLGREEN, Jul 14, 2014.

Thread Status:
Not open for further replies.
  1. Hey guys,

    I am quite new to Bukkit Development, but I have set myself the challenge of making a plugin that is like WorldGuard's blacklist, where it shows staff that a player is breaking blocks.

    My issue is I am a little stuck on how I would get it so, when a player breaks a block it would not spam chat with "player has broken Glass" for example. I want to set it so the player breaks it once it tells an admin but then will not show the message again until he breaks glass say for the 5th time and then say he breaks 5 more it will show the message again etc...

    Thanks - CLGREEN
  2. Offline


    I recommend you have a HashMap<Player, HashMap<Material, Integer> that stores every time a player is called in the BlockBreakEvent. Then if the value reaches five, reset it and message all w/ a certain permission. Hopefully this makes sense, if not, let me know!
Thread Status:
Not open for further replies.

Share This Page