Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fly disabled when warping or otherwise teleporting between dimesions (excluding portals) #4325

Open
Nibby49 opened this issue Jul 6, 2021 · 26 comments
Labels
bug: upstream Bugs that exist in the Bukkit API or Minecraft itself. help wanted Issues that need further investigation. type: problem Problems that are not strictly bugs.
Milestone

Comments

@Nibby49
Copy link

Nibby49 commented Jul 6, 2021

Type of bug

Other unexpected behaviour

/ess version output

[17:33:19] [Server thread/INFO]: Server version: 1.17-R0.1-SNAPSHOT git-Paper-79 (MC: 1.17)
[17:33:19] [Server thread/INFO]: Brand version: Paper
[17:33:19] [Server thread/INFO]: EssentialsX version: 2.19.0-dev+196-33ca3b2
[17:33:19] [Server thread/INFO]: LuckPerms version: 5.3.47
[17:33:19] [Server thread/INFO]: Vault version: 1.7.3-b131
[17:33:19] [Server thread/INFO]: EssentialsXSpawn version: 2.19.0-dev+196-33ca3b2
[17:33:19] [Server thread/INFO]: EssentialsXChat version: 2.19.0-dev+196-33ca3b2
[17:33:19] [Server thread/INFO]: Economy Layer: None
[17:33:19] [Server thread/INFO]: Fetching version information...
[17:33:19] [Craft Scheduler Thread - 10/INFO]: You're running the latest EssentialsX dev build!

Server startup log

https://gist.github.com/Nibby49/c85f7829422fcf7b9cd2638ff664ba44

EssentialsX config files

https://gist.github.com/Nibby49/3184353698ea69d827621eaf1427899d

Error log (if applicable)

No response

Bug description

When teleporting (has tested /warp and /home) between dimensions (has tested Overworld and end), /fly gets toggled off in survival mode. This appears unrelated to the config option "world-change-fly-reset:" as using an end portal does not reproduce the issue. Player testing issue has both essentials.fly and essentials.fly.safelogin as permissions. Plugins being used are EssentialsX (including Base, Spawn, and Chat), Vault, and LuckPerms.

Steps to reproduce

  1. Ensure world-change-fly-reset is false in the config
  2. Have EssentialsX, EssentialsX Spawn, EssentialsX Chat, Vault (version 1.7.3-b131), and LuckPerms (version 5.3.47) installed.
  3. Set a home in the Overworld and a warp in the end.
  4. Have essentials.fly and essentials.fly.safelogin as permissions
  5. In the Overworld switch to Survival and toggle /fly on. Go to the warp in the End, double tap your jump key and attempt to fly. (Note: This happens when teleporting in either direction.)

Expected behaviour

Based on configuration settings and permissions, /fly should remain enabled when teleporting betweens dimensions.

Actual behaviour

/fly does not remain toggled on when teleporting between dimensions.

@Nibby49 Nibby49 added the bug: unconfirmed Potential bugs that need replicating to verify. label Jul 6, 2021
@lucky819-dev
Copy link

i have the exact same problem

@triagonal triagonal added type: problem Problems that are not strictly bugs. and removed bug: unconfirmed Potential bugs that need replicating to verify. labels Jul 8, 2021
@triagonal
Copy link
Member

triagonal commented Jul 8, 2021

This isn't an Essentials issue. I was able to reproduce the issue using a test plugin that teleported the user between dimensions and observed the same behaviour as described here without any other plugins installed. This might be an issue with the Bukkit API itself, further investigation is required.

@Nibby49
Copy link
Author

Nibby49 commented Jul 8, 2021

I am not skilled enough with java to write tests for this issue. However, please let me know if you need any more information or if I can be of any assistance. Otherwise, good luck @triagonal and the rest of the essentialsx team!

@ghost
Copy link

ghost commented Jul 15, 2021

Same issue for me,

