Posted December 28, 20186 yr I want to add a new enchantment that activates an ability when sneaking (player pressing shift). I tried looking all types of PlayerEvent and there doesn't seem to be anyone related to sneaking. Any help?
December 28, 20186 yr Author Nvm, found it, this is the solution for anyone else wondering: public static void sneakBoost(InputUpdateEvent event){ if (event.getMovementInput().sneak){ // rest of the code
December 28, 20186 yr Also you could use one of the TickEvents, like PlayerTickEvent and check from there if the player is sneaking. Edited December 28, 20186 yr by Toma™
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.