Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onBlockBreak(BlockBreakEvent event) { // to erase bounty if can't afford
- Player p = event.getPlayer();
- Block block = event.getBlock();
- Sign sign = (Sign) event.getBlock();
- if(block.getType() == Material.SIGN || block.getType() == Material.WALL_SIGN)
- {
- if(sign.getLine(0).equalsIgnoreCase("[Bounty]")) {
- Set<String> list = Bounty.bounty.getKeys(true); //This gets a List of all the Nodes which are Directly in the file, so every username
- for(Iterator<String> iter = list.iterator(); iter.hasNext(); ) //A loop for iterate through these names
- {
- String key = iter.next(); //This gets the next object on the list
- if(key.equals(sign.getLine(2)))
- {
- //Not sure how to start over here to delete it
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment