mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-15 23:26:16 +01:00
Add new debug-chunk-loads setting
This commit is contained in:
parent
aa136420c8
commit
b9e6418d52
@ -156,6 +156,9 @@ public class EventListen implements Listener {
|
||||
respawnAllFromCoord(coord, event);
|
||||
}
|
||||
};
|
||||
if (Messaging.isDebugging() && Setting.DEBUG_CHUNK_LOADS.asBoolean()) {
|
||||
new Exception().printStackTrace();
|
||||
}
|
||||
if (event instanceof Cancellable) {
|
||||
runnable.run();
|
||||
} else {
|
||||
@ -196,7 +199,13 @@ public class EventListen implements Listener {
|
||||
Messaging.debug("Despawned id", npc.getId(), "due to chunk unload at", coord);
|
||||
}
|
||||
}
|
||||
if (Messaging.isDebugging() && Setting.DEBUG_CHUNK_LOADS.asBoolean()) {
|
||||
new Exception().printStackTrace();
|
||||
}
|
||||
if (loadChunk) {
|
||||
if (Messaging.isDebugging()) {
|
||||
Messaging.debug("Loading chunk in 10 ticks due to forced chunk load at", coord);
|
||||
}
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -72,6 +72,7 @@ public class Settings {
|
||||
CHAT_RANGE("npc.chat.options.range", 5),
|
||||
CHECK_MINECRAFT_VERSION("advanced.check-minecraft-version", true),
|
||||
CONTROLLABLE_GROUND_DIRECTION_MODIFIER("npc.controllable.ground-direction-modifier", 1.0D),
|
||||
DEBUG_CHUNK_LOADS("general.debug-chunk-loads", false),
|
||||
DEBUG_FILE("general.debug-file", ""),
|
||||
DEBUG_MODE("general.debug-mode", false),
|
||||
DEBUG_PATHFINDING("general.debug-pathfinding", false),
|
||||
|
Loading…
Reference in New Issue
Block a user