-
Notifications
You must be signed in to change notification settings - Fork 0
CommandUtils
Fulminazzo edited this page Oct 2, 2023
·
1 revision
CommandUtils are a series of function created to help working with Bukkit commands system. Those are mainly used by BearCommand objects to load and unload themselves on the fly. While many of these should not bother you, there are some functions to be taken into consideration:
-
syncCommands()
: sends to the player the latest map of commands; -
getBukkitCommands()
: returns a ReflObject containing the result ofgetCommandMap().getCommands()
; -
getKnownCommands()
: returns a ReflObject containing the result ofgetCommandMap().getKnownCommands()
; -
getBukkitCommands()
: returns a ReflObject containing the result ofBukkit.getServer().commandMap
; -
executeBungeeCommand(Player player, String command)
: as the name suggests, this function forces the player to execute a BungeeCord command. NOTE: this will only work if there is a BungeeCord (or Velocity) counterpart to reach to, because it uses MessagingChannels to work.
- Home
- How to start a plugin
- Work with Configuration Files
- Work with Enums
- Work with Commands
- Work with Custom Players
- Work with Messaging Channels
- Creating custom SavableObjects
- Timers
- General Utils
- Placeholders
- Bukkit Utils
- Velocity Utils