Added method to clear specific player's kill attempts
This commit is contained in:
@@ -102,8 +102,6 @@ public class MobKillHandler {
|
|||||||
}
|
}
|
||||||
updated.put(knockedId, attempt);
|
updated.put(knockedId, attempt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5) Replace the map
|
|
||||||
killAttempts.clear();
|
killAttempts.clear();
|
||||||
killAttempts.putAll(updated);
|
killAttempts.putAll(updated);
|
||||||
}
|
}
|
||||||
@@ -150,4 +148,8 @@ public class MobKillHandler {
|
|||||||
var srv = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer();
|
var srv = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer();
|
||||||
return srv != null ? srv.getPlayerList().getPlayer(id) : null;
|
return srv != null ? srv.getPlayerList().getPlayer(id) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void clearKillAttempt(UUID playerUuid) {
|
||||||
|
killAttempts.remove(playerUuid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user