Let me start off by saying I don't know if I can post this here or if there's even a section for tutorials on Bukkit. But, if so I will be posting tutorials on kind of simple things that some people have trouble with. Hopefully, this will inspire some brand new fresh creative plugins and I hope everyone can learn something new! Thanks for reading! Example Plugin : My plugin performs a event when something is toggle on/true. So, let's get done to it! 1. Make a boolean, it should be public & static so it can be accessed by other classes.If your using just one class, then it can just be a boolean with a name. 2. Now, just make it so that when something happens, it toggles. 3. Now, just add that if the boolean is true/false, something happens. 4. Done (Pseudocode Below!) PHP: Step 1. One Class : boolean toggle;Multiple Classes : public static boolean toggle;//Toggle is our name! Step 2. Command Toggle : if(player.types("/toggle")) {One Class : toggle = !toggle;Multiple Classes : ClassName.toggle = !ClassName.toggle;//This means if our toggle is true, it makes it false//If our toggle is false, it makes it true} Action Toggle :@EventHandlerpublic void onPoop(PlayerPoopEvent e) {if(player.isOp && player.poops) {toggle = !toggle; //One ClassClassName.toggle = !ClassName.toggle; //Multiple Classes}} Step 3. if(toggle) { //If our boolean is trueplayer.sendMessage("STOP POOPING!");} else {player.sendMessage("GOOD JOB NOT POOPING!");} Step 4. DONE! Hopefully, this tutorial belongs/is allowed here and it both encourages and inspires developers to make more tutorials and/or to try to make more creative and advanced plugins! Thanks for reading. Leave a like if this tutorial helped you. If this is allowed here, comment if I should add more tutorials!
best not to use static, even though it adds significant complexity to the psudo code. EDIT: Please feel free to contribute to the bukkit wiki
Thanks, I knew about the Resources section, but I thought it was more for API's and Dev. Tools, hopefully a staff can move this there.