diff --git a/pom.xml b/pom.xml index bd594a8..b274834 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ betterbox.mine.game BetterElo - 4.0.7-SNAPSHOT + 4.0.8-SNAPSHOT jar BetterElo diff --git a/src/main/java/betterbox/mine/game/betterelo/Event.java b/src/main/java/betterbox/mine/game/betterelo/Event.java index c64b86a..16f2870 100644 --- a/src/main/java/betterbox/mine/game/betterelo/Event.java +++ b/src/main/java/betterbox/mine/game/betterelo/Event.java @@ -489,7 +489,7 @@ public void onPlayerInteract(PlayerInteractEvent event) { } pluginLogger.log(PluginLogger.LogLevel.ZEPHYR, "Event.checking canUseZephyr"); - if(canUseZephyr(player) && event.getAction() != Action.RIGHT_CLICK_AIR) { + if(canUseZephyr(player) && event.getAction() == Action.RIGHT_CLICK_AIR) { pluginLogger.log(PluginLogger.LogLevel.ZEPHYR, "Event.canUseZephyr passed"); hasZephyrLore(player); @@ -666,11 +666,14 @@ public boolean hasZephyrLore(Player player) { return false; } private boolean canUseZephyr(Player player) { + pluginLogger.log(PluginLogger.LogLevel.ZEPHYR,"Event.canUseZephyr called"); if (!lastZephyrUsage.containsKey(player)) { + pluginLogger.log(PluginLogger.LogLevel.ZEPHYR,"Event.canUseZephyr PLAYER NOT LISTED"); return true; // Gracz jeszcze nie używał fajerwerka } long lastUsage = lastZephyrUsage.get(player); long currentTime = System.currentTimeMillis(); + pluginLogger.log(PluginLogger.LogLevel.ZEPHYR,"Event.canUseZephyr lastUsage: "+lastUsage+" currentTime: "+currentTime); return (currentTime - lastUsage) >= configManager.fireworkCooldown; } public boolean hasAntywebLore(ItemStack itemStack) {