CreativeFly: Test if the player is gliding with elytra not just wearing.

While i can't use the elytra while in creative mode, others might be
able to do so with a plugin.
This commit is contained in:
asofold 2017-05-02 21:50:47 +02:00
parent bd370ba633
commit 2cca81f39a
1 changed files with 3 additions and 3 deletions

View File

@ -448,9 +448,9 @@ public class MovingConfig extends ACheckConfig {
return modelGameMode;
}
// TODO: Short touch of water/vines (/ground?) is possible - use past moves or in-medium-count.
final boolean isUsingElytra = Bridge1_9.isWearingElytra(player);
final boolean isGlidingWithElytra = Bridge1_9.isGlidingWithElytra(player);
if (player.isFlying()
|| !isUsingElytra && !ignoreAllowFlight && player.getAllowFlight()) {
|| !isGlidingWithElytra && !ignoreAllowFlight && player.getAllowFlight()) {
return modelGameMode;
}
// TODO: ORDER IS RANDOM GUESSING. Is mixtures possible?
@ -465,7 +465,7 @@ public class MovingConfig extends ACheckConfig {
// TODO: INCONSISTENT.
return modelGameMode;
}
if (isUsingElytra) { // Defensive: don't demand isGliding.
if (isGlidingWithElytra) { // Defensive: don't demand isGliding.
return flyingModelElytra;
}
// Default by game mode.