Xitee1 / PowerBoard

Minecraft plugin for Scoreboard, Tablist, Prefixes, Suffixes, Chat | Animated
GNU General Public License v3.0
11 stars 4 forks source link

IllegalArgumentException: A team with the name '998team-68' already exists! #21

Closed Xitee1 closed 1 year ago

Xitee1 commented 2 years ago

Reported by @nytedemon12 on Discord

Sometimes this error occurs although there is already a check if the team exists (but maybe the wrong way)?

The code: https://github.com/Xitee1/PowerBoard/blob/cfbf67a0986e3a85f17a483c4d500e64125b811e/src/de/xite/scoreboard/modules/ranks/RankManager.java#L136-L138

The error:

[INFO] java.lang.IllegalArgumentException: A team with the name '998team-68' already exists!
07.10 01:19:36 [Server] [INFO] at net.minecraft.scoreboard.Scoreboard.func_96527_f(SourceFile:188) ~[?:?]
07.10 01:19:36 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewTeam(CraftScoreboard.java:192) ~[forge:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.modules.ranks.RankManager.setTablistRanks(RankManager.java:138) ~[?:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.modules.ranks.RankManager.register(RankManager.java:28) ~[?:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.modules.ranks.RankManager.updateTablistRanks(RankManager.java:169) ~[?:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.depend.LuckPermsListener$1.run(LuckPermsListener.java:33) ~[?:?]
07.10 01:19:36 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[forge:?]
07.10 01:19:36 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [forge:?]
07.10 01:19:36 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
07.10 01:19:36 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
07.10 01:19:36 [Server] [INFO] at java.lang.Thread.run(Thread.java:829) [?:?]
07.10 01:19:36 [Server] Craft Scheduler Thread - 230/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:36 [Server] Craft Scheduler Thread - 249/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:36 [Server] Craft Scheduler Thread - 246/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:36 [Server] Craft Scheduler Thread - 239/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:40 [Server] luckperms-worker-13/[INFO] [LuckPerms] User Housekeeper: unloading user data for 7e6ba872-1ded-4e56-8fb2-c8ef46930296
07.10 01:19:41 [Server] Server thread/[INFO] [PowerBoard] Updating SilverBodyGuard's rank..
07.10 01:19:41 [Server] Server thread/[INFO] [PowerBoard] The player SilverBodyGuard has the rank (luckperms-api): Group: default; Prefix: &7[Adventurer] ; Suffix: ; NamColor: §7; Displayname: ; Chatprefix: &7[Adventurer]  %player_name% &7»
Xitee1 commented 1 year ago

I've just got this issue myself. Seems to be related to server crashes / no proper shutdowns.

Xitee1 commented 1 year ago

Fixed in ce0ead361571b234c949530ad66019045648c898.