Were using PaperMC Build 99 (Latest when issue started)
Essentials 2.19.0-dev+221

Permissions are set up right and config is right no errors or so.

@TNTUP
Copy link

TNTUP commented Jul 17, 2021

Can confirm.

EssentialsX 2.19.0-dev+221-1556b91
Paper Build#109

@triagonal triagonal added the help wanted Issues that need further investigation. label Jul 18, 2021
@remyd95
Copy link

remyd95 commented Jul 18, 2021

Can confirm, the config option does not work. Fly is always disabled, even for players with wildcard permissions.

@JRoy
Copy link
Member

JRoy commented Jul 18, 2021

After further investigation, this occurs on vanilla single player as well (1.17.1). If this didn't occur on 1.16.5, this should probably be reported to Mojang but I didn't get a chance to test that yet.

@JRoy JRoy added the bug: upstream Bugs that exist in the Bukkit API or Minecraft itself. label Jul 18, 2021
@Nibby49
Copy link
Author

Nibby49 commented Jul 19, 2021

I can confirm that this did not happen prior to 1.17 (aka 1.16.5 and down). If you would be so kind, please provide me with evidence to back up any possible bug report I am to make to Mojang. Thanks in advance!

@remyd95
Copy link

remyd95 commented Jul 19, 2021

With essentials 2.18 this problem does not occur on 1.17.1.
The problem started when we upgraded to 2.19 dev builds.

@MacTh3Mac
Copy link

have recreated this issue on a server with no essentials on it. Not an essentials issue.

@Nibby49
Copy link
Author

Nibby49 commented Aug 6, 2021

I have very limited knowledge of java, and I apologize if what I am about to suggest seems naive or uninformed, but could this issue be caused by using a specific type of code to simulate flying? I'm not sure how to further elaborate on that, but perhaps essentials updated the flying code in the development builds of 1.19.0? Apologizes again if that doesn't make sense, I'm just suggesting a theory. Regardless of the above, I would imagine it may be an issue with paper or upstream spigot seeing as other plugins are effected too.

I wish you all luck in finding a solution to this, and please let me know if you have any questions or if I can be of any assistance.

@pop4959
Copy link
Member

pop4959 commented Aug 7, 2021

@Nibby49 Essentials uses the Bukkit API to set flight abilities on the player. So yes, this is something that if anything needs to be fixed upstream. JRoy already mentioned that he was able to get this issue to occur in Vanilla. If the code being used by Bukkit isn't correct for 1.17 it will need to be updated. Otherwise, it's probably just an oversight on Mojang's end. Either way, nothing that Essentials would be directly able to fix.

@Chew
Copy link
Member

Chew commented Sep 1, 2021

As stated this is a known, easily reproducible upstream issue, and still nothing we can fix here.

@electronicboy
Copy link

