HomeJavaModsServerUtils
ServerUtils
ModsJava

ServerUtils

by FrankHeijden · on Modrinth

Reload plugins - Unload unused commands - PluginWatcher - Command/PluginInfo - Automatic Updater. Free Minecraft Java mod for 1.8.8, 1.8.9, 1.9.

⬇ Download on Modrinth

ServerUtils

ServerUtils allows you to manage your plugins in-game. Featuring reloading, unloading and loading of plugins from your plugins folder at runtime. ServerUtils also has handy methods to lookup commands and plugins, and provides you with handy information about them.

releaseImg GitHub Actions licenseImg featureRequestsImg bugReportsImg spigotRatingImg spigotDownloadsImg

Discord

Features

Load stages of a plugin (Spigot/Paper):

To understand the difference between loading / enabling / disabling / unloading of plugins, I will describe the load stages below:

Fully loading a plugin (like at startup):

  1. First, the plugin is loaded from a .jar file from the plugins directory. This is called loading of a plugin. The plugin is now "red" in the /plugin list, because it is not yet enabled.
  2. At the second step, a plugin is enabled. This causes the plugin to spit all sorts of things in the console (which the developer found important to notify you about at startup), like database connections being setup etc.

Fully disabling a plugin (like closing the server)

  1. First the plugin is disabled. This causes the plugin to lose all of it's features, like commands, event listeners, etc. After disabling, the plugin is still loaded in memory, but it is seen "red" in the /plugin list.
  2. Then the plugin will be unloaded from the memory, so the plugin won't appear at all anymore in the /plugin list.

Disclaimer ‼️

Please note that reloading may not be compatible with each and every plugin! Plugins which depend on a reloaded plugin, are likely to be error-prone for reloading. Improper cleanup, or improper startup practises may break plugin (re/un)loading as well. Please be careful!

Statistics

bStatsImg

Compiling ServerUtils

There are two ways to compile ServerUtils:

1. Installing gradle (recommended)

  1. Make sure you have gradle installed.
  2. Run the project with gradle build to compile it with dependencies.

2. Using the wrapper

Windows: gradlew.bat build
Linux/macOS: ./gradlew build

Developer API

Repository / Dependency

If you wish to use snapshot versions of ServerUtils, you can use the following repo:

https://repo.fvdh.dev/snapshots

Gradle:

repositories {
  compileOnly("net.frankheijden.serverutils:ServerUtils:VERSION")
}

dependencies {
  maven("https://repo.fvdh.dev/releases")
}

Maven:

<project>
  <repositories>
    <!-- ServerUtils repo -->
    <repository>
      <id>fvdh</id>
      <url>https://repo.fvdh.dev/releases</url>
    </repository>
  </repositories>
  
  <dependencies>
    <!-- ServerUtils dependency -->
    <dependency>
      <groupId>net.frankheijden.serverutils</groupId>
      <artifactId>ServerUtils</artifactId>
      <version>VERSION</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</project>

Commands and Permissions

Please refer to the Wiki page for an updated overview of the commands and permissions.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more