I'm trying to make an event that tracks pressure plate presses. I'm running into the problem that the light weighted pressure plate turns out to trigger the event infinitely many times. How do I get rid of this? Code: @EventHandler public void on(PlayerInteractEvent event) { Player player = event.getPlayer(); for (Quest quest : qp.getQuester(player.getUniqueId()).getCurrentQuests().keySet()) { if (event.getAction() != Action.PHYSICAL) { return; } if (event.getClickedBlock() != null && event.getClickedBlock().getType() == Material.STONE_PRESSURE_PLATE || event.getClickedBlock().getType() == Material.LIGHT_WEIGHTED_PRESSURE_PLATE || event.getClickedBlock().getType() == Material.HEAVY_WEIGHTED_PRESSURE_PLATE) { incrementObjective(player.getUniqueId(), this, quest, 1); } } }
@timtower I dont need this. Just the opposite I need the quest to be credited even if the player jumped on the same plate, and when the player stands on the Light Weighted Pressure Plate, the points on the quest are credited indefinitely EDIT by Moderator: merged posts, please use the edit button instead of double posting.