How would I get a bow to cycle on effects eg: if i were to press shift an left click it would cycle through arrow types like lightning arrow, explosive arrows, flame arrows.
I would suggest putting all the effects you want as a possibility in an array and then going through each value when they click a certain key or left click(PlayerInteractEvent). Of course, you'd need to add methods to get the effects, then add them, etc.
Code:java //First thing is the hashmap to store the data per playerpublic Map<String, EnumTypes> current = new HashMap<String, EnumTypes>();//The class EnumTypes is something you have to make, it's an easy way to keep track of the names and such, or you can just replace EnumTypes with String if you want to use "Fire" instead of EnumTypes.Fire//Next thing is the method public EnumTypes /*Or String */ cycle(Player player /*The player who is cycling*/){ //Just to make sure the map contains the player if(!current.containsKey(player.getName()))current.put(player.getName(), EnumTypes.Fire /*Or "Fire" or whatever your types are*/); //Now the map definitly contains the player //Let's get what mode the player is on, in case they're not on "Fire" EnumTypes mode = current.get(player.getName()); //Now we have their mode //Now we can use this to compare and figure out what to switch it to if(mode == EnumTypes.Fire){ //They have fire mode current.put(player.getName(), EnumTypes.Slow); //Put their mode to Slow return EnumTypes.Slow; //Return the current type so that it will stop the method } //You can add as many of these checks to change as you want, but i will just use two //The last one has to return it back to the first mode, or fire for me. if(mode == EnumTypes.Slow){ current.put(player.getName(), EnumTypes.Fire); return EnumTypes.Fire; } //Now just listen for PlayerInteractEvent and check if they are sneaking! (player.isSneaking()) then call this method} Hope i helped!