public final class CommandUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getOwnerName(Object owner)
Get the name of the given owner object.
|
static com.google.common.base.Function<String,?> |
messageFunction(org.bukkit.command.CommandSender sender)
Return a function that accepts a string to send a message to the
given sender.
|
static void |
pastebin(WorldGuardPlugin plugin,
org.bukkit.command.CommandSender sender,
String content,
String successMessage)
Submit data to a pastebin service and inform the sender of
success or failure.
|
static String |
replaceColorMacros(String str)
Replace color macros in a string.
|
public static String replaceColorMacros(String str)
str - the stringpublic static String getOwnerName(@Nullable Object owner)
owner - the owner objectpublic static com.google.common.base.Function<String,?> messageFunction(org.bukkit.command.CommandSender sender)
sender - the senderpublic static void pastebin(WorldGuardPlugin plugin, org.bukkit.command.CommandSender sender, String content, String successMessage)
plugin - The pluginsender - The sendercontent - The contentsuccessMessage - The message, formatted with String.format(String, Object...) on successCopyright © 2015. All Rights Reserved.