update jukealert

This commit is contained in:
okx-code
2024-05-10 20:02:24 +01:00
parent 2d6422a626
commit 09b236a1bf
2 changed files with 4 additions and 2 deletions

View File

@@ -28,11 +28,13 @@ public class ShowOwnerOnDestroyAppender extends AbstractSnitchAppender {
if (!action.isLifeCycleEvent()) {
return;
}
if (!(action instanceof DestroySnitchAction)) {
if (!(action instanceof DestroySnitchAction dsa)) {
return;
}
DestroySnitchAction dsa = ((DestroySnitchAction) action);
UUID destroyerUUID = dsa.getPlayer();
if (destroyerUUID == null) {
return;
}
Player player = Bukkit.getPlayer(destroyerUUID);
if (player == null) {
return;