#On join action is too fast!

1 messages · Page 1 of 1 (latest)

red knot
#

So I made a script that execute commands when a player join, but the thing is that this command don't work if the player is offline. So when the player join part of the commands actually execute but the first one don't due to the player not being fully connected is there a way to fix that ? (right now I just added a "wait 2 seconds" line before the first command but I think someone could be slower than 2 seconds before logging in

Here is an example with my geyser alt account we can clearly see the error message before the player connecting:

[00:01:27] [defaultEventLoopGroup-7-2/INFO]: [Geyser-Spigot] neas2158 (logged in as: neas2158) has connected to the Java server
[00:01:27] [Server thread/INFO]: [floodgate] Floodgate player logged in as neas2158 joined (UUID: 00000000-0000-0000-0009-01f844ec850a)
[00:01:27] [Server thread/INFO]: <Quests> An error occurred while executing this command.
[00:01:27] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "fr.skytasul.quests.api.players.PlayerAccount.getQuestsDatas()" because "acc" is null
[00:01:27] [Server thread/WARN]:     at beautyquests-1.0.2.jar//fr.skytasul.quests.commands.CommandsPlayerManagement.resetPlayer(CommandsPlayerManagement.java:195)
[00:01:27] [Server thread/INFO]: neas2158[/70.83.239.25:0] logged in with entity id 187502 at ([world]-371.42218, 80.0, -807.68646)
[00:01:27] [Server thread/INFO]: [+] neas2158 steps into Altimeria.```
whole mortar
#

add a longer wait ig

grave lodge
#

^