File tree Expand file tree Collapse file tree
src/main/java/fr/maxlego08/essentials/listener Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -291,10 +291,10 @@ public void onChangeWorld(PlayerChangedWorldEvent event) {
291291 var configuration = plugin .getConfiguration ();
292292 var worldName = player .getWorld ().getName ();
293293
294- if (configuration .getDisableFlyWorld ().contains (worldName ) && player .isFlying () && !hasPermission (player , Permission .ESSENTIALS_FLY_BYPASS_WORLD )) {
294+ if (configuration .getDisableFlyWorld ().contains (worldName ) && player .getAllowFlight () && !hasPermission (player , Permission .ESSENTIALS_FLY_BYPASS_WORLD )) {
295295
296- player .setAllowFlight (false );
297296 player .setFlying (false );
297+ player .setAllowFlight (false );
298298 player .setMetadata ("zessentials-fly" , new FixedMetadataValue (this .plugin , true ));
299299 message (player , Message .COMMAND_FLY_ERROR_WORLD );
300300 } else if (configuration .isEnableFlyReturn () && !configuration .getDisableFlyWorld ().contains (worldName ) && player .hasMetadata ("zessentials-fly" )) {
You can’t perform that action at this time.
0 commit comments