Hi, welcome to my Manhunt plugin! I hope you enjoy it.
- Native Minecraft Version:
- 1.16
- Tested Minecraft Versions:
- 1.16
NOTE: The previous version numbers were incorrect. We were actually at 1.2 instead of 1.0.2. Same goes for 1.0.1 = 1.1.
Credit to Dream, as this plugin is based off of his Manhunt series.
Guide
- Basic Usage
- Addons
- Changelog You can use addons to add extra functionality to your manhunt. I will probably do a detailed tutorial on how to code an addon later, but this is just a quick description.
Installing an addon.
Installing an addon is very simple. Every addon should be contained inside of its own regular plugin JAR, which you just put inside of the plugins folder. The Manhunt plugin should automatically load all addons.
How it works & developing one.
The addon loader goes through all plugins and checks or they are annotated with the `@ManhuntAddon` annotation. If so, they check what was inputted in the `value` field, which should be a path to your addon class which extends `MHAddon`. Then, it creates an instance of your class, and links it to your plugin and some other addon management stuff in an `AddonLink`.
Quick example
Folder structureClick to expand...
- com.example.mhaddon
- - Main (Plugin class)
- - Addon (Addon class)
Click to expand... com.example.mhaddon.Main codeClick to expand...Code (Java):package com.example.mhaddon;
import org.bukkit.plugin.java.JavaPlugin;
import net.orbyfied.manhunt.api.build.ManhuntAddon;
@MHAddonProvider("com.example.mhaddon.Addon")
public class Main extends JavaPlugin {
public void mh_provide(MHPluginManager m) { // OPTIONAL
Bukkit.getConsoleSender()
.sendMessage(ChatColor.YELLOW + "yay it works!");
}
} com.example.mhaddon.Addon codeClick to expand...This completely useless addon will stop hunters from using their compass.Code (Java):package com.example.mhaddon;
import net.orbyfied.manhunt.api.build.MHAddon;
import net.orbyfied.manhunt.api.select.CompassInterface.
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.ChatColor;
public class Addon extends MHAddon {
@Override
public void onCompassUsed(Player by, CompassInterface i, ItemStack compass) {
by.sendMessage(ChatColor.RED + "lol no");
i.setCancelled(this, true);
}
}Click to expand...
1.1
1.2
- Compass event bugs fixed and signature changed;
There was a bug in the passing of the compass ItemStack to the method, which was fixed and the compass now uses an CompassInterface which allows you to modify the final used values.
Signature changed to:
Code (Java):void onCompassUsed(Player, CompassInterface, ItemStack)Click to expand...
- Fixed encoding issues;
Since I moved my project over to Gradle it had some encoding issues with special characters like the double arrow (ยป). These have been resolved thanks to StackOverflow post https://stackoverflow.com/a/34717160/14837740.
1.2.1
- New addon loading / registration system.
On the surface, this may not look like a big change. The old way of registering addons still works, but the `ManhuntAddon` annotation has been changed to `MHAddonProvider`. This allows you to use the `otherAddons` field in the annotation to simply register multiple addons from one plugin. You can now also dynamically register addons by capturing the `MHProviderManager` in a static field when `mh_provide(MHProviderManager)` is invoked, by doing this;
Code (Java):public static MHProviderManager manager;
public void mh_provide(MHProviderManager m) {
manager = m;
}
public void newAddon() {
manager.loadAddon("com.example.EpicGamerAddon");
}- Prefixed most classes with "MH" to specify that it is a Manhunt related class.
For example; "AddonLink" has been changed to "MHAddonLink".
1.2.2
- The MHAddonRegistry now maps all addons to their addons classes, and it actually registers the MHProviderManagers now.
- Renamed MHProviderAddonManager to MHProviderManager.
- Updated the speedrunner and hunter commands to check for an ongoing game and they now correctly output the current team when using `get`. The `-s` argument has also been fixed for the hunter command and it should now work properly.
- Added 1.17 support.
I'm not sure if it is still compatible with 1.16.
Please let me know if you try.
Click to expand...

Manhunt 1.2.2
An advanced Manhunt plugin that supports multiple speedrunners and with a custom addon API.
Recent Updates
- 1.2.2: 1.17! Jul 25, 2021
- 1.2.1: Fixed MHProviderManager list, classified addons and command updates. Jun 4, 2021
- 1.2: Addon loading and naming convention. Apr 19, 2021