Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Handler {
- @SubscribeEvent
- public void onEntityUpdate(TickEvent.PlayerTickEvent event){
- if(event.phase != TickEvent.Phase.START|| !event.player.worldObj.isRemote) return;
- if(event.player.getCurrentArmor(2).getItem() != doPreInit.fairysunwings){
- if(!event.player.capabilities.isCreativeMode) event.player.capabilities.allowFlying = false; event.player.capabilities.isFlying = false;
- }
- else {
- event.player.capabilities.allowFlying = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement