Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Team name cannot be null!" #5

Open
tboba opened this issue Jan 15, 2021 · 3 comments
Open

Error "Team name cannot be null!" #5

tboba opened this issue Jan 15, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tboba
Copy link

tboba commented Jan 15, 2021

Hi. I'm using plugin board on my server. Rarely, it spams an error "Team name cannot be null!" 🤔

Spigot version: "Paper version git-Paper-243 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)"

[15:28:10 WARN]: [MyPlugin] Task #2981 for MyPlugin v1.0 generated an exception
java.lang.IllegalArgumentException: Team name cannot be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[patched_1.14.4.jar:git-Paper-243]
        at org.bukkit.craftbukkit.v1_14_R1.scoreboard.CraftScoreboard.getTeam(CraftScoreboard.java:146) ~[patched_1.14.4.jar:git-Paper-243]
        at me.missionary.board.board.Board.update(Board.java:102) ~[?:?]
        at me.missionary.board.board.tasks.BoardUpdateTask.lambda$run$2(BoardUpdateTask.java:23) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_275]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_275]
        at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet.lambda$entryConsumer$0(Collections.java:1577) ~[?:1.8.0_275]
        at java.util.concurrent.ConcurrentHashMap$EntrySpliterator.forEachRemaining(ConcurrentHashMap.java:3606) ~[?:1.8.0_275]
        at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntrySetSpliterator.forEachRemaining(Collections.java:1602) ~[?:1.8.0_275]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_275]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_275]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0_275]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0_275]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_275]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_275]
        at me.missionary.board.board.tasks.BoardUpdateTask.run(BoardUpdateTask.java:23) ~[?:?]
        at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.14.4.jar:git-Paper-243]
        at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452) ~[patched_1.14.4.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1171) ~[patched_1.14.4.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:417) ~[patched_1.14.4.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1098) ~[patched_1.14.4.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:925) ~[patched_1.14.4.jar:git-Paper-243]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]
@tboba
Copy link
Author

tboba commented Jan 15, 2021

Okay, I learned that this warning appears only when the number of lines is higher than 15, which I assume is a number of the maximum shown lines on the scoreboard. Is it possible to add an error when the Player is trying to show higher number of lines than 15? This error should also end all refresh tasks to don't show the same warning every x seconds/ticks.

@missionarydev missionarydev self-assigned this Jan 24, 2021
@missionarydev missionarydev added wontfix This will not be worked on enhancement New feature or request good first issue Good for newcomers and removed wontfix This will not be worked on labels Jan 24, 2021
@missionarydev
Copy link
Owner

missionarydev commented Jan 24, 2021

Version 1.14 of Minecraft is not "officially" supported with this library, it's geared more towards 1.7.x & 1.8.x. I'm not familiar with the newer versions of Minecraft and what the limitations of scoreboards are with those versions, although nothing looks like it has changed. Feel free to make a PR with any added changes.

@tboba
Copy link
Author

tboba commented Feb 18, 2021

@missionarydev sure!
I'll create a PR with that changes on my free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants