From 10961ebac6293555fd85f853e9a9d3bebc96c43e Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Sat, 30 Jul 2016 18:13:56 -0500 Subject: [PATCH] Randomly generate team names for earlier commit [17:17] _MylesC: the biggest issue you run into is bungee not handling 2 teams with same name :( http://i.imgur.com/jbDigxW.png --- Spigot-Server-Patches/Configurable-Player-Collision.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Configurable-Player-Collision.patch b/Spigot-Server-Patches/Configurable-Player-Collision.patch index 4c5905a93..6752c5ed8 100644 --- a/Spigot-Server-Patches/Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/Configurable-Player-Collision.patch @@ -42,7 +42,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + // Paper start - Send a fake team to the client to initialize collision rule if no others exist + if (!com.destroystokyo.paper.PaperConfig.enablePlayerCollisions && !iterator.hasNext()) { -+ entityplayer.playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(new ScoreboardTeam(scoreboardserver, "collideRule"), 0)); ++ String teamName = org.apache.commons.lang3.StringUtils.left("collideRule_" + entityplayer.getWorld().random.nextInt(), 16); ++ entityplayer.playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(new ScoreboardTeam(scoreboardserver, teamName), 0)); + return; + } + // Paper end