Debug messages

This commit is contained in:
Cyanoure
2026-03-29 17:32:08 +02:00
parent 1d113a2fcd
commit cd9d316087
2 changed files with 10 additions and 3 deletions

View File

@@ -12,12 +12,10 @@ import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.player.PlayerTeleportEvent;
import org.spigotmc.event.player.PlayerSpawnLocationEvent; import org.spigotmc.event.player.PlayerSpawnLocationEvent;
import java.util.HashMap;
import java.util.List;
import java.util.UUID; import java.util.UUID;
public class Events implements Listener { public class Events implements Listener {
@EventHandler (priority = EventPriority.LOWEST) @EventHandler (priority = EventPriority.HIGH)
public void onSpawn(PlayerSpawnLocationEvent e) { public void onSpawn(PlayerSpawnLocationEvent e) {
Location loc = GoSpawn.instance.getSpawnLocation(); Location loc = GoSpawn.instance.getSpawnLocation();
if (loc == null) { if (loc == null) {
@@ -25,8 +23,15 @@ public class Events implements Listener {
} }
if (!e.getPlayer().hasPlayedBefore()) { if (!e.getPlayer().hasPlayedBefore()) {
if (GoSpawn.instance.getConfig().getBoolean("debug")) {
GoSpawn.instance.getLogger().info("Player '" + e.getPlayer().getName() + "' has not played here before.");
}
e.setSpawnLocation(loc); e.setSpawnLocation(loc);
return; return;
} else {
if (GoSpawn.instance.getConfig().getBoolean("debug")) {
GoSpawn.instance.getLogger().info("Player '" + e.getPlayer().getName() + "' has already played here before.");
}
} }
Location currentLoc = e.getSpawnLocation(); Location currentLoc = e.getSpawnLocation();

View File

@@ -1,3 +1,5 @@
debug: true
message-spawn-cooldown: "&cEzt a parancsot %seconds% másodperc múlva használatod újra!" message-spawn-cooldown: "&cEzt a parancsot %seconds% másodperc múlva használatod újra!"
message-spawn-delay: "&6Elteleportálunk %seconds% másodpercen belül, ne mozdulj..." message-spawn-delay: "&6Elteleportálunk %seconds% másodpercen belül, ne mozdulj..."
message-teleporting: "&aTeleportálás..." message-teleporting: "&aTeleportálás..."