Class DisguiseParser
java.lang.Object
me.libraryaddict.disguise.utilities.parser.DisguiseParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
callMethods
(org.bukkit.command.CommandSender sender, Disguise disguise, DisguisePermissions disguisePermission, DisguisePerm disguisePerm, Collection<String> usedOptions, String[] args, String permNode) static void
static DisguisePerm
getDisguisePerm
(String name) static DisguisePerm[]
static String
getName
(org.bukkit.command.CommandSender entity) static DisguisePermissions
getPermissions
(org.bukkit.command.CommandSender sender, String commandName) Get perms for the node.static void
modifyDisguise
(Disguise disguise, String params) static void
modifyDisguise
(Disguise disguise, String[] params) static void
modifyDisguise
(Disguise disguise, org.bukkit.entity.Entity target, String params) static void
modifyDisguise
(Disguise disguise, org.bukkit.entity.Entity target, String[] params) static Disguise
parseDisguise
(String disguise) static Disguise
parseDisguise
(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity target, String disguise) static Disguise
parseDisguise
(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity target, String permNode, String[] args, DisguisePermissions permissions) Returns the disguise if it all parsed correctly.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 long
parseStringToTime
(String string) static Disguise
parseTestDisguise
(org.bukkit.command.CommandSender sender, String permNode, String[] args, DisguisePermissions permissions) Experimentally parses the arguments to test if this is a valid disguisestatic String
parseToString
(Disguise disguise) static String
parseToString
(Disguise disguise, boolean outputSkinData) static String
parseToString
(Disguise disguise, boolean outputSkinData, boolean includeCustomData) Not outputting skin information is not garanteed to display the correct player namestatic String
parseToString
(Disguise disguise, WatcherMethod method) static void
updateDisguiseName
(Disguise disguise)
-
Constructor Details
-
DisguiseParser
public DisguiseParser()
-
-
Method Details
-
createDefaultMethods
public static void createDefaultMethods() -
updateDisguiseName
-
parseToString
-
parseToString
-
parseToString
- 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
-
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:
DisguiseParseException
IllegalAccessException
InvocationTargetException
Throwable
-
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.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, 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, DisguisePermissions disguisePermission, DisguisePerm disguisePerm, Collection<String> usedOptions, String[] args, String permNode) throws Throwable - Throws:
Throwable
-