aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-08-18 16:19:31 +0200
committerDoKM <mcazzyman@gmail.com>2021-08-18 16:23:30 +0200
commitcbdbc5f2901d7bb7eeb568cdf530ccf4a64e2f0b (patch)
tree806fa48915164b1040a949dffafc40a2f98600bb /src/main/java/io
parent3c304b3c3fea6c34598728640ddb6740283658e9 (diff)
downloadNotEnoughUpdates-cbdbc5f2901d7bb7eeb568cdf530ccf4a64e2f0b.tar.gz
NotEnoughUpdates-cbdbc5f2901d7bb7eeb568cdf530ccf4a64e2f0b.tar.bz2
NotEnoughUpdates-cbdbc5f2901d7bb7eeb568cdf530ccf4a64e2f0b.zip
Fix a duplicate value exception in capemanger slow update
Somehow there can be two exact players in the theworld.playerEntities https://hst.sh/enuvamecef
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java
index 583e3715..75a63644 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java
@@ -312,7 +312,9 @@ public class CapeManager {
playerMap.clear();
for(EntityPlayer player : Minecraft.getMinecraft().theWorld.playerEntities) {
String uuid = player.getUniqueID().toString().replace("-", "");
- playerMap.put(uuid, player);
+ try {
+ playerMap.put(uuid, player);
+ } catch(IllegalArgumentException ignored){}
}
}