This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I have this problém I want fly when player´s NBT data "postava" is two but game crashes when I join world.
Here is the code
public class flying { //public EntityPlayer player; @SubscribeEvent void plaierJoin(EntityJoinWorldEvent e){ //player.addChatComponentMessage(IChatComponentText IChatComponent) new ChatComponentText("hrac je víla"). . CanFly(null, null); } public void CanFly(NBTTagCompound nbt, EntityPlayer player){ if (nbt.getInteger("postava")==2) { player.capabilities.allowFlying = true; } else { player.capabilities.allowFlying = false; player.capabilities.isFlying = false;}; }; }
I have this problém I want fly when player´s NBT data "postava" is two but game crashes when I join world.
Here is the code