[ci skip] Cleanup events (#10202)
This commit is contained in:
parent
b3c81089ae
commit
294347bee2
295 changed files with 3245 additions and 3088 deletions
|
@ -49,29 +49,22 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
index 8d06e8d286da2573e40794adab695ff77e5afd86..b3c6e76105ee26a79a84a203935530f859460652 100644
|
||||
index 8d06e8d286da2573e40794adab695ff77e5afd86..9143ce01650b51e7f6a677c5941ade91a506449f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.server.players;
|
||||
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.io.Files;
|
||||
@@ -357,6 +358,7 @@ public class OldUsersConverter {
|
||||
@@ -357,6 +357,7 @@ public class OldUsersConverter {
|
||||
root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap());
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
+ ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
||||
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
||||
}
|
||||
|
||||
if (root != null) {
|
||||
@@ -370,6 +372,7 @@ public class OldUsersConverter {
|
||||
@@ -370,6 +371,7 @@ public class OldUsersConverter {
|
||||
NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2));
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
+ ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
||||
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -88,25 +81,14 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff5
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 6fbadd278138743f87fcf6b3c3d3c57af41d437c..aee40ef7ae18ad00d8af88dd1e2397fe8df78309 100644
|
||||
index 6fbadd278138743f87fcf6b3c3d3c57af41d437c..eb2b4ba79488c3d43421c39852c36c4387372f38 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1,5 +1,10 @@
|
||||
package net.minecraft.world.level;
|
||||
|
||||
+import co.aikar.timings.Timing;
|
||||
+import co.aikar.timings.Timings;
|
||||
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
+import com.google.common.base.MoreObjects;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.serialization.Codec;
|
||||
import java.io.IOException;
|
||||
@@ -736,6 +741,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -736,6 +736,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper start - Prevent block entity and entity crashes
|
||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
MinecraftServer.LOGGER.error(msg, throwable);
|
||||
+ getCraftServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
|
||||
+ getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
|
||||
entity.discard();
|
||||
// Paper end - Prevent block entity and entity crashes
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue