PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.7k stars 2.27k forks source link

Could not pass event PlayerQuitEvent to Playtimes v1.3.10 #5989

Closed antibitcoin closed 3 years ago

antibitcoin commented 3 years ago

Expected behavior

No errors should show when players join or leave, as the plugin logs their number of connects.

Observed/Actual behavior

[22:48:20 INFO]: player lost connection: Disconnected [22:48:20 ERROR]: Could not pass event PlayerQuitEvent to Playtimes v1.3.10 java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "org.json.simple.JSONObject.get(Object)" is null at me.codedred.playtimes.utils.Statistics.getPlayerStatistic(Statistics.java:35) ~[?:?] at me.codedred.playtimes.listeners.Quit.onQuit(Quit.java:23) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor169.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.17.jar:git-Paper-46] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.17.jar:git-Paper-46] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.jar:git-Paper-46] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.jar:git-Paper-46] at net.minecraft.server.players.PlayerList.disconnect(PlayerList.java:599) ~[patched_1.17.jar:git-Paper-46] at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:1890) ~[?:?] at net.minecraft.network.Connection.handleDisconnection(Connection.java:566) ~[?:?] at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:216) ~[?:?] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1576) ~[patched_1.17.jar:git-Paper-46] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:477) ~[patched_1.17.jar:git-Paper-46] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1404) ~[patched_1.17.jar:git-Paper-46] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1180) ~[patched_1.17.jar:git-Paper-46] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[patched_1.17.jar:git-Paper-46] at java.lang.Thread.run(Thread.java:831) [?:?]

Steps/models to reproduce

connect or disconnect from the server

Plugin list

[22:50:33 INFO]: Plugins (91): AdvancedCrates, AdvancedEnchantments, AdvancedNMotd, AltDetector, antiRedstoneClock, ArmoredElytra, ArmorStandCrashFix, AuctionHouse, AutoBroadcast, AutoPluginLoader, BanItem, BannerText, BuycraftX, ChatEx, ChatSentinel, Citizens, ClearLag, CMILib, CommandAlias, CommandPanels, CrazyEnvoy, CubCustomDrops, DeathMessages, DeluxeMenus, DeluxeTags, DiscordSRV, dtlTraders, eBackup, EnchantmentNumbers, Essentials, EssentialsGeoIP, EvenMoreFish, ExecutableItems, EZColors, FarmControl, GambleBarLite, GangsPlus, Gatekeeper, HarmonyScoreboard, HeadDatabase, HolographicDisplays, HolographicPlaceholders, HolographicScoreboard, Insights, InteractiveChat, ItemEditor, ItemSoulBind, Jobs, JoinEventsPro, LPX, LuckPerms, mcMMO, Mines, OpenInv, PL-Hide-Pro, PlaceholderAPI, PlayerParticles, PlayerVaults, Playtimes, PluginConstructorAPI, ProdigyMentionSpigot, ProtocolLib, pvpstats, Quests, Regionerator, SaveRodOfficial, SCore, ShopGUIPlus, Shopkeepers, SilkSpawners, SimpleGiveall, SimpleRename, SlotMachine, SpecializedCrates, StoreStats, TAB, TCPShield, Themis, UltimateAutoRestart, Vault, ViaBackwards, ViaVersion, ViewDistanceTweaks, VoteParty, Votifier, VotingPlugin, Vouchers, WorldBorder, WorldEdit, WorldGuard, WorldGuardExtraFlags

Paper version

[22:50:54 INFO]: This server is running Paper version git-Paper-46 (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT) (Git: 9e07703) You are running the latest version

Agreements

Other

This might be related to the plugin dev, but I reported it anyway as it might be something related to paper too. I did my part and also reported to the dev on his discord. https://www.spigotmc.org/resources/playtimes-check-players-playtime-server-uptime.58858/

Prof-Bloodstone commented 3 years ago

return value of "org.json.simple.JSONObject.get(Object)" is null

Playtime plugin is trying to parse something, which doesn't exist in the JSON. Report it to the plugin, not to us.

Machine-Maker commented 3 years ago

If the plugin had their source available publicly, I could verify that it is indeed a plugin issue and not a Paper issue but… I can’t find it anywhere.

antibitcoin commented 3 years ago

it was resolved the author updated the plugin.