Debug messages
This commit is contained in:
@@ -12,12 +12,10 @@ import org.bukkit.event.player.PlayerRespawnEvent;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.spigotmc.event.player.PlayerSpawnLocationEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class Events implements Listener {
|
||||
@EventHandler (priority = EventPriority.LOWEST)
|
||||
@EventHandler (priority = EventPriority.HIGH)
|
||||
public void onSpawn(PlayerSpawnLocationEvent e) {
|
||||
Location loc = GoSpawn.instance.getSpawnLocation();
|
||||
if (loc == null) {
|
||||
@@ -25,8 +23,15 @@ public class Events implements Listener {
|
||||
}
|
||||
|
||||
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);
|
||||
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();
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
debug: true
|
||||
|
||||
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-teleporting: "&aTeleportálás..."
|
||||
|
||||
Reference in New Issue
Block a user