Player locking handler and API 1.0.0

Used by my plugins (or yours!) to lock players in place

  1. HopperElec
    Native Minecraft Version:
    Tested Minecraft Versions:
    • 1.16
    Source Code:
    If you're here and a server administrator, you've most likely came from another resource that has said you need this plugin for it to work. Simply add this plugin to your plugins folder and you're off! You can then use /stun or /unstun to manually manage the stunning of players

    If you're a developer and wish to use this plugin's API for your project, you must use Maven. This is obvious for most, but if you're not using it, I highly recommend you start doing so! (and if you use Gradle... I'm sorry for you)

    In the <repositories> tag in the pom.xml, add this code:
    Code (Text):

    And in the <dependencies> tag, add this code:
    Code (Text):
    Once you've added it through Maven and refreshed it, you then need to add it as a dependency in the plugin.yml. To do this, simply add this:
    Code (YAML):
    depend: [Stunner]
    Now you should be good to go!

    To access the plugin, use this code:
    Code (Java):
    And cast it to (HopperParty). I recommend, as a safety precaution, to makes sure the plugin isn't null, though. So you should end up with code looking like this:
    Code (Java):
    final Plugin stunPlugin = Bukkit.getPluginManager().getPlugin("Stunner");
    if (partyPlugin == null) {
      System.out.println("Failed to get stunner plugin class! Cancelling start-up of the plugin!");
      setEnabled(false); return;
    HopperParty stunClass = (Stunner) stunPlugin;
    From there, your IDE should be able to guide you after typing stunClass then a dot somewhere in your code! Have fun :D