CodedRed-Spigot / PlayTimes

The best /playtime plugin! PAPI support, offline checks, API & more!
https://www.spigotmc.org/resources/playtimes-check-players-playtime-server-uptime.58858/
GNU General Public License v3.0
9 stars 12 forks source link

Issue when running /topplayt is shoots an error in the console but it works? #41

Closed Talesu closed 4 months ago

Talesu commented 7 months ago

Here is a snippet of the error ingame. image

And here is the error in console.

[20:08:52 INFO]: Talesu issued server command: /topplayt
[20:08:52 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'topplayt' in plugin Playtimes v1.5.3
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[pufferfish-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[pufferfish-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:987) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at org.bukkit.craftbukkit.v1_20_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265) ~[pufferfish-1.20.1.jar:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:324) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:308) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2355) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2315) ~[?:?]
        at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1340) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1317) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1310) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1288) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1176) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at java.lang.Thread.run(Thread.java:1589) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "replacement" is null
        at java.lang.String.replace(String.java:2967) ~[?:?]
        at me.codedred.playtimes.commands.TopTime.onCommand(TopTime.java:84) ~[PlayTimes-1.5.3.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[pufferfish-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        ... 23 more

Any idea what it could be?

CodedRedGIT commented 7 months ago

Thanks for reporting! I will have a bug fix update out either later today or by afternoon tomorrow. In the meanwhile, could you provide the following info:

Talesu commented 7 months ago

1.20.1 Yes latest Premium (online)

CodedRedGIT commented 7 months ago

Thank you. I was unable to recreate the issue you are getting. However, I will be implementing some changes to hopefully resolve your issue. Unfortunately, I need more time to implement this and will most likely have it completed after work today.

EDIT: The release of this bug fix will be coming with the next feature update. End of the week at the latest, working on the database + more features.