Could someone send me a code of if a player right clicks while shifting on a block it will run a command i already made?
I'm not going to spoonfeed code, but you should look into registering events, specifically the PlayerInteractEvent.
No I'm just joking I will dont give you code, but logic how to make it Sorry but no spoonfeeds. PlayerInterractEvent If player is Shifting, if event#getAction == Action#Right_Click_Block ---> player#performCommand(cmd)
@EventHandler public void rightclickstick(PlayerInteractEvent event) { Player player = event.getPlayer(); if(event.getAction() == Action.RIGHT_CLICK_BLOCK && player.isSneaking()){ if(player.getItemInHand().getType() == Material.STICK) { Would this work right?
Yes but if they have no item in hand then it will throw a Null Pointer Exception (NPE) because itemInHand is null. You should check if iteminhand is null then if so do your check for the stick Sent from my iPhone using Tapatalk