Skip to content

Commit

Permalink
Merge pull request #32 from Grzybol/fixes_v4
Browse files Browse the repository at this point in the history
- fixes
  • Loading branch information
Grzybol authored Apr 4, 2024
2 parents 453e7b3 + d7f0773 commit 8f1b7dc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>betterbox.mine.game</groupId>
<artifactId>BetterElo</artifactId>
<version>4.0.2-SNAPSHOT</version>
<version>4.0.3-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BetterElo</name>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/betterbox/mine/game/betterelo/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<LogLevel> enabledLogLevels, JavaPlugin plugin) {
Expand Down

0 comments on commit 8f1b7dc

Please sign in to comment.