diff options
| author | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-07-25 20:40:47 +0000 |
|---|---|---|
| committer | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-07-25 20:40:58 +0000 |
| commit | 9ee3e452a4a5d7853be08c046e3e9ca2e6e2c917 (patch) | |
| tree | c9aac7f4f28ec83215b57776a9e8aad840a08994 | |
| parent | 5214504e588a30c5d595be5f6e76b6952d9a7982 (diff) | |
fix(death): hunters lose compass when they die
| -rw-r--r-- | src/main/java/world/anhgelus/manhunt/Manhunt.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/world/anhgelus/manhunt/Manhunt.java b/src/main/java/world/anhgelus/manhunt/Manhunt.java index 6499f5a..09df3e6 100644 --- a/src/main/java/world/anhgelus/manhunt/Manhunt.java +++ b/src/main/java/world/anhgelus/manhunt/Manhunt.java @@ -96,7 +96,10 @@ public class Manhunt implements ModInitializer { ServerPlayerEvents.AFTER_RESPAWN.register((oldPlayer, newPlayer, alive) -> { if (alive) return; final UUID uuid = oldPlayer.getUuid(); - if (!speedrunners.contains(uuid)) return; + if (hunters.contains(uuid)) { + newPlayer.giveItemStack(new ItemStack(Items.COMPASS)); + return; + } speedrunners.remove(uuid); if (!speedrunners.isEmpty()) return; for (final ServerPlayerEntity player : newPlayer.server.getPlayerManager().getPlayerList()) { |
