Class DisguiseParser

java.lang.Object
me.libraryaddict.disguise.utilities.parser.DisguiseParser

public class DisguiseParser extends Object
  • Constructor Details

    • DisguiseParser

      public DisguiseParser()
  • Method Details

    • createDefaultMethods

      public static void createDefaultMethods()
    • updateDisguiseName

      public static void updateDisguiseName(Disguise disguise)
    • parseToString

      public static String parseToString(Disguise disguise)
    • parseToString

      public static String parseToString(Disguise disguise, boolean outputSkinData)
    • parseToString

      public static String parseToString(Disguise disguise, WatcherMethod method) throws Throwable
      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

      public static DisguisePerm getDisguisePerm(String name)
    • getDisguisePerms

      public static DisguisePerm[] 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

      public static String getName(org.bukkit.command.CommandSender entity)
    • parsePlaceholders

      public static String[] parsePlaceholders(String[] args, org.bukkit.command.CommandSender user, org.bukkit.command.CommandSender target)
    • parsePlaceholders

      public static String[] parsePlaceholders(String[] args, String userName, String userSkin, String targetName, String targetSkin, org.bukkit.inventory.EntityEquipment equip, org.bukkit.inventory.EntityEquipment targetEquip)
    • parsePlaceholders

      public 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)
    • parseStringToTime

      public static long parseStringToTime(String string) 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:
      DisguiseParseException
      IllegalAccessException
      InvocationTargetException
      Throwable
    • modifyDisguise

      public static void modifyDisguise(Disguise disguise, org.bukkit.entity.Entity target, String[] params) throws Throwable
      Throws:
      Throwable
    • modifyDisguise

      public static void modifyDisguise(Disguise disguise, String[] params) throws Throwable
      Throws:
      Throwable
    • modifyDisguise

      public static void modifyDisguise(Disguise disguise, String params) throws Throwable
      Throws:
      Throwable
    • modifyDisguise

      public static void modifyDisguise(Disguise disguise, org.bukkit.entity.Entity target, String params) throws Throwable
      Throws:
      Throwable
    • parseDisguise

      public static Disguise parseDisguise(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, 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