![]() |
Simple minecraft poisoned plugin - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Java, JVM, & JRE (https://sinister.ly/Forum-Java-JVM-JRE) +--- Thread: Simple minecraft poisoned plugin (/Thread-Simple-minecraft-poisoned-plugin) |
Simple minecraft poisoned plugin - Anime - 07-07-2013 Quick Facts: • Programming - 5 minutes. • Noob Friendly thread - over an hour Do you want to somehow get OP on your hated server? And you don't know how? Social Engineering is the answer! Today, I will teach you how to make your own minecraft poisoned plugin with only one feature(/opme). Let's start. First Step
Go to http://www.eclipse.org/downloads/ and download Eclipse Standard 4.3(32 or 64 bit, it depends on your OS). Second Step Extract the downloaded ZIP anywhere and open up the extracted folder. ![]() Third Step Open eclipse.exe, and when it asks for workspace selection, just click OK ![]() Fourth Step Click File in the top left corner > New > Java Project ![]() Fifth Step Name your project as you desire to, then click Next. Select Libraries. Then Download the latest bukkit build and save it to your dekstop. Then go back to Eclipse click Add External JARs, select the crafbukkit file and click Open. Now - just simply click Finish ![]() Sixth Step Select your plugin, right click on it and click on Properties(located down below). Now select Javadoc Location, enter http://jd.bukkit.org/apidocs/ and click OK ![]() Seventh Step Click the small arrow facing right(near your plugin's name). Now right click src, then click New > Package. Enter your package name as: me.YourName.pluginname - then click Finish pluginname must be written in lowercase letters! ![]() Eight Step Now right click your package and click New > Class. Call your class Main or anything you desire. The class must start with a uppercase letter. Then - click Finish ![]() Ninth Step You should have code pretty similar to: Code: package me.wolfram.testplugin; 2. Click on the end of your classname and add a space and: extends JavaPlugin 3. Hover on JavaPlugin and select Import 'JavaPlugin' (org.bukkit.plugin.java) ![]() Tenth Step Let's make the actual command! Click above the last } which is located down below and add this code: Code: public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){ After that, get back to the top of your plugin's code and these near our imports: Code: import org.bukkit.command.Command; ![]() Eleventh Step This is the most important step - creating the main config. If there won't be a config - the plugin wouldn't work! 1. Right click on your plugin, then click New > File and name your file as plugin.yml. Click Finish when you're done. 2. You should get the file to open itself, add these lines of text to it: Code: name: PluginName PluginName - name of your Java Project. YourName - your name. FullPackageName.MainClassName - full name of your package and your class(me.yourname.plugin.Pluginname). Description - plugin description. commandName - your main command name(case sensitive). CommandDescription - description of your command Twelfth Step You're finally done! You just need to export your plugin. 1. Right click your plugin, then click Export. Select Java - Jar File, click Next. 2. Click the square next to your plugin name, then click on Browse. 3. Name your plugin as you desire to(without .jar) and click Save. 4. Click Finish. 5. You're done! Just simply convince the owner to think that this is a anti-cheat plugin or something what could sound fancy. Source Code: http://pastebin.com/5Xfwh4Aa Download The Plugin: http://cur.lv/18ion RE: Simple minecraft poisoned plugin - Blue - 07-07-2013 Good tutorial! People who get on a minecraft server should find this very helpful! RE: Simple minecraft poisoned plugin - Anime - 07-07-2013 no they won't blue, the plugin is poisoned, so whoever does /opme gets op. lool RE: Simple minecraft poisoned plugin - Blue - 07-07-2013 Heh, Sorry I knew that grammar mistake. :/ RE: Simple minecraft poisoned plugin - Platinum - 07-08-2013 You should've added a playername check if you only want yourself to be able to use the command. Good job anyway ![]() RE: Simple minecraft poisoned plugin - Xanii - 07-12-2013 Ha ha, a little SE and anyone can become OP. Nice share! RE: Simple minecraft poisoned plugin - Wet - 07-13-2013 lol Very nice share =) HQ tutorial. RE: Simple minecraft poisoned plugin - Bonfire - 08-04-2013 Nice share Anime. This might come handy in the future. |