Leashed player entered in the nether and this happend:
[20:57:05 WARN]: [LeashPlayers] Task #2637162 for LeashPlayers v1.0 generated an exception
java.lang.IllegalArgumentException: Cannot measure distance between world and world_nether
at org.bukkit.Location.distanceSquared(Location.java:510) ~[patched_1.17.jar:git-Tuinity-7]
at me.lucidus.leashplayers.LeashEvents$1.run(LeashEvents.java:68) ~[?:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:100) ~[patched_1.17.jar:git-Tuinity-7]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468) ~[patched_1.17.jar:git-Tuinity-7]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1548) ~[patched_1.17.jar:git-Tuinity-7]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:478) ~[patched_1.17.jar:git-Tuinity-7]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1463) ~[patched_1.17.jar:git-Tuinity-7]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1253) ~[patched_1.17.jar:git-Tuinity-7]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[patched_1.17.jar:git-Tuinity-7]
at java.lang.Thread.run(Thread.java:831) [?:?]
Overall does what I want it to! But there are one or two bugs:
1. The slime is visible, and although this may not be a "bug" per se it's still weird. My suggestion would be to make the slime invisible.
2. The slimes seem to persist through deaths. Not sure why.
Works pretty good for what is intended for
Here are some bugs / fixes / ideas:
1. I believe if you use NMS you can make the slime you spawn invisible before it is even summoned so that players dont see it for a slight second
2. When going through portals, teleport the leashed player as well and break the one in the other dimension
3. Gravity is a bit wonky -- if I fall down with a leashed player, they gradually descend toward the ground
4. I know it would be hard but it would be pretty cool to attach it to a fence post.