From d36bfcf2442165ec77d4e688930ef8b36e8a0a97 Mon Sep 17 00:00:00 2001 From: syssifus <62404294+UltraBlackLinux@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:09:15 +0200 Subject: [PATCH] Shuffle team members on game join Should fix e.g. suspicious spleef where the party player order is directly put into the new game and thus the same player gets the pickaxe every time. See here: https://github.com/NucleoidMC/spleef/blob/1.19.4/src/main/java/xyz/nucleoid/spleef/game/ToolConfig.java#L35 --- src/main/java/xyz/nucleoid/parties/PartyManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/xyz/nucleoid/parties/PartyManager.java b/src/main/java/xyz/nucleoid/parties/PartyManager.java index 4badec3..183b229 100644 --- a/src/main/java/xyz/nucleoid/parties/PartyManager.java +++ b/src/main/java/xyz/nucleoid/parties/PartyManager.java @@ -13,6 +13,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; +import java.util.List; public final class PartyManager { private static PartyManager instance; @@ -34,6 +35,8 @@ public static void register() { var partyManager = PartyManager.get(player.server); var members = partyManager.getPartyMembers(player); + Collections.shuffle((List) members); + additional.addAll(members); }); }