Fixes an issue where changing dimensions via /home would reset the flight ability
22 lines
No EOL
536 B
Java
22 lines
No EOL
536 B
Java
package dev.zontreck.otemod.configs;
|
|
|
|
import net.minecraft.server.level.ServerPlayer;
|
|
|
|
public class PlayerFlyCache
|
|
{
|
|
public boolean FlyEnabled;
|
|
public boolean Flying;
|
|
public static PlayerFlyCache cachePlayer(ServerPlayer play){
|
|
PlayerFlyCache cache = new PlayerFlyCache();
|
|
cache.FlyEnabled = play.getAbilities().mayfly;
|
|
cache.Flying = play.getAbilities().flying;
|
|
|
|
play.onUpdateAbilities();
|
|
|
|
return cache;
|
|
}
|
|
|
|
public void Assert(ServerPlayer play){
|
|
|
|
}
|
|
} |