This is my second tutorial. Yay party time! Just kidding, nonetheless. Let's get started. For those who want to know "well what about enabling my plugin", well when the server first starts, it enables the plugins, but when we disable it, we can't re-enable it because Bukkit pretty much trashes it until the next reload/restart. Hope you enjoy the tutorial! Example Plugin : My plugin kills everyone when 5 or less people are on and disables when 6 are on, how do I do this?? 1. Create a int for the number of people on. 2. If more than 5 people get on, disable plugin! Pseudocode below! PHP: Step 1.private int people = Bukkit.getServer().getOnlinePlayers().length; Step 2.if(people > 5) {className.Bukkit.getPluginManager().disablePlugin(className);} Hopefully, this tutorial 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 or comment if I should add more tutorials!
what if i wanted to replace the jar file. I can't replace the file with a simple 'disable' provided here. do you know how to 'stop' the jar without stopping the server?
Not possible without a ton of reflection, and replacing the jar itself isn't actually possible without a third person program
xtreampb You can use the update folder, default: plugins/update/, place your jars there and then reload, all jars will be moved and replace the existing ones in the plugins folder.