Log Minecraft Internal Scheduler logs correctly
This commit is contained in:
@@ -267,29 +267,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import org.bukkit.plugin.IllegalPluginAccessException;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
try {
|
||||
task.run();
|
||||
} catch (final Throwable throwable) {
|
||||
+ // Paper start
|
||||
+ String msg = String.format(
|
||||
+ "Task #%s for %s generated an exception",
|
||||
+ task.getTaskId(),
|
||||
+ task.getOwner().getDescription().getFullName());
|
||||
task.getOwner().getLogger().log(
|
||||
Level.WARNING,
|
||||
- String.format(
|
||||
- "Task #%s for %s generated an exception",
|
||||
- task.getTaskId(),
|
||||
- task.getOwner().getDescription().getFullName()),
|
||||
+ msg,
|
||||
msg,
|
||||
throwable);
|
||||
}
|
||||
+ task.getOwner().getServer().getPluginManager().callEvent(
|
||||
+ new ServerExceptionEvent(new ServerSchedulerException(msg, throwable, task))
|
||||
+ );
|
||||
+ // Paper end
|
||||
+ new ServerExceptionEvent(new ServerSchedulerException(msg, throwable, task)));
|
||||
// Paper end
|
||||
} finally {
|
||||
currentTask = null;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
parsePending();
|
||||
} else {
|
||||
debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass()));
|
||||
|
||||
Reference in New Issue
Block a user