TownyFlight icon indicating copy to clipboard operation
TownyFlight copied to clipboard

Infinite Flight

Open buildin1 opened this issue 1 year ago • 11 comments

BUG: If players have enabled fly within their territory, using teleportation features of home-type plugins will not cancel their flight. For example, after I input /tfly and then use /home to teleport back to my home, the flight status remains active, resulting in players being able to use flight indefinitely, and all forced teleportation plugins take effect.

buildin1 avatar Nov 23 '24 18:11 buildin1

TownyFlight already listens for players that have teleported, and then checks if they can fly at that location, removing flight if they cannot.

https://github.com/TownyAdvanced/TownyFlight/blob/master/src/main/java/com/gmail/llmdlio/townyflight/listeners/PlayerTeleportListener.java

Perhaps your home-type plugins are not throwing PlayerTeleportEvents when they teleport players.

LlmDl avatar Nov 23 '24 18:11 LlmDl

Players can indeed exploit this bug to achieve infinite flight. You can try using plugins like HuskHome; after establishing a town and taking off with tfly, if you use /spawn while in the air, you'll find that your flight is not disabled, and players continue to fly.

buildin1 avatar Nov 23 '24 18:11 buildin1

Does this fix it: https://cdn.discordapp.com/attachments/669247087329673228/1309958288800088095/TownyFlight-1.13.1.jar?ex=67437939&is=674227b9&hm=8fc07183c9eaf03c3c0feb2574d4830222f3cf65fd129c9563660fc531d6a98e&

LlmDl avatar Nov 23 '24 19:11 LlmDl

This is the demonstration video I made https://github.com/user-attachments/assets/b6fa3b54-2d01-4674-ab29-fc055e5af4f2

buildin1 avatar Nov 23 '24 19:11 buildin1

这是我制作的演示视频 https://github.com/user-attachments/assets/b6fa3b54-2d01-4674-ab29-fc055e5af4f2

This is using the latest plugin just now

buildin1 avatar Nov 23 '24 19:11 buildin1

From the video I cannot tell where you teleported to, but it allowed you to continue flying, probably because you're allowed to fly at that location.

LlmDl avatar Nov 23 '24 19:11 LlmDl

Because I cannot record excessively long videos for uploading, but this is a rough way to break through the restrictions. The spawn in the video is an area without any towns, and flying is not allowed here. However, infinite flying can be achieved through the methods shown in the video. Please watch my next demonstration video

buildin1 avatar Nov 23 '24 19:11 buildin1

I feel that it may be related to the judgment of town. In the recent test, if you use the teleportation function to leave the town, it will not show that you are in the wilderness

buildin1 avatar Nov 23 '24 19:11 buildin1

In this video, the starting position of the video is my town, and the block directly in front of me is a wilderness area where flying is not allowed. A home has been set in the block directly in front of me. When I return to the town using fly and enter home in mid air, I break through the flight restriction

https://github.com/user-attachments/assets/e267028c-8bb0-48a4-b565-be6b22096abd

buildin1 avatar Nov 23 '24 19:11 buildin1

Is that using HuskHomes?

Stop your server. Start your server, let it load completely, then stop it. A new latest.log will be created in your logs folder. Please upload it to a paste-service like https://paste.ee/ and then copy the URL here.

You skipped the form for issues so I don't know what your server is doing.

This bug is not something I can reproduce.

LlmDl avatar Nov 23 '24 19:11 LlmDl

Okay, I will provide you with a complete log tomorrow, as I speculate that there may be an issue with the town's own transmission judgment. I will provide feedback at the same time in town tomorrow

buildin1 avatar Nov 23 '24 19:11 buildin1