electronicboy commented Sep 29, 2021

    @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
    public void onPlayerTeleport(final PlayerTeleportEvent event)
    {
        if (event.getFrom().getWorld() != event.getTo().getWorld()) {
            if (event.getPlayer().isFlying()) {
                worldTeleports.put(event.getPlayer().getUniqueId(), Bukkit.getCurrentTick());
            }
        }
    private final Map<UUID, Integer> worldTeleports = new HashMap<>();
    @EventHandler
    public void onPlayerChangeWorld(PlayerChangedWorldEvent e) {
        final Integer ifPresent = worldTeleports.remove(e.getPlayer().getUniqueId());
        if (ifPresent != null && Bukkit.getCurrentTick() == ifPresent) {
            e.getPlayer().setAllowFlight(true);
            e.getPlayer().setFlying(true);
        }

    }

Working off an old fork of the codebase here and not exactly fond of this, but, it works™ (Can easily be thrown into a standalone plugin)

This OFC is likely nuanced and not really sure it should belong in Ess but is the best "2 second" workaround I can come up with, the issue here is that mojang added a call to set the players gamemode inside of ServerPlayer#restoreFrom which sets the expected abilities for the players gamemode

edit: in testing locally this worked, in prod, it's apparently missing some stuff... trying to look at a delay to see if that helps, but, I don't see how this could fail unless there is a missing step somewhere... sigh

@TNTUP
Copy link

TNTUP commented Dec 2, 2021

Persists on 1.18 and 1.18.1 sadly :(

> ver Essentials
[02:43:26 INFO]: Essentials version 2.19.1-dev+48-c45c741
[02:43:26 INFO]: Provides an essential, core set of commands for Bukkit.
[02:43:26 INFO]: Website: https://essentialsx.net/
[02:43:26 INFO]: Authors: Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally, drtshock, vemacs, SupaHam, mdcfe, JRoy and pop4959
> ver
[02:43:27 INFO]: Checking version, please wait...
[02:43:27 INFO]: This server is running Paper version git-Paper-"13a445c" (MC: 1.18) (Implementing API version 1.18-R0.1-SNAPSHOT) (Git: 13a445c)
You are 4 version(s) behind
Download the new version at: https://papermc.io/downloads
Previous version: git-Paper-"b32a3b1" (MC: 1.17.1)

@donvdp
Copy link

donvdp commented Feb 25, 2022

this problem is still here. running the lastest version paper-1.18.1-214 in combination with latest EssentialsX dev version EssentialsX-2.19.3-dev+27-bc2da98

I have chatted in discord with electroniccat on the paper discord, and he tells me he tried to help essentials fix the problem with a github gist. He has update his code a bit. but its still the basic concept from his post above here.

https://gist.github.com/electronicboy/59a5d72024c1fc053217056499cea2c8

@mdcfe mdcfe added this to the 2.20.0 milestone Feb 28, 2022
@HexedHero
Copy link
Contributor

Any news on this?

@Leahcimkrob
Copy link

I have the same issue with Essentials 2.20.0-dev+6-ea5cdc0

@bigsmileling
Copy link

bigsmileling commented Jun 28, 2022

Any update?

@Aoredon
Copy link

Aoredon commented Jul 22, 2022

Still having issues with this

@JRoy
Copy link
Member

JRoy commented Jul 22, 2022

My comment here still applies. This is a vanilla issue and I'm not sure a workaround should be part of Essentials itself.

@mdcfe
Copy link
Member

mdcfe commented Jul 22, 2022

(apparently I never posted my thoughts on this issue in public, so here goes:)

Yes, this was a vanilla change. However, the change here breaks behaviour that is implied by EssentialsX's own config options. I would prefer we implemented a new option that lets people restore pre-1.17 behaviour if they choose (in turn restoring the functionality of our existing config option).

@TNTUP
Copy link

TNTUP commented Jul 22, 2022

Someone developed a plugin that fixes EssentialsX's fly on world change so this issue does not affect me anymore, not sure if im allowed to say that here since it would be offtopic (Sorry!)

@mdcfe
Copy link
Member

mdcfe commented Jul 22, 2022

Someone developed a plugin that fixes EssentialsX's fly on world change so this issue does not affect me anymore, not sure if im allowed to say that here since it would be offtopic (Sorry!)

It's not off-topic, but we would like to implement a solution within EssentialsX itself rather than relying on a third party plugin (since right now, the fly on world change options are useless above 1.17).

@Leahcimkrob
Copy link

Top Idea.

@ItzRobin
Copy link

Someone developed a plugin that fixes EssentialsX's fly on world change so this issue does not affect me anymore, not sure if im allowed to say that here since it would be offtopic (Sorry!)

Interesting! Maybe you can share this plugin, I would be interested to add it because I guess there is no other good alternative :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: upstream Bugs that exist in the Bukkit API or Minecraft itself. help wanted Issues that need further investigation. type: problem Problems that are not strictly bugs.
Projects
None yet
Development

No branches or pull requests