Class PackActionAssignment

java.lang.Object
de.themoep.resourcepacksplugin.core.PackAssignment
de.themoep.resourcepacksplugin.core.PackActionAssignment

public class PackActionAssignment extends de.themoep.resourcepacksplugin.core.PackAssignment
  • Constructor Details

    • PackActionAssignment

      public PackActionAssignment(String name)
    • PackActionAssignment

      public PackActionAssignment(de.themoep.resourcepacksplugin.core.PackAssignment assignment)
  • Method Details

    • isRequired

      public boolean isRequired()
      Whether or not the client should show the required screen when prompting
      Returns:
      Whether or not the required screen will show
    • setRequired

      public void setRequired(boolean force)
      Set whether or not the client should show the required screen when prompting
      Parameters:
      force - Whether or not the required screen will show
    • getPromptMessage

      public String getPromptMessage()
      Get the raw message that the prompt screen will show
      Returns:
      The raw message that the prompt screen will show
    • setPromptMessage

      public void setPromptMessage(String promptMessage)
      Set the raw message that the prompt screen will show
      Parameters:
      promptMessage - The raw message that the prompt screen will show
    • addAction

      @Deprecated public void addAction(ResourcePackStatus status, PackAction action)
      Add an action to a server to react on a specific status
      Parameters:
      status - The ResourcePackStatus
      action - The action to execute
    • addAction

      public void addAction(ResourcePackStatus status, PackAction action, boolean firstJoin)
      Add an action to a server to react on a specific status
      Parameters:
      status - The ResourcePackStatus
      action - The action to execute
      firstJoin - Is this action run on first join?
    • addAction

      public void addAction(de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status, PackAction action, boolean firstJoin)
      Add an action to a server to react on a specific status for a specific pack
      Parameters:
      pack - The pack to react on
      status - The ResourcePackStatus
      action - The action to execute
      firstJoin - Is this action run on first join?
    • addAction

      @Deprecated public void addAction(ResourcePackStatus status, ActionType action, String msg)
      Add an action to a server to react on a specific status with a sendMessage
      Parameters:
      status - The ResourcePackStatus
      action - The action to execute
      msg - An additional sendMessage for the action
    • addAction

      public void addAction(ResourcePackStatus status, ActionType action, String msg, boolean firstJoin)
      Add an action to a server to react on a specific status with a sendMessage
      Parameters:
      status - The ResourcePackStatus
      action - The action to execute
      msg - An additional sendMessage for the action
      firstJoin - Is this action run on first join?
    • getActions

      Deprecated.
      Get all actions for a certain status
      Parameters:
      status - The status to get the action for
      Returns:
      A collection of actions for this assignment
    • getActions

      public Map<ActionType,PackAction> getActions(ResourcePackStatus status, boolean firstJoin)
      Get all actions for a certain status no matter the pack
      Parameters:
      status - The status to get the action for
      firstJoin - Is this action run on first join?
      Returns:
      A collection of actions for this assignment
    • getActions

      public Map<ActionType,PackAction> getActions(de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status, boolean firstJoin)
      Get all actions for a certain status for a certain pack
      Parameters:
      pack - The pack to get the action for
      status - The status to get the action for
      firstJoin - Is this action run on first join?
      Returns:
      A collection of actions for this assignment
    • getActions

    • getActions

      public Map<ResourcePackStatus,Map<ActionType,PackAction>> getActions(de.themoep.resourcepacksplugin.core.ResourcePack pack)
    • getActions

      public Map<ResourcePackStatus,Map<ActionType,PackAction>> getActions(String packName)
    • getFirstJoinActions

      public Map<ResourcePackStatus,Map<ActionType,PackAction>> getFirstJoinActions()
    • getFirstJoinActions

      public Map<ResourcePackStatus,Map<ActionType,PackAction>> getFirstJoinActions(de.themoep.resourcepacksplugin.core.ResourcePack pack)
    • getFirstJoinActions

      public Map<ResourcePackStatus,Map<ActionType,PackAction>> getFirstJoinActions(String packName)
    • toString

      public String toString()
      Overrides:
      toString in class de.themoep.resourcepacksplugin.core.PackAssignment
    • serialize

      public Map<String,Object> serialize()
      Overrides:
      serialize in class de.themoep.resourcepacksplugin.core.PackAssignment
    • getReplacements

      public String[] getReplacements()
      Overrides:
      getReplacements in class de.themoep.resourcepacksplugin.core.PackAssignment
    • getUpdateActions

      protected String[] getUpdateActions()
      Overrides:
      getUpdateActions in class de.themoep.resourcepacksplugin.core.PackAssignment
    • update

      public boolean update(de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor command, de.themoep.resourcepacksplugin.core.ResourcepacksPlayer sender, String[] args)
      Overrides:
      update in class de.themoep.resourcepacksplugin.core.PackAssignment