Posted September 8, 20214 yr I am having trouble getting players to fly in survival mode! I change the players mayfly boolean but I don't see the player.sendAbilitiesUpdate(); method anymore. I don’t think it is available to use. My code so far: @Override public void command() { command = Commands.literal("fly").executes( (commandContext) -> {return fly(commandContext);} ); } private int fly(CommandContext<CommandSourceStack> commandContext) throws CommandSyntaxException { Player player = commandContext.getSource().getPlayerOrException(); player.getAbilities().mayfly = !player.getAbilities().mayfly; commandContext.getSource().sendSuccess(Msg.buildMessage("Fly set to : "+player.getAbilities().mayfly), false); return 1; } Edited September 8, 20214 yr by X_ZombieSlayer_X Error fixing
September 8, 20214 yr which version did you use and what did you mean by "I don't player.sendAbilitiesUpdate(); method anymore."
September 8, 20214 yr Author 11 hours ago, Luis_ST said: which version did you use and what did you mean by "I don't player.sendAbilitiesUpdate(); method anymore." I am not at my computer at the moment. I meant I don’t see the player.sendAbilitiesUpdate method anymore. It is no longer there to use.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.