Remove unnecessary AsyncCatcher callers
The AsyncCatcher will check threads and cost extra performance, and since it only works for bad plugins, just removed unnecessary callers that won't save data to disk to save these performance.
This commit is contained in:
@@ -707,7 +707,7 @@ public final class CraftServer implements Server {
|
||||
public boolean dispatchCommand(CommandSender sender, String commandLine) {
|
||||
Validate.notNull(sender, "Sender cannot be null");
|
||||
Validate.notNull(commandLine, "CommandLine cannot be null");
|
||||
org.spigotmc.AsyncCatcher.catchOp( "command dispatch" ); // Spigot
|
||||
//org.spigotmc.AsyncCatcher.catchOp( "command dispatch" ); // Spigot // Akarin
|
||||
|
||||
// Paper Start
|
||||
if (!org.spigotmc.AsyncCatcher.shuttingDown && !ThreadAssertion.isMainThread() && !Bukkit.isPrimaryThread()) { // Akarin
|
||||
|
||||
@@ -223,7 +223,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
public boolean unloadChunkRequest(int x, int z, boolean safe) {
|
||||
org.spigotmc.AsyncCatcher.catchOp( "chunk unload"); // Spigot
|
||||
//org.spigotmc.AsyncCatcher.catchOp( "chunk unload"); // Spigot // Akarin
|
||||
if (safe && isChunkInUse(x, z)) {
|
||||
return false;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
public boolean unloadChunk(int x, int z, boolean save, boolean safe) {
|
||||
org.spigotmc.AsyncCatcher.catchOp( "chunk unload" ); // Spigot
|
||||
//org.spigotmc.AsyncCatcher.catchOp( "chunk unload" ); // Spigot // Akarin
|
||||
if (isChunkInUse(x, z)) {
|
||||
return false;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
public boolean regenerateChunk(int x, int z) {
|
||||
org.spigotmc.AsyncCatcher.catchOp( "chunk regenerate" ); // Spigot
|
||||
//org.spigotmc.AsyncCatcher.catchOp( "chunk regenerate" ); // Spigot // Akarin
|
||||
if (!unloadChunk0(x, z, false)) {
|
||||
return false;
|
||||
}
|
||||
@@ -304,7 +304,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
public boolean loadChunk(int x, int z, boolean generate) {
|
||||
org.spigotmc.AsyncCatcher.catchOp( "chunk load"); // Spigot
|
||||
//org.spigotmc.AsyncCatcher.catchOp( "chunk load"); // Spigot // Akarin
|
||||
chunkLoadCount++;
|
||||
return world.getChunkProvider().getChunkAt(x, z, true, generate || isChunkGenerated(x, z)) != null; // Paper
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
||||
}
|
||||
|
||||
public CraftScoreboard getNewScoreboard() {
|
||||
org.spigotmc.AsyncCatcher.catchOp( "scoreboard creation"); // Spigot
|
||||
//org.spigotmc.AsyncCatcher.catchOp( "scoreboard creation"); // Spigot // Akarin
|
||||
CraftScoreboard scoreboard = new CraftScoreboard(new ScoreboardServer(server));
|
||||
scoreboards.add(scoreboard);
|
||||
return scoreboard;
|
||||
|
||||
Reference in New Issue
Block a user