WiIIiam278/HuskHomes

Cross-server teleport from console throwing an error

Dagrond opened this issue · 1 comments

I have huskHomes on spigot setup (via redis) with following structure:

Player "Dagrond" on server A
Player "Dnorgad" on server B.

When I type "tp Dnorgad Dagrond" on server's A console, I get following error:

[12:17:53 WARN]: [HuskHomes] Plugin HuskHomes v4.7 generated an exception while executing task 1537542
java.lang.NullPointerException: null
        at java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
        at net.william278.huskhomes.teleport.TeleportationException.displayMessage(TeleportationException.java:43) ~[HuskHomes-Paper-4.7.jar:?]
        at net.william278.huskhomes.teleport.TeleportBuilder.buildAndComplete(TeleportBuilder.java:78) ~[HuskHomes-Paper-4.7.jar:?]
        at net.william278.huskhomes.command.TpCommand.execute(TpCommand.java:109) ~[HuskHomes-Paper-4.7.jar:?]
        at net.william278.huskhomes.command.TpCommand.execute(TpCommand.java:53) ~[HuskHomes-Paper-4.7.jar:?]
        at net.william278.huskhomes.command.Command.lambda$onExecuted$0(Command.java:49) ~[HuskHomes-Paper-4.7.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.4.jar:git-Purpur-2176]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.20.4.jar:git-Purpur-2176]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]

It is not happening when typing reverse, eg. "tp Dagrond Dnorgad".
Same error happens When I have warp/spawn on server A and try to teleport player from server B to that warp using /warp.

It seems like an error because I can use ingame /tphere command to teleport player from server B to my location on server A.
Also, using ingame /tp Dnorgad Dagrond command is working fine... Which is basically doing exact same thing lol.
But using ingame /spawn Dnorgad when player is not on that server is also causing this error. Unless, player is on same server.

This error should no longer be thrown and a friendly error displayed instead

Cross-server teleportation requires a player online on the server the command was executed on