spigot/CraftBukkit-Patches/0008-Spigot-Timings.patch

823 lines
39 KiB
Diff
Raw Normal View History

2021-05-15 09:07:30 +10:00
From 6cf3e21c08fd3da4283f699fde5476004c94df41 Mon Sep 17 00:00:00 2001
2017-11-07 18:58:02 +11:00
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Spigot Timings
Overhauls the Timings System adding performance tracking all around the Minecraft Server
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
2021-04-28 08:10:22 +10:00
index a2087552d..eebb80dae 100644
2021-03-16 09:00:00 +11:00
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -174,6 +174,8 @@ import org.bukkit.craftbukkit.Main;
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable {
public static final Logger LOGGER = LogManager.getLogger();
2021-04-28 08:10:22 +10:00
@@ -1076,6 +1078,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2021-03-16 09:00:00 +11:00
protected void exit() {}
protected void a(BooleanSupplier booleansupplier) {
+ SpigotTimings.serverTickTimer.startTiming(); // Spigot
long i = SystemUtils.getMonotonicNanos();
++this.ticks;
2021-04-28 08:10:22 +10:00
@@ -1095,12 +1098,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2021-03-16 09:00:00 +11:00
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
+ SpigotTimings.worldSaveTimer.startTiming(); // Spigot
MinecraftServer.LOGGER.debug("Autosave started");
this.methodProfiler.enter("save");
this.playerList.savePlayers();
this.saveChunks(true, false, false);
this.methodProfiler.exit();
MinecraftServer.LOGGER.debug("Autosave finished");
+ SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
}
this.methodProfiler.enter("snooper");
2021-04-28 08:10:22 +10:00
@@ -1121,21 +1126,30 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2021-03-16 09:00:00 +11:00
this.circularTimer.a(i1 - i);
this.methodProfiler.exit();
+ SpigotTimings.serverTickTimer.stopTiming(); // Spigot
+ org.spigotmc.CustomTimingsHandler.tick(); // Spigot
}
protected void b(BooleanSupplier booleansupplier) {
+ SpigotTimings.schedulerTimer.startTiming(); // Spigot
this.server.getScheduler().mainThreadHeartbeat(this.ticks); // CraftBukkit
+ SpigotTimings.schedulerTimer.stopTiming(); // Spigot
this.methodProfiler.enter("commandFunctions");
+ SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
this.getFunctionData().tick();
+ SpigotTimings.commandFunctionsTimer.stopTiming(); // Spigot
this.methodProfiler.exitEnter("levels");
Iterator iterator = this.getWorlds().iterator();
// CraftBukkit start
// Run tasks that are waiting on processing
+ SpigotTimings.processQueueTimer.startTiming(); // Spigot
while (!processQueue.isEmpty()) {
processQueue.remove().run();
}
+ SpigotTimings.processQueueTimer.stopTiming(); // Spigot
+ SpigotTimings.timeUpdateTimer.startTiming(); // Spigot
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
2021-04-28 08:10:22 +10:00
@@ -1143,6 +1157,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2021-03-16 09:00:00 +11:00
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); // Add support for per player time
}
}
+ SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
2021-04-28 08:10:22 +10:00
@@ -1161,7 +1176,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2021-03-16 09:00:00 +11:00
this.methodProfiler.enter("tick");
try {
+ worldserver.timings.doTick.startTiming(); // Spigot
worldserver.doTick(booleansupplier);
+ worldserver.timings.doTick.stopTiming(); // Spigot
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Exception ticking world");
2021-04-28 08:10:22 +10:00
@@ -1174,18 +1191,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2021-03-16 09:00:00 +11:00
}
this.methodProfiler.exitEnter("connection");
+ SpigotTimings.connectionTimer.startTiming(); // Spigot
this.getServerConnection().c();
+ SpigotTimings.connectionTimer.stopTiming(); // Spigot
this.methodProfiler.exitEnter("players");
+ SpigotTimings.playerListTimer.startTiming(); // Spigot
this.playerList.tick();
+ SpigotTimings.playerListTimer.stopTiming(); // Spigot
if (SharedConstants.d) {
GameTestHarnessTicker.a.b();
}
this.methodProfiler.exitEnter("server gui refresh");
+ SpigotTimings.tickablesTimer.startTiming(); // Spigot
for (int i = 0; i < this.tickables.size(); ++i) {
((Runnable) this.tickables.get(i)).run();
}
+ SpigotTimings.tickablesTimer.stopTiming(); // Spigot
this.methodProfiler.exit();
}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 404115fcd..57b4e1623 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -65,6 +65,7 @@ import net.minecraft.world.level.DataPackConfiguration;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.io.IoBuilder;
import org.bukkit.command.CommandSender;
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.event.server.ServerCommandEvent;
import org.bukkit.event.server.RemoteServerCommandEvent;
// CraftBukkit end
@@ -404,6 +405,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void handleCommandQueue() {
+ SpigotTimings.serverCommandTimer.startTiming(); // Spigot
while (!this.serverCommandQueue.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
@@ -418,6 +420,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// CraftBukkit end
}
+ SpigotTimings.serverCommandTimer.stopTiming(); // Spigot
}
@Override
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
index 2f4b63960..d5de3e3e8 100644
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
@@ -148,9 +148,11 @@ public class ChunkProviderServer extends IChunkProvider {
2019-05-14 10:00:00 +10:00
}
2019-04-23 12:00:00 +10:00
2020-01-22 08:00:00 +11:00
gameprofilerfiller.c("getChunkCacheMiss");
2019-04-23 12:00:00 +10:00
+ world.timings.syncChunkLoadTimer.startTiming(); // Spigot
2019-05-14 10:00:00 +10:00
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag);
this.serverThreadQueue.awaitTasks(completablefuture::isDone);
2019-04-23 12:00:00 +10:00
+ world.timings.syncChunkLoadTimer.stopTiming(); // Spigot
2019-05-14 10:00:00 +10:00
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
return ichunkaccess1;
}, (playerchunk_failure) -> {
2021-03-16 09:00:00 +11:00
@@ -369,12 +371,16 @@ public class ChunkProviderServer extends IChunkProvider {
2019-04-23 12:00:00 +10:00
public void tick(BooleanSupplier booleansupplier) {
this.world.getMethodProfiler().enter("purge");
+ this.world.timings.doChunkMap.startTiming(); // Spigot
this.chunkMapDistance.purgeTickets();
this.tickDistanceManager();
+ this.world.timings.doChunkMap.stopTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("chunks");
this.tickChunks();
+ this.world.timings.doChunkUnload.startTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("unload");
this.playerChunkMap.unloadChunks(booleansupplier);
+ this.world.timings.doChunkUnload.stopTiming(); // Spigot
this.world.getMethodProfiler().exit();
2019-05-28 06:30:00 +10:00
this.clearCache();
2019-04-23 12:00:00 +10:00
}
2021-03-16 09:00:00 +11:00
@@ -421,7 +427,9 @@ public class ChunkProviderServer extends IChunkProvider {
2020-06-25 10:00:00 +10:00
SpawnerCreature.a(this.world, chunk, spawnercreature_d, this.allowAnimals, this.allowMonsters, flag2);
2019-04-23 12:00:00 +10:00
}
2020-06-25 10:00:00 +10:00
+ this.world.timings.doTickTiles.startTiming(); // Spigot
this.world.a(chunk, k);
+ this.world.timings.doTickTiles.stopTiming(); // Spigot
2019-04-23 12:00:00 +10:00
}
}
}
2021-03-16 09:00:00 +11:00
@@ -435,7 +443,9 @@ public class ChunkProviderServer extends IChunkProvider {
2019-05-14 10:00:00 +10:00
this.world.getMethodProfiler().exit();
}
2019-04-23 12:00:00 +10:00
+ this.world.timings.tracker.startTiming(); // Spigot
this.playerChunkMap.g();
+ this.world.timings.tracker.stopTiming(); // Spigot
}
2020-06-25 10:00:00 +10:00
private void a(long i, Consumer<Chunk> consumer) {
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
2021-05-15 09:07:30 +10:00
index 99aed7956..919b90f8a 100644
2021-03-16 09:00:00 +11:00
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -152,6 +152,7 @@ import net.minecraft.world.level.block.ITileEntity;
import net.minecraft.world.level.storage.WorldDataServer;
import org.bukkit.Bukkit;
import org.bukkit.WeatherType;
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.util.WorldUUID;
import org.bukkit.event.entity.CreatureSpawnEvent;
2021-04-07 15:03:34 +10:00
@@ -442,15 +443,19 @@ public class WorldServer extends World implements GeneratorAccessSeed {
2021-03-16 09:00:00 +11:00
gameprofilerfiller.exitEnter("chunkSource");
this.getChunkProvider().tick(booleansupplier);
gameprofilerfiller.exitEnter("tickPending");
+ timings.doTickPending.startTiming(); // Spigot
if (!this.isDebugWorld()) {
this.nextTickListBlock.b();
this.nextTickListFluid.b();
}
+ timings.doTickPending.stopTiming(); // Spigot
2021-03-16 09:00:00 +11:00
gameprofilerfiller.exitEnter("raid");
this.persistentRaid.a();
gameprofilerfiller.exitEnter("blockEvents");
+ timings.doSounds.startTiming(); // Spigot
this.ak();
+ timings.doSounds.stopTiming(); // Spigot
this.ticking = false;
gameprofilerfiller.exitEnter("entities");
boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
2021-04-07 15:03:34 +10:00
@@ -460,6 +465,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
2018-07-15 10:00:00 +10:00
2021-03-16 09:00:00 +11:00
if (flag3 || this.emptyTime++ < 300) {
+ timings.tickEntities.startTiming(); // Spigot
if (this.dragonBattle != null) {
this.dragonBattle.b();
}
2021-04-07 15:03:34 +10:00
@@ -467,6 +473,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
2021-03-16 09:00:00 +11:00
this.tickingEntities = true;
ObjectIterator objectiterator = this.entitiesById.int2ObjectEntrySet().iterator();
2021-03-16 09:00:00 +11:00
+ timings.entityTick.startTiming(); // Spigot
while (objectiterator.hasNext()) {
Entry<Entity> entry = (Entry) objectiterator.next();
Entity entity = (Entity) entry.getValue();
2021-04-07 15:03:34 +10:00
@@ -511,6 +518,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
2021-03-16 09:00:00 +11:00
gameprofilerfiller.exit();
}
+ timings.entityTick.stopTiming(); // Spigot
this.tickingEntities = false;
2021-04-07 15:03:34 +10:00
@@ -520,6 +528,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
2021-03-16 09:00:00 +11:00
this.registerEntity(entity2);
}
2021-03-16 09:00:00 +11:00
+ timings.tickEntities.stopTiming(); // Spigot
this.tickBlockEntities();
}
2021-04-07 15:03:34 +10:00
@@ -742,6 +751,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
2021-03-16 09:00:00 +11:00
if (!(entity instanceof EntityHuman) && !this.getChunkProvider().a(entity)) {
this.chunkCheck(entity);
} else {
+ entity.tickTimer.startTiming(); // Spigot
entity.g(entity.locX(), entity.locY(), entity.locZ());
entity.lastYaw = entity.yaw;
entity.lastPitch = entity.pitch;
2021-04-07 15:03:34 +10:00
@@ -768,6 +778,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
2021-03-16 09:00:00 +11:00
this.a(entity, entity1);
}
}
+ entity.tickTimer.stopTiming(); // Spigot
2018-07-15 10:00:00 +10:00
2021-03-16 09:00:00 +11:00
}
}
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
2021-04-28 08:10:22 +10:00
index bc5aae5f5..a3d4c46c0 100644
2021-03-16 09:00:00 +11:00
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
2021-04-28 08:10:22 +10:00
@@ -292,6 +292,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
2021-03-16 09:00:00 +11:00
// CraftBukkit end
2021-03-16 09:00:00 +11:00
public void tick() {
+ org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.startTiming(); // Spigot
this.syncPosition();
this.player.lastX = this.player.locX();
this.player.lastY = this.player.locY();
2021-04-28 08:10:22 +10:00
@@ -367,6 +368,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
2021-03-16 09:00:00 +11:00
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
this.disconnect(new ChatMessage("multiplayer.disconnect.idling"));
}
2021-03-16 09:00:00 +11:00
+ org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot
}
2021-04-28 08:10:22 +10:00
@@ -1869,6 +1871,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
2021-03-16 09:00:00 +11:00
// CraftBukkit end
private void handleCommand(String s) {
+ org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
// CraftBukkit start - whole method
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
2021-04-28 08:10:22 +10:00
@@ -1878,6 +1881,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
2021-03-16 09:00:00 +11:00
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
+ org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
return;
}
2021-04-28 08:10:22 +10:00
@@ -1889,6 +1893,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
2021-03-16 09:00:00 +11:00
player.sendMessage(org.bukkit.ChatColor.RED + "An internal error occurred while attempting to perform this command");
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
+ } finally {
+ org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
}
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5e12a79b2..d31497d7a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -116,6 +116,7 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
2016-03-01 08:33:06 +11:00
import org.bukkit.entity.Hanging;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Vehicle;
2013-06-02 11:29:44 +10:00
+import org.spigotmc.CustomTimingsHandler; // Spigot
import org.bukkit.event.entity.EntityCombustByEntityEvent;
2014-04-18 17:08:19 +00:00
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
2016-03-01 08:33:06 +11:00
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
2021-03-16 09:00:00 +11:00
@@ -247,6 +248,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
2017-11-07 17:30:57 +11:00
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949
2020-09-19 17:51:05 +10:00
public boolean persistentInvisibility = false;
+ public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
2016-03-01 08:33:06 +11:00
2017-11-07 17:30:57 +11:00
public float getBukkitYaw() {
return this.yaw;
2021-03-16 09:00:00 +11:00
@@ -601,6 +603,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
}
2019-04-23 12:00:00 +10:00
public void move(EnumMoveType enummovetype, Vec3D vec3d) {
+ org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
2015-02-28 11:36:22 +00:00
if (this.noclip) {
2020-06-25 10:00:00 +10:00
this.a(this.getBoundingBox().c(vec3d));
this.recalcPosition();
2021-03-16 09:00:00 +11:00
@@ -736,6 +739,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
2019-04-23 12:00:00 +10:00
this.world.getMethodProfiler().exit();
}
+ org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
}
2020-11-03 07:00:00 +11:00
protected BlockPosition ap() {
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
2021-04-04 17:29:07 +10:00
index 5d97c425e..68983080c 100644
2021-03-16 09:00:00 +11:00
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -135,6 +135,8 @@ import org.bukkit.event.entity.EntityTeleportEvent;
2016-03-01 08:33:06 +11:00
import org.bukkit.event.player.PlayerItemConsumeEvent;
// CraftBukkit end
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+
public abstract class EntityLiving extends Entity {
2019-04-23 12:00:00 +10:00
private static final UUID b = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
2021-03-16 09:00:00 +11:00
@@ -2448,6 +2450,7 @@ public abstract class EntityLiving extends Entity {
2019-04-23 12:00:00 +10:00
@Override
2018-07-15 10:00:00 +10:00
public void tick() {
+ SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
2018-07-15 10:00:00 +10:00
super.tick();
2020-08-12 07:00:00 +10:00
this.t();
this.v();
2021-03-16 09:00:00 +11:00
@@ -2496,7 +2499,9 @@ public abstract class EntityLiving extends Entity {
}
}
+ SpigotTimings.timerEntityBaseTick.stopTiming(); // Spigot
2018-12-13 11:00:00 +11:00
this.movementTick();
+ SpigotTimings.timerEntityTickRest.startTiming(); // Spigot
2019-12-11 09:00:00 +11:00
double d0 = this.locX() - this.lastX;
double d1 = this.locZ() - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
2021-03-16 09:00:00 +11:00
@@ -2577,6 +2582,7 @@ public abstract class EntityLiving extends Entity {
2019-04-23 12:00:00 +10:00
this.pitch = 0.0F;
2016-03-01 08:33:06 +11:00
}
+ SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
}
2021-04-04 17:29:07 +10:00
public void updateEquipment() {
2021-03-16 09:00:00 +11:00
@@ -2758,6 +2764,7 @@ public abstract class EntityLiving extends Entity {
2019-04-23 12:00:00 +10:00
this.setMot(d4, d5, d6);
this.world.getMethodProfiler().enter("ai");
+ SpigotTimings.timerEntityAI.startTiming(); // Spigot
2016-11-17 12:41:12 +11:00
if (this.isFrozen()) {
2019-04-23 12:00:00 +10:00
this.jumping = false;
2020-08-12 07:00:00 +10:00
this.aR = 0.0F;
2021-03-16 09:00:00 +11:00
@@ -2767,6 +2774,7 @@ public abstract class EntityLiving extends Entity {
this.doTick();
2019-04-23 12:00:00 +10:00
this.world.getMethodProfiler().exit();
}
+ SpigotTimings.timerEntityAI.stopTiming(); // Spigot
2019-04-23 12:00:00 +10:00
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("jump");
2021-03-16 09:00:00 +11:00
@@ -2801,7 +2809,9 @@ public abstract class EntityLiving extends Entity {
2020-08-12 07:00:00 +10:00
this.r();
2018-07-15 10:00:00 +10:00
AxisAlignedBB axisalignedbb = this.getBoundingBox();
+ SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
2020-08-12 07:00:00 +10:00
this.g(new Vec3D((double) this.aR, (double) this.aS, (double) this.aT));
+ SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
2019-04-23 12:00:00 +10:00
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("push");
2020-08-12 07:00:00 +10:00
if (this.bf > 0) {
2021-03-16 09:00:00 +11:00
@@ -2809,7 +2819,9 @@ public abstract class EntityLiving extends Entity {
2018-07-15 10:00:00 +10:00
this.a(axisalignedbb, this.getBoundingBox());
}
2016-03-01 08:33:06 +11:00
+ SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
2019-04-23 12:00:00 +10:00
this.collideNearby();
2016-03-01 08:33:06 +11:00
+ SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
2019-04-23 12:00:00 +10:00
this.world.getMethodProfiler().exit();
2020-11-03 07:00:00 +11:00
if (!this.world.isClientSide && this.dO() && this.aG()) {
2020-06-25 10:00:00 +10:00
this.damageEntity(DamageSource.DROWN, 1.0F);
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
index e1dc16a86..2d02b2fc5 100644
--- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
@@ -104,6 +104,7 @@ public final class SpawnerCreature {
2020-06-25 10:00:00 +10:00
public static void a(WorldServer worldserver, Chunk chunk, SpawnerCreature.d spawnercreature_d, boolean flag, boolean flag1, boolean flag2) {
worldserver.getMethodProfiler().enter("spawner");
+ worldserver.timings.mobSpawn.startTiming(); // Spigot
EnumCreatureType[] aenumcreaturetype = SpawnerCreature.c;
int i = aenumcreaturetype.length;
2021-03-16 09:00:00 +11:00
@@ -158,6 +159,7 @@ public final class SpawnerCreature {
2020-06-25 10:00:00 +10:00
}
}
+ worldserver.timings.mobSpawn.stopTiming(); // Spigot
worldserver.getMethodProfiler().exit();
}
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 923d8dba1..6c4926e0a 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -70,6 +70,7 @@ import net.minecraft.server.level.WorldServer;
import net.minecraft.world.entity.item.EntityItem;
import net.minecraft.world.level.border.IWorldBorderListener;
2016-03-01 08:33:06 +11:00
import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.craftbukkit.CraftServer;
2014-02-12 13:48:26 +00:00
import org.bukkit.craftbukkit.CraftWorld;
2020-01-28 09:50:23 +11:00
import org.bukkit.craftbukkit.block.CapturedBlockState;
2021-03-16 09:00:00 +11:00
@@ -128,6 +129,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2019-04-23 12:00:00 +10:00
public boolean populating;
2013-06-20 18:52:23 +10:00
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
+ public final SpigotTimings.WorldTimingsHandler timings; // Spigot
+
public CraftWorld getWorld() {
return this.world;
}
2021-03-16 09:00:00 +11:00
@@ -206,6 +209,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2019-04-23 12:00:00 +10:00
public void c(WorldBorder worldborder, double d0) {}
2016-03-06 14:36:33 +11:00
});
2016-03-01 11:23:45 +11:00
// CraftBukkit end
2016-03-01 08:33:06 +11:00
+ timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
}
2019-04-23 12:00:00 +10:00
@Override
2021-03-16 09:00:00 +11:00
@@ -637,6 +641,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2019-04-23 12:00:00 +10:00
GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
2019-04-23 12:00:00 +10:00
gameprofilerfiller.enter("blockEntities");
2016-06-15 13:24:40 +10:00
+ timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) {
this.tileEntityListTick.removeAll(this.tileEntityListUnload);
2017-09-18 20:00:00 +10:00
this.tileEntityList.removeAll(this.tileEntityListUnload);
2021-03-16 09:00:00 +11:00
@@ -657,6 +662,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2019-04-23 12:00:00 +10:00
gameprofilerfiller.a(() -> {
2019-12-11 09:00:00 +11:00
return String.valueOf(TileEntityTypes.a(tileentity.getTileType()));
2017-08-03 23:00:00 +10:00
});
+ tileentity.tickTimer.startTiming(); // Spigot
2019-12-11 09:00:00 +11:00
if (tileentity.getTileType().isValidBlock(this.getType(blockposition).getBlock())) {
2019-05-14 10:00:00 +10:00
((ITickable) tileentity).tick();
} else {
2021-03-16 09:00:00 +11:00
@@ -670,6 +676,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2021-01-31 10:08:46 +11:00
2019-04-23 12:00:00 +10:00
tileentity.a(crashreportsystemdetails);
throw new ReportedException(crashreport);
2021-01-31 10:08:46 +11:00
+ // Spigot start
+ } finally {
+ tileentity.tickTimer.stopTiming();
2021-01-31 10:08:46 +11:00
+ // Spigot end
}
}
}
2021-03-16 09:00:00 +11:00
@@ -683,6 +693,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
}
}
+ timings.tileEntityTick.stopTiming(); // Spigot
+ timings.tileEntityPending.startTiming(); // Spigot
2019-04-23 12:00:00 +10:00
this.tickingTileEntities = false;
gameprofilerfiller.exitEnter("pendingBlockEntities");
if (!this.tileEntityListPending.isEmpty()) {
2021-03-16 09:00:00 +11:00
@@ -715,12 +727,15 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2019-04-23 12:00:00 +10:00
this.tileEntityListPending.clear();
}
+ timings.tileEntityPending.stopTiming(); // Spigot
2019-04-23 12:00:00 +10:00
gameprofilerfiller.exit();
}
2017-05-19 21:00:22 +10:00
2019-04-23 12:00:00 +10:00
public void a(Consumer<Entity> consumer, Entity entity) {
try {
+ SpigotTimings.tickEntityTimer.startTiming(); // Spigot
2019-04-23 12:00:00 +10:00
consumer.accept(entity);
+ SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
2019-04-23 12:00:00 +10:00
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
index cea201cc6..2f507032a 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
@@ -21,8 +21,11 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
2019-04-23 12:00:00 +10:00
2021-03-16 09:00:00 +11:00
+import org.spigotmc.CustomTimingsHandler; // Spigot
+
public abstract class TileEntity {
2019-04-23 12:00:00 +10:00
2021-03-16 09:00:00 +11:00
+ public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
// CraftBukkit start - data containers
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
index 9e4ac5f5c..27703b807 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
@@ -446,6 +446,7 @@ public class ChunkRegionLoader {
private static void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) {
NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10);
World world = chunk.getWorld();
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
2019-04-23 12:00:00 +10:00
2021-03-16 09:00:00 +11:00
for (int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
@@ -457,6 +458,8 @@ public class ChunkRegionLoader {
chunk.d(true);
2019-04-23 12:00:00 +10:00
}
2021-03-16 09:00:00 +11:00
+ world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot
+ world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot
NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10);
for (int j = 0; j < nbttaglist1.size(); ++j) {
@@ -474,6 +477,7 @@ public class ChunkRegionLoader {
}
}
}
2021-03-16 09:00:00 +11:00
+ world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
}
2021-03-16 09:00:00 +11:00
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2021-05-15 09:07:30 +10:00
index c334e1471..c23fa4d8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2021-05-15 09:07:30 +10:00
@@ -2041,6 +2041,11 @@ public final class CraftServer implements Server {
2021-03-09 08:47:45 +11:00
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{
+ @Override
+ public YamlConfiguration getConfig()
+ {
+ return org.spigotmc.SpigotConfig.config;
+ }
};
2021-03-09 08:47:45 +11:00
public org.bukkit.Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
new file mode 100644
2021-03-16 09:00:00 +11:00
index 000000000..570e295a5
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
2020-06-25 10:00:00 +10:00
@@ -0,0 +1,160 @@
+package org.bukkit.craftbukkit;
+
+import java.util.HashMap;
2021-03-16 09:00:00 +11:00
+import net.minecraft.world.entity.Entity;
+import net.minecraft.world.level.World;
+import net.minecraft.world.level.block.entity.TileEntity;
+import net.minecraft.world.level.storage.WorldDataServer;
+import org.bukkit.craftbukkit.scheduler.CraftTask;
2019-04-23 15:12:43 +10:00
+import org.bukkit.plugin.java.JavaPluginLoader;
+import org.bukkit.scheduler.BukkitTask;
+import org.spigotmc.CustomTimingsHandler;
+
+public class SpigotTimings {
+
+ public static final CustomTimingsHandler serverTickTimer = new CustomTimingsHandler("** Full Server Tick");
+ public static final CustomTimingsHandler playerListTimer = new CustomTimingsHandler("Player List");
2017-05-14 12:00:00 +10:00
+ public static final CustomTimingsHandler commandFunctionsTimer = new CustomTimingsHandler("Command Functions");
+ public static final CustomTimingsHandler connectionTimer = new CustomTimingsHandler("Connection Handler");
2018-10-27 17:44:13 +11:00
+ public static final CustomTimingsHandler playerConnectionTimer = new CustomTimingsHandler("** PlayerConnection");
+ public static final CustomTimingsHandler tickablesTimer = new CustomTimingsHandler("Tickables");
+ public static final CustomTimingsHandler schedulerTimer = new CustomTimingsHandler("Scheduler");
+ public static final CustomTimingsHandler timeUpdateTimer = new CustomTimingsHandler("Time Update");
+ public static final CustomTimingsHandler serverCommandTimer = new CustomTimingsHandler("Server Command");
+ public static final CustomTimingsHandler worldSaveTimer = new CustomTimingsHandler("World Save");
+
+ public static final CustomTimingsHandler entityMoveTimer = new CustomTimingsHandler("** entityMove");
+ public static final CustomTimingsHandler tickEntityTimer = new CustomTimingsHandler("** tickEntity");
+ public static final CustomTimingsHandler activatedEntityTimer = new CustomTimingsHandler("** activatedTickEntity");
+ public static final CustomTimingsHandler tickTileEntityTimer = new CustomTimingsHandler("** tickTileEntity");
+
+ public static final CustomTimingsHandler timerEntityBaseTick = new CustomTimingsHandler("** livingEntityBaseTick");
+ public static final CustomTimingsHandler timerEntityAI = new CustomTimingsHandler("** livingEntityAI");
+ public static final CustomTimingsHandler timerEntityAICollision = new CustomTimingsHandler("** livingEntityAICollision");
+ public static final CustomTimingsHandler timerEntityAIMove = new CustomTimingsHandler("** livingEntityAIMove");
+ public static final CustomTimingsHandler timerEntityTickRest = new CustomTimingsHandler("** livingEntityTickRest");
+
+ public static final CustomTimingsHandler processQueueTimer = new CustomTimingsHandler("processQueue");
+ public static final CustomTimingsHandler schedulerSyncTimer = new CustomTimingsHandler("** Scheduler - Sync Tasks", JavaPluginLoader.pluginParentTimer);
+
+ public static final CustomTimingsHandler playerCommandTimer = new CustomTimingsHandler("** playerCommand");
+
+ public static final HashMap<String, CustomTimingsHandler> entityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
+ public static final HashMap<String, CustomTimingsHandler> tileEntityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
+ public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>();
+
+ /**
+ * Gets a timer associated with a plugins tasks.
+ * @param task
+ * @param period
+ * @return
+ */
+ public static CustomTimingsHandler getPluginTaskTimings(BukkitTask task, long period) {
+ if (!task.isSync()) {
+ return null;
+ }
+ String plugin;
+ final CraftTask ctask = (CraftTask) task;
+
+ if (task.getOwner() != null) {
+ plugin = task.getOwner().getDescription().getFullName();
+ } else {
+ plugin = "Unknown";
+ }
+ String taskname = ctask.getTaskName();
+
+ String name = "Task: " + plugin + " Runnable: " + taskname;
+ if (period > 0) {
2021-01-31 10:08:46 +11:00
+ name += "(interval:" + period + ")";
+ } else {
+ name += "(Single)";
+ }
+ CustomTimingsHandler result = pluginTaskTimingMap.get(name);
+ if (result == null) {
+ result = new CustomTimingsHandler(name, SpigotTimings.schedulerSyncTimer);
+ pluginTaskTimingMap.put(name, result);
+ }
+ return result;
+ }
+
+ /**
+ * Get a named timer for the specified entity type to track type specific timings.
+ * @param entity
+ * @return
+ */
+ public static CustomTimingsHandler getEntityTimings(Entity entity) {
+ String entityType = entity.getClass().getName();
+ CustomTimingsHandler result = entityTypeTimingMap.get(entityType);
+ if (result == null) {
+ result = new CustomTimingsHandler("** tickEntity - " + entity.getClass().getSimpleName(), activatedEntityTimer);
+ entityTypeTimingMap.put(entityType, result);
+ }
+ return result;
+ }
+
+ /**
+ * Get a named timer for the specified tile entity type to track type specific timings.
+ * @param entity
+ * @return
+ */
+ public static CustomTimingsHandler getTileEntityTimings(TileEntity entity) {
+ String entityType = entity.getClass().getName();
+ CustomTimingsHandler result = tileEntityTypeTimingMap.get(entityType);
+ if (result == null) {
+ result = new CustomTimingsHandler("** tickTileEntity - " + entity.getClass().getSimpleName(), tickTileEntityTimer);
+ tileEntityTypeTimingMap.put(entityType, result);
+ }
+ return result;
+ }
+
+ /**
+ * Set of timers per world, to track world specific timings.
+ */
+ public static class WorldTimingsHandler {
+ public final CustomTimingsHandler mobSpawn;
+ public final CustomTimingsHandler doChunkUnload;
+ public final CustomTimingsHandler doTickPending;
+ public final CustomTimingsHandler doTickTiles;
+ public final CustomTimingsHandler doChunkMap;
+ public final CustomTimingsHandler doSounds;
+ public final CustomTimingsHandler entityTick;
+ public final CustomTimingsHandler tileEntityTick;
+ public final CustomTimingsHandler tileEntityPending;
+ public final CustomTimingsHandler tracker;
+ public final CustomTimingsHandler doTick;
+ public final CustomTimingsHandler tickEntities;
+
+ public final CustomTimingsHandler syncChunkLoadTimer;
+ public final CustomTimingsHandler syncChunkLoadStructuresTimer;
+ public final CustomTimingsHandler syncChunkLoadEntitiesTimer;
+ public final CustomTimingsHandler syncChunkLoadTileEntitiesTimer;
+ public final CustomTimingsHandler syncChunkLoadTileTicksTimer;
+ public final CustomTimingsHandler syncChunkLoadPostTimer;
+
+ public WorldTimingsHandler(World server) {
2020-06-25 10:00:00 +10:00
+ String name = ((WorldDataServer) server.worldData).getName() + " - ";
+
+ mobSpawn = new CustomTimingsHandler("** " + name + "mobSpawn");
+ doChunkUnload = new CustomTimingsHandler("** " + name + "doChunkUnload");
+ doTickPending = new CustomTimingsHandler("** " + name + "doTickPending");
+ doTickTiles = new CustomTimingsHandler("** " + name + "doTickTiles");
+ doChunkMap = new CustomTimingsHandler("** " + name + "doChunkMap");
+ doSounds = new CustomTimingsHandler("** " + name + "doSounds");
+ entityTick = new CustomTimingsHandler("** " + name + "entityTick");
+ tileEntityTick = new CustomTimingsHandler("** " + name + "tileEntityTick");
+ tileEntityPending = new CustomTimingsHandler("** " + name + "tileEntityPending");
+
+ syncChunkLoadTimer = new CustomTimingsHandler("** " + name + "syncChunkLoad");
+ syncChunkLoadStructuresTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Structures");
+ syncChunkLoadEntitiesTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Entities");
+ syncChunkLoadTileEntitiesTimer = new CustomTimingsHandler("** " + name + "chunkLoad - TileEntities");
+ syncChunkLoadTileTicksTimer = new CustomTimingsHandler("** " + name + "chunkLoad - TileTicks");
+ syncChunkLoadPostTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Post");
+
+
+ tracker = new CustomTimingsHandler(name + "tracker");
+ doTick = new CustomTimingsHandler(name + "doTick");
+ tickEntities = new CustomTimingsHandler(name + "tickEntities");
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
2021-01-27 14:44:22 +11:00
index ce2e3d282..9ad17c560 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
2020-04-14 12:42:02 +10:00
@@ -396,7 +396,9 @@ public class CraftScheduler implements BukkitScheduler {
if (task.isSync()) {
2018-06-20 13:18:48 +10:00
currentTask = task;
try {
+ task.timings.startTiming(); // Spigot
task.run();
+ task.timings.stopTiming(); // Spigot
} catch (final Throwable throwable) {
task.getOwner().getLogger().log(
Level.WARNING,
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
2021-03-09 08:47:45 +11:00
index b67f2deb8..3c7066192 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
2021-03-09 08:47:45 +11:00
@@ -5,7 +5,10 @@ import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitTask;
-class CraftTask implements BukkitTask, Runnable {
2021-03-09 08:47:45 +11:00
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+import org.spigotmc.CustomTimingsHandler; // Spigot
+
+public class CraftTask implements BukkitTask, Runnable { // Spigot
private volatile CraftTask next = null;
public static final int ERROR = 0;
2021-03-09 08:47:45 +11:00
@@ -28,6 +31,7 @@ class CraftTask implements BukkitTask, Runnable {
private final Plugin plugin;
private final int id;
+ final CustomTimingsHandler timings; // Spigot
CraftTask() {
this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
}
2021-03-09 08:47:45 +11:00
@@ -53,6 +57,7 @@ class CraftTask implements BukkitTask, Runnable {
2018-11-23 12:11:41 +11:00
}
this.id = id;
this.period = period;
2018-11-23 12:11:41 +11:00
+ this.timings = this.isSync() ? SpigotTimings.getPluginTaskTimings(this, period) : null; // Spigot
}
2018-11-23 12:11:41 +11:00
@Override
2021-03-09 08:47:45 +11:00
@@ -126,4 +131,10 @@ class CraftTask implements BukkitTask, Runnable {
setPeriod(CraftTask.CANCEL);
return true;
}
+
+ // Spigot start
+ public String getTaskName() {
2018-11-23 14:22:14 +11:00
+ return (getTaskClass() == null) ? "Unknown" : getTaskClass().getName();
+ }
+ // Spigot end
}
--
2.25.1