From d7f077340f1b38f289b343d836d0c0d1688ed253 Mon Sep 17 00:00:00 2001 From: Grzybol Date: Fri, 5 Apr 2024 00:34:06 +0200 Subject: [PATCH] - fixes --- pom.xml | 2 +- src/main/java/betterbox/mine/game/betterelo/Event.java | 4 ++-- .../betterbox/mine/game/betterelo/ExtendedConfigManager.java | 2 +- src/main/java/betterbox/mine/game/betterelo/PluginLogger.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 76f0e58..eeebeff 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ betterbox.mine.game BetterElo - 4.0.2-SNAPSHOT + 4.0.3-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 cccd6dc..6ebe8dc 100644 --- a/src/main/java/betterbox/mine/game/betterelo/Event.java +++ b/src/main/java/betterbox/mine/game/betterelo/Event.java @@ -768,10 +768,10 @@ public void ignitePlayersInArea(Player player, int diameter, int range) { // Sprawdź, czy gracz znajduje się w obszarze podpalenia double distanceToTarget = target.getLocation().distance(clickLocation); - if (distanceToTarget <= diameter / 2) { + if (distanceToTarget <= diameter && target!=player) { // Podpal gracza target.setFireTicks(20 * 5); // Podpal na 5 sekund - target.sendMessage(ChatColor.RED + "Zostałeś podpalony przez gracza " + player.getName() + "!"); + //target.sendMessage(ChatColor.RED + "Zostałeś podpalony przez gracza " + player.getName() + "!"); pluginLogger.log(PluginLogger.LogLevel.FLAMETHROWER, "Player " + target.getName() + " ignited within diameter. Distance from click location: " + distanceToTarget); } else { // Dodajemy logowanie dla sytuacji, gdy gracz jest poza zasięgiem podpalenia diff --git a/src/main/java/betterbox/mine/game/betterelo/ExtendedConfigManager.java b/src/main/java/betterbox/mine/game/betterelo/ExtendedConfigManager.java index eae1bb4..c7ba4c3 100644 --- a/src/main/java/betterbox/mine/game/betterelo/ExtendedConfigManager.java +++ b/src/main/java/betterbox/mine/game/betterelo/ExtendedConfigManager.java @@ -84,7 +84,7 @@ public void ReloadConfig() { } catch (IllegalArgumentException e) { // Jeśli podano nieprawidłowy poziom logowania, zaloguj błąd - plugin.getServer().getLogger().warning("Invalid log level in config: " + level); + pluginLogger.log(PluginLogger.LogLevel.ERROR,"Invalid log level in config: " + level+", exception: "+e.getMessage()); } } pluginLogger.setEnabledLogLevels(enabledLogLevels); diff --git a/src/main/java/betterbox/mine/game/betterelo/PluginLogger.java b/src/main/java/betterbox/mine/game/betterelo/PluginLogger.java index ad061bd..20f30e0 100644 --- a/src/main/java/betterbox/mine/game/betterelo/PluginLogger.java +++ b/src/main/java/betterbox/mine/game/betterelo/PluginLogger.java @@ -20,7 +20,7 @@ public class PluginLogger { // Enumeracja dla poziomów logowania public enum LogLevel { - INFO, WARNING, ERROR, DEBUG, DEBUG_LVL2, DEBUG_LVL3,DEBUG_LVL4,CHEATERS,FLAMETHROWER + INFO, WARNING, ERROR, DEBUG, DEBUG_LVL2, DEBUG_LVL3,DEBUG_LVL4,CHEATERS ,FLAMETHROWER } public PluginLogger(String folderPath, Set enabledLogLevels, JavaPlugin plugin) {