Closed TheTobiCraft1 closed 1 year ago
you are right the event is not triggered here is an example code to test it in the game
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
player.setAllowFlight(true);
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerDoubleJump(PlayerToggleFlightEvent e) {
Player player = e.getPlayer();
e.setCancelled(true);
player.setFlying(false);
player.setVelocity(player.getLocation().getDirection().multiply(3).setY(1));
}
Should be fixed with https://github.com/GeyserMC/Geyser/pull/4198 - mind testing it? The build can be downloaded in the Checks
tab on the PR.
Thanks
This is not yet fixed, but will be once the PR is merged - itll be closed automatically then :) Additionally, can you test said PR?
Describe the bug
Bukkit PlayerToggleFlightEvent doesn't fire when I toggle flight in creative mode or with allow flight enabled. In 1.20 it worked.
To Reproduce
Expected behaviour
The PlayerToggleFlightEvent should fire. On java it works just fine.
Screenshots / Videos
No response
Server Version and Plugins
No response
Geyser Dump
No response
Geyser Version
2.2.0-SNAPSHOT (git-master-89d7225)
Minecraft: Bedrock Edition Device/Version
1.20.31, Windows
Additional Context
No response