Skip to content

ModuleManager

LPDMinecraft edited this page Dec 29, 2021 · 5 revisions

ModuleCommandManager

You can get the Command Manager in you module class with getModuleCommandManager() With the method addCommand(ModuleCommand, boolean canDisableInConfig) add a Command. With the attribute canDisableInConfig, you can set if someone can disable this config.

ModuleCommand

You need to create a class with the name of your command and at the end command. You need to import the methods. With the getAllPermissions and getAllTranslations methods, you must also return the respective specified variable with return;.

In the constructur super() are many variables, that you can set in the class, if you do that, you can remove the variables, that you set in the super(); delete in the constructur.

If you set constructur splitting to false, only the method onCommandExecute() is executed when the command is executed. If you also set it to true, then it is split between two methods name onLPlayerCommand and onConsoleCommand. In this mode, onCommandExecute will still work.

Also there are sendMessageCommands, that sends with the logger info, warning, error and default messages. You can translate with the translate() Method and look for permissions with the hasPermissions() Method.

You can also add ModuleSubCommands, with the addSubCommand() Method.

ModuleSubCommand

Its the same like ModuleCommands, but the only diffrent is, that is not like /hello, but it can make to the command /hello the subcommand test so it can named /hello test. But you can also make to a SubCommand a SubCommand like /hello test hello, because every SubCommand is a Command, that can have SubCommands.

ModuleListenerManager

You can get the Command Manager in you module class with getListenerManager()

Supports

Servers Bukkit Spigot Paper Pupur
1.16 ✔️ ✔️ ✔️ ✔️
1.17 ✔️ ✔️ ✔️ ✔️
1.18 ✔️ ✔️ ✔️ ✔️
Proxies BungeeCord Waterfall Velocity
1.16 ✔️ ✔️ ✔️
1.17 ✔️ ✔️ ✔️
1.18 ✔️ ✔️ ✔️

Help map

Commands

Improved Bukkit classes/utils

  • LPlayer
  • CraftingRecipes
  • Inventorys
  • ItemBuilders
  • Other Utils

Improved BungeeCord classes/utils

  • LPlayer

Update Map

Version 1.0.0

Version 1.0.1

Version 1.0.2

Version 1.0.3

Version 1.0.4

Version 1.0.5

Version 1.0.6

Version 1.0.7

Version 1.0.8

Clone this wiki locally