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

[BUG] Could not pass event PlayerJoinEvent to UltimateTeams v2.5 #46

Open
aShanki opened this issue Nov 24, 2024 · 2 comments
Open

[BUG] Could not pass event PlayerJoinEvent to UltimateTeams v2.5 #46

aShanki opened this issue Nov 24, 2024 · 2 comments

Comments

@aShanki
Copy link

aShanki commented Nov 24, 2024

Describe the bug
Plugin throws a NullPointerException during the PlayerJoinEvent. The issue occurs because the teamPlayer object is null, leading to a failure when attempting to call setLastPlayerName(String) on it. Probably due to Floodgate and invalid username registration

To Reproduce
Steps to reproduce the behavior:

  1. Install the UltimateTeams v2.5 plugin on a Minecraft server.
  2. Install and configure Floodgate to allow Bedrock players to join the server.
  3. Have a Bedrock player join the server.
  4. Observe the server console for the error related to PlayerJoinEvent.

Expected behavior
When a player joins, the setLastPlayerName method should update the player’s name without throwing a NullPointerException.

Screenshots
Not applicable for this issue.

Plugin version
UltimateTeams v2.5

Additional context

java.lang.NullPointerException: Cannot invoke "dev.xf3d3.ultimateteams.models.TeamPlayer.setLastPlayerName(String)" because "teamPlayer" is null
        at UltimateTeams-2.5.jar/dev.xf3d3.ultimateteams.utils.UsersStorageUtil.updatePlayerName(UsersStorageUtil.java:148) ~[UltimateTeams-2.5.jar:?]
        at UltimateTeams-2.5.jar/dev.xf3d3.ultimateteams.listeners.PlayerConnectEvent.onBedrockPlayerJoin(PlayerConnectEvent.java:39) ~[UltimateTeams-2.5.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor298.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-21-cfa3c61]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:347) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.network.ServerConfigurationPacketListenerImpl.handleConfigurationFinished(ServerConfigurationPacketListenerImpl.java:173) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.handle(ServerboundFinishConfigurationPacket.java:22) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.handle(ServerboundFinishConfigurationPacket.java:13) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1542) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1519) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1512) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1634) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1303) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[pufferfish-1.21.1.jar:1.21.1-21-cfa3c61]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[13:08:04 INFO]: .Aash_the_beast[/49.36.177.77:58984] logged in with entity id 32255 at ([world]-2436.30001, 51.0, 1307.5321)```
@xF3d33
Copy link
Owner

xF3d33 commented Dec 8, 2024

I think you didn't activate the floodgate API correctly since it is a little tricky. Can you check that the floodgate's api is working correctly? You can check their wiki to know how to do that

@aShanki
Copy link
Author

aShanki commented Dec 11, 2024

I did activate it, all other plugins that relied on it worked flawlessly. This'll be my last comment on this as I've uninstalled the plugin and share no other logs or test configurations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants