Click the src link for the Recommended for the latest version, currently is 1. Just right click on the file and select 7-zip and Extract Files. Copy all the files that you just extracted and put them into the forge folder. Open a command window again. Go to Start and in the text box enter cmd and press enter.
You may have to change the username and the path to the forge folder. Use cd.. Type gradlew setupDecompWorkspace and press enter. On a Mac you would just type gradlew eclipse instead. If you have other editors, simply replace them in the command such as gradlew setupDecompWorkspace idea Setup your forge as the new workspcae folder which is inside the eclipse folder. Share this: Twitter Facebook. If you have successfully imported the Spigot-API, you will be able to import JavaPlugin by adding the import statement.
You do not need to manually type that line, simply click the error and select the appropriate action. Your code should now look like:. The JavaPlugin class has some abstract methods which must be implemented by your plugin.
Hence, add the onEnable and onDisable functions which will be triggered when the plugin is disabled or enabled in the console. You can leave these blank for now. You are also required to write Override above the method.
Note: You do not need to add a getLogger when your plugin is enabled or disabled, Bukkit already does that for you. Name it plugin. Paste in the following:. Since there are no errors, we can export this project as a JAR. Right-click on the project name, select Export. In the consequential dialogue box, select JAR file.
Click Next. You can uncheck the classpath and project include and change the export destination to your plugins folder. Example Prerequisite This guide assumes you have already used BuildTools and have run the Spigot server at least once.
0コメント