ServiceInfoSnapshotUtil.getPlayers ist immer Null
See original GitHub issueHey Ihr Lieben,
ich weiß nicht ob das ein Bug ist oder ich etwas falsch mache aber wenn ich ServiceInfoSnapshotUtil.getPlayers(serviceInfoSnapshot) bekomme ich immer null zurück.
P.S. Das ist nur bei getPlayers null
Im code habe ich das stehen:
for (ServiceInfoSnapshot serviceInfoSnapshot : CloudNetDriver.getInstance().getCloudService("Lobby")) {
int players = ServiceInfoSnapshotUtil.getPlayers(serviceInfoSnapshot).size();
und players ist immer null.
und dieser Error kommt:
[30.07 21:23:33.763] INFO: [Lobby-1] org.bukkit.event.EventException: null
[30.07 21:23:33.763] INFO: [Lobby-1] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:235) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:202) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:198) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:991) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:26) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
[30.07 21:23:33.763] INFO: [Lobby-1] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.763] INFO: [Lobby-1] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
[30.07 21:23:33.763] INFO: [Lobby-1] Caused by: java.lang.NullPointerException
[30.07 21:23:33.764] INFO: [Lobby-1] at de.wildcards.lobbysystem.listeners.SwitcherMenu.invMenu(SwitcherMenu.java:53) ~[?:?]
[30.07 21:23:33.764] INFO: [Lobby-1] at de.wildcards.lobbysystem.listeners.SwitcherMenu.onPlayerInteract(SwitcherMenu.java:32) ~[?:?]
[30.07 21:23:33.764] INFO: [Lobby-1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
[30.07 21:23:33.764] INFO: [Lobby-1] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]
[30.07 21:23:33.764] INFO: [Lobby-1] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
[30.07 21:23:33.855] INFO: [Lobby-1] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
[30.07 21:23:33.855] INFO: [Lobby-1] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
[30.07 21:23:33.856] INFO: [Lobby-1] ... 18 more
Minecraft version: Spigot 1.12.2 OS: Linux Debian
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Issue-Label Bot is automatically applying the label
bug
to this issue, with a confidence of 0.83. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.
Das funktioniert Wunderbar aber ist nicht die Optimalste lösung. Danke @McRuben