Class DisguiseParser
java.lang.Object
me.libraryaddict.disguise.utilities.parser.DisguiseParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcallMethods(org.bukkit.command.CommandSender sender, Disguise disguise, @Nullable DisguisePermissions disguisePermission, DisguisePerm disguisePerm, Collection<String> usedOptions, String[] args, String permNode) static voidcallMethods(org.bukkit.command.CommandSender sender, Disguise disguise, @Nullable DisguisePermissions disguisePermission, DisguisePerm disguisePerm, Collection<String> usedOptions, String[] args, String permNode, int skipPermissionChecksOfFirstXArgs) static voidstatic DisguisePermgetDisguisePerm(String name) static DisguisePerm[]static StringgetName(org.bukkit.command.CommandSender entity) static DisguisePermissionsgetPermissions(org.bukkit.command.CommandSender sender, String commandName) Get perms for the node.static voidmodifyDisguise(Disguise disguise, String params) static voidmodifyDisguise(Disguise disguise, String[] params) static voidmodifyDisguise(Disguise disguise, org.bukkit.entity.Entity target, String params) static voidmodifyDisguise(Disguise disguise, org.bukkit.entity.Entity target, String[] params) static DisguiseparseDisguise(String disguise) static DisguiseparseDisguise(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity target, String disguise) static DisguiseparseDisguise(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity target, String permNode, String[] args, @Nullable DisguisePermissions permissions) Returns the disguise if it all parsed correctly.static DisguiseparseDisguise(org.bukkit.entity.Entity target, String disguise) static String[]parsePlaceholders(String[] args, String userName, String userDisplayname, String userSkin, String targetName, String targetDisplayname, String targetSkin, org.bukkit.inventory.EntityEquipment equip, org.bukkit.inventory.EntityEquipment targetEquip) static String[]parsePlaceholders(String[] args, String userName, String userSkin, String targetName, String targetSkin, org.bukkit.inventory.EntityEquipment equip, org.bukkit.inventory.EntityEquipment targetEquip) static String[]parsePlaceholders(String[] args, org.bukkit.command.CommandSender user, org.bukkit.command.CommandSender target) static longparseStringToTime(String string) static longparseStringToTime(String string, boolean resolveToTicks) static DisguiseparseTestDisguise(org.bukkit.command.CommandSender sender, String permNode, String[] args, DisguisePermissions permissions) Experimentally parses the arguments to test if this is a valid disguisestatic StringparseToString(Disguise disguise) static StringparseToString(Disguise disguise, boolean outputSkinData) static StringparseToString(Disguise disguise, boolean outputSkinData, boolean includeCustomData) Not outputting skin information is not garanteed to display the correct player namestatic StringparseToString(Disguise disguise, WatcherMethod method) Deprecated.static voidupdateDisguiseName(Disguise disguise)
-
Constructor Details
-
DisguiseParser
public DisguiseParser()
-
-
Method Details
-
createDefaultMethods
public static void createDefaultMethods() -
updateDisguiseName
-
parseToString
-
parseToString
-
parseToString
@Deprecated public static String parseToString(Disguise disguise, WatcherMethod method) throws Throwable Deprecated.- Throws:
Throwable
-
parseToString
public static String parseToString(Disguise disguise, boolean outputSkinData, boolean includeCustomData) Not outputting skin information is not garanteed to display the correct player name -
getDisguisePerm
-
getDisguisePerms
-
getPermissions
public static DisguisePermissions getPermissions(org.bukkit.command.CommandSender sender, String commandName) Get perms for the node. Returns a hashmap of allowed disguisetypes and their options -
getName
-
parsePlaceholders
-
parsePlaceholders
-
parsePlaceholders
-
parseStringToTime
- Throws:
DisguiseParseException
-
parseStringToTime
public static long parseStringToTime(String string, boolean resolveToTicks) throws DisguiseParseException - Throws:
DisguiseParseException
-
parseTestDisguise
public static Disguise parseTestDisguise(org.bukkit.command.CommandSender sender, String permNode, String[] args, DisguisePermissions permissions) throws Throwable Experimentally parses the arguments to test if this is a valid disguise- Parameters:
sender-permNode-args-permissions-- Returns:
- Throws:
DisguiseParseExceptionIllegalAccessExceptionInvocationTargetExceptionThrowable
-
modifyDisguise
public static void modifyDisguise(Disguise disguise, org.bukkit.entity.Entity target, String[] params) throws Throwable - Throws:
Throwable
-
modifyDisguise
- Throws:
Throwable
-
modifyDisguise
- Throws:
Throwable
-
modifyDisguise
public static void modifyDisguise(Disguise disguise, org.bukkit.entity.Entity target, String params) throws Throwable - Throws:
Throwable
-
parseDisguise
- Throws:
Throwable
-
parseDisguise
public static Disguise parseDisguise(org.bukkit.entity.Entity target, String disguise) throws Throwable - Throws:
Throwable
-
parseDisguise
public static Disguise parseDisguise(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity target, String disguise) throws Throwable - Throws:
Throwable
-
parseDisguise
public static Disguise parseDisguise(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity target, String permNode, String[] args, @Nullable @Nullable DisguisePermissions permissions) throws Throwable Returns the disguise if it all parsed correctly. Returns a exception with a complete message if it didn't. The commandsender is purely used for checking permissions. Would defeat the purpose otherwise. To reach this point, the disguise has been feed a proper disguisetype.- Throws:
Throwable
-
callMethods
public static void callMethods(org.bukkit.command.CommandSender sender, Disguise disguise, @Nullable @Nullable DisguisePermissions disguisePermission, DisguisePerm disguisePerm, Collection<String> usedOptions, String[] args, String permNode) throws Throwable - Throws:
Throwable
-
callMethods
public static void callMethods(org.bukkit.command.CommandSender sender, Disguise disguise, @Nullable @Nullable DisguisePermissions disguisePermission, DisguisePerm disguisePerm, Collection<String> usedOptions, String[] args, String permNode, int skipPermissionChecksOfFirstXArgs) throws Throwable - Throws:
Throwable
-