Fabricio20 / HubBasics

Bukkit Plugin For Hub Owners
GNU Lesser General Public License v3.0
22 stars 11 forks source link

Stuck in place after voiding with anti void enabled #170

Open maxcaplan opened 3 years ago

maxcaplan commented 3 years ago

Hi

I'm having an issue where whenever a player falls off the map and is warped back to my spawn warp they can no longer move or look around.

When you try and move or look around it automatically snaps the player back to the warp position and direction. You also can't interact with the menu, it automatically closes that as well.

The only way to stop this is to either tp, warp or disconnect and reconnect to the server.

Fabricio20 commented 3 years ago

Hey there, I believe this is an issue with some anti-cheat software, do you happen to have one installed? HubBasics simply teleports the player back to the spawn when it detects void damage, which shouldn't cause the player to get locked at all, unless an anti-cheat plugin acts badly and thinks the player is flying.

maxcaplan commented 3 years ago

I don't have any anti-cheat software or plugins installed. I have tried removing all other plugins, reinstalling the plugin, and even disabling the anti void and using a different plugin for anti void, but the issue persists. At this point, I'm pretty stumped, I'm going to try and install the plugin on a completely fresh server install and see if that works.

I'm pretty sure this isn't an issue with the hubbasics plugin.

Fabricio20 commented 3 years ago

I've been aware of this issue since at least minecraft 1.5, I've also experienced it myself. I'm not sure what the exact cause is, my bet was on anti-cheat as I believe it's detecting the teleport as flight, since the velocity of the player changes from fall to zero.

The minecraft server has a built-in anti-flight mechanism enabled by default, have you by any chance disabled it for a quick test? (allow-flight to true on server.properties if I remember correctly).

I'll try to reproduce the issue on my side and see if I can find the workaround again.

Fabricio20 commented 3 years ago

Actually, if I remember correctly the solution is to teleport the player one block above ground, can you check that?

Move your spawnpoint one Y up, and then remove the block, so the player will teleport to the air and fall 1 block. Make sure no grass or other "tall" blocks are in the same Y.

maxcaplan commented 3 years ago

Alright, things got even weirder. I tested changing allow flight and moving the warp one block up earlier and neither worked. However, I tried switching my client to 1.8.9 (servers running 1.16.5) and suddenly the problem was just gone. Even when switching back to 1.16.5 the issue was still gone. So, my guess is there was something strange happening on the client side.

TGM1205 commented 3 years ago

Hello, I am also having this issues and ive tried both solutions, but none work. Has anyone found a workaround?

DarthGigi commented 3 years ago

I am experiencing the same issue

Fabricio20 commented 3 years ago

I'm unsure of the cause, as stated above, the code is as simple as "on void damage, teleport to coordinates", I have seen the issue in the past but the solution for me personally was always to just teleport 1-2 blocks above the ground. A few google searches also don't seem to come up with an explanation of the cause.

There is one possible solution, which is to detect an Y below 0, however this would hurt performance a lot, since we would need to hook into the move event.

Leomelonseeds commented 2 years ago

Hello! It seems that a solution has already been found for this problem at https://www.spigotmc.org/threads/teleport-out-of-void-bug.138745/

It would be much appreciated if this could be implemented as soon as possible, as this bug is also happening on my end.