Package dev.jorel.commandapi
Class PaperImplementations
java.lang.Object
dev.jorel.commandapi.PaperImplementations
-
Constructor Summary
ConstructorsConstructorDescriptionPaperImplementations(boolean isPaperPresent, NMS<?> nmsInstance) Constructs a PaperImplementations object -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.command.CommandMapbooleanvoidregisterReloadHandler(org.bukkit.plugin.Plugin plugin) Hooks into Paper'sServerResourcesReloadedEventto detect if/minecraft:reloadis called, and registers a reload handler that automatically calls the CommandAPI's internal datapack reloading function
-
Constructor Details
-
PaperImplementations
Constructs a PaperImplementations object- Parameters:
isPaperPresent- Whether this is a Paper server or notnmsInstance- The instance of NMS
-
-
Method Details
-
registerReloadHandler
public void registerReloadHandler(org.bukkit.plugin.Plugin plugin) Hooks into Paper'sServerResourcesReloadedEventto detect if/minecraft:reloadis called, and registers a reload handler that automatically calls the CommandAPI's internal datapack reloading function- Parameters:
plugin- the plugin that the CommandAPI is being used from
-
getCommandMap
public org.bukkit.command.CommandMap getCommandMap()- Returns:
- Bukkit's
CommandMap
-
isPresent
public boolean isPresent()- Returns:
- whether we're using paper or not
-