Installing the plugin

The installation of the new plugin is quite simple. You need to create a copy of the .jar file from the directory that you chose earlier in your server's plugins folder. Then, start your server as you normally would. You will see the output of the console informing you that the plugin is loaded, as shown in the following screenshot:

Installing the plugin

If you do not see the Hello World! message when your server initially starts, don't worry. This behavior is normal because at this point, there will never be players online for the message to be broadcasted to. For now, we are only concerned with the messages that were highlighted in the previous screenshot.

Every time you make changes to the code, you will have to build a new JAR file and install the new version. To install the newer version, you can simply copy and paste it into the server's plugin folder and overwrite the old file. This can be usually done without even shutting down the server. However, if the server is running, you will need to use the reload command to load the new version.

If you do not wish to manually copy the plugin .jar file and paste it in the server's plugin folder every time you make changes in the code, then you can automate it in build.xml. In addition to copying the jar file and pasting it in the Plugin Jars directory, you can also copy and paste it directly in your server's plugins directory. To do so, add a second copy file tag and set todir to your server's plugin directory. The following code is an example of what this will look like:

<?xml version="1.0" encoding="UTF-8"?>
<project name="MyFirstBukkitPlugin" default="default" basedir=".">
  <description>Builds, tests, and runs the project MyFirstBukkitPlugin.</description>
  <import file="nbproject/build-impl.xml"/>
  <target name="-post-jar">
    <copy file="${dist.jar}" todir="../ Plugin Jars" failonerror="true"/>
    <copy file="${dist.jar}" todir="C:/Users/Owner/Desktop/Bukkit Server/plugins" failonerror="true"/>
  </target>
</project>

Again, you should do this for every plugin that you want to automatically install on your server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.83.223