Fix #3161 flight bar drained by creative/spectator

This commit is contained in:
Vincent Lee committed 2020-02-04 16:59:04 -06:00
1 parent 10ac3c3067
commit 9006e7c795
1 file changed
+2 -1
@@ -257,7 +257,8 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem {
Vector3 look = new Vector3(p.getLookVec()).multiply(1, 0, 1).normalize();
if(flying) {
if(time > 0 && !ItemNBTHelper.getBoolean(stack, TAG_INFINITE_FLIGHT, false))
if(time > 0 && !p.isSpectator() && !p.isCreative()
&& !ItemNBTHelper.getBoolean(stack, TAG_INFINITE_FLIGHT, false))
newTime--;
final int maxCd = 80;
int cooldown = ItemNBTHelper.getInt(stack, TAG_DASH_COOLDOWN, 0);