Interface ShowItem


public interface ShowItem
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The types of different targets a message can have
  • Method Summary

    Modifier and Type
    Method
    Description
    cacheEnder​(org.bukkit.entity.Player player)
    Cache an enderchest of a player.
    cacheInv​(Data invData)
    Cache an inventory
    cacheInv​(org.bukkit.entity.Player player)
    Cache an inventory of a player.
    org.bukkit.inventory.ItemStack
    filterInItem​(org.bukkit.inventory.ItemStack item)
    Filter strings in an item's display name and lore
    Get a all commands in which to replace the chat variable to
    Get all configured chat variables to show the enderchest
    Get all configured chat variables to show the inventory
    Deprecated.
    Get all configured chat variables
    int
    Get the cooldown setting for a specific target
    int
    Get the default radius in which to show the item when run without a command
    Get the plugin's resource pack icon mapping
    Get the ItemConverter util
    Get the item matcher for blocking items
    int
    Get the maximum amount of chat variables a player can put into a chat message
    What should variables be replaced with when they exceed the maximum amount
    Get a shown inventory by its id from the cache
    boolean
    Get whether or not this is a spigot server.
    boolean
    openInvData​(org.bukkit.entity.Player target, Data invData)
    Open a GUI to show the inventory data to a player
    boolean
    shouldShowIcon​(org.bukkit.entity.Player player)
    Check whether or not we should show a text icon to a certain player
    boolean
    Get whether or not the plugin should allow showing with an empty hand
    void
    showInvInRadius​(org.bukkit.entity.Player sender, Data invData, int radius)
    Show an inventory to everyone around the player
    void
    showInvToAll​(org.bukkit.entity.Player sender, Data invData)
    Show an inventory to every online player
    void
    showInvToPlayer​(org.bukkit.entity.Player sender, org.bukkit.entity.Player target, Data invData)
    Show an inventory to another player
    void
    showInvToWorld​(org.bukkit.entity.Player sender, Data invData)
    Show an inventory to all players in the same world
    void
    showItemInRadius​(org.bukkit.entity.Player sender, org.bukkit.inventory.ItemStack item, int radius)
    Show an item to everyone around the player
    void
    showItemToAll​(org.bukkit.entity.Player sender, org.bukkit.inventory.ItemStack item)
    Show an item to every online player
    void
    showItemToPlayer​(org.bukkit.entity.Player sender, org.bukkit.entity.Player target, org.bukkit.inventory.ItemStack item)
    Show an item to another player
    void
    showItemToWorld​(org.bukkit.entity.Player sender, org.bukkit.inventory.ItemStack item)
    Show an item to all players in the same world
    boolean
    Get whether or not the plugin should try to strip spaces from the start and end of an item's name
    boolean
    Get whether or not we should try to display icons for items in chat
    boolean
    Get whether or not the plugin should try to automatically get the color of named items to color the brackets with
    boolean
    Whether or not to use a plugin name prefix in click component events
    boolean
    Should the plugin show the real or the display/nick name of a player
    boolean
    Get whether or not to use the manual translation mapping in transmapping.yml
  • Method Details

    • useIconRp

      boolean useIconRp()
      Get whether or not we should try to display icons for items in chat
      Returns:
      Whether or not to display chat icons
    • useTranslationMapping

      boolean useTranslationMapping()
      Get whether or not to use the manual translation mapping in transmapping.yml
      Returns:
      Whether to use transmapping.yml or not
    • useNameColorForBrackets

      boolean useNameColorForBrackets()
      Get whether or not the plugin should try to automatically get the color of named items to color the brackets with
      Returns:
      Whether or not named item colors will be used for the brackets
    • trimItemName

      boolean trimItemName()
      Get whether or not the plugin should try to strip spaces from the start and end of an item's name
      Returns:
      Whether or not spaces get stripped from item display names
    • getItemMatcher

      ItemMatcher getItemMatcher()
      Get the item matcher for blocking items
      Returns:
      the plugin's matcher for blocking items
    • getIconRpMap

      IconRpMapping getIconRpMap()
      Get the plugin's resource pack icon mapping
      Returns:
      The icon mapping utility
    • isServerSpigot

      boolean isServerSpigot()
      Get whether or not this is a spigot server. This helps when deciding whether or not the Bungee chat component API should be used.
      Returns:
      Whether or not this is a Spigot server
    • useNickName

      boolean useNickName()
      Should the plugin show the real or the display/nick name of a player
      Returns:
      Whether or not to show the display name
    • getDefaultRadius

      int getDefaultRadius()
      Get the default radius in which to show the item when run without a command
      Returns:
      The default radius, -1 for whole world, -2 for whole server
    • getCooldown

      int getCooldown(ShowItem.MessageTarget target)
      Get the cooldown setting for a specific target
      Parameters:
      target - The target of which the cooldown should be get
      Returns:
      The configured cooldown of the target or 0 if there is none
    • getItemConverter

      ItemConverter getItemConverter()
      Get the ItemConverter util
      Returns:
      The instance of the ItemConvert util
    • getChatVar

      @Deprecated String getChatVar()
      Deprecated.
      Get the the chat variable. If there are multiple it will get the first one.
      Returns:
      The configured chat variable
    • useNamespacedCommands

      boolean useNamespacedCommands()
      Whether or not to use a plugin name prefix in click component events
      Returns:
      true if the command should be prefixed with he plugin's name, false if not
    • getChatVars

      Set<String> getChatVars()
      Get all configured chat variables
      Returns:
      A set of all configured chat variables
    • getChatInvVars

      Set<String> getChatInvVars()
      Get all configured chat variables to show the inventory
      Returns:
      A set of all configured inventory chat variables
    • getChatEnderVars

      Set<String> getChatEnderVars()
      Get all configured chat variables to show the enderchest
      Returns:
      A set of all configured enderchest chat variables
    • getChatCommands

      Set<String> getChatCommands()
      Get a all commands in which to replace the chat variable to
      Returns:
      A set of all configured chat variables. If it contains "*" it means that all commands should be allowed.
    • getMaxChatVars

      int getMaxChatVars()
      Get the maximum amount of chat variables a player can put into a chat message
      Returns:
      The maximum amount of chat variables that can be used in one message
    • getOverflowDisplay

      String getOverflowDisplay()
      What should variables be replaced with when they exceed the maximum amount
      Returns:
      The String to replace the exceeding variables with
    • showEmptyHand

      boolean showEmptyHand()
      Get whether or not the plugin should allow showing with an empty hand
      Returns:
      Whether or not to allow showing with an empty hand
    • getShownInv

      Data getShownInv(String id)
      Get a shown inventory by its id from the cache
      Parameters:
      id - The id of the cache entry
      Returns:
      The inventory or null if non-existent/expired
    • cacheInv

      String cacheInv(org.bukkit.entity.Player player)
      Cache an inventory of a player. Whether or not it will be a live inventory depends on the plugin config.
      Parameters:
      player - The player to cache the inventory for
      Returns:
      the id of the cached inventory
    • cacheEnder

      String cacheEnder(org.bukkit.entity.Player player)
      Cache an enderchest of a player. Whether or not it will be a live enderchest depends on the plugin config.
      Parameters:
      player - The player to cache the enderchest for
      Returns:
      the id of the cached enderchest
    • cacheInv

      String cacheInv(Data invData)
      Cache an inventory
      Parameters:
      invData - The data of the inventory
      Returns:
      The id of the cached inventory
    • shouldShowIcon

      boolean shouldShowIcon(org.bukkit.entity.Player player)
      Check whether or not we should show a text icon to a certain player
      Parameters:
      player - The player to check
      Returns:
      true if useIconRp is true and FRP is not installed or the player is null or the pack list is empty or he has a pack that contains the icons; false if useIconRP is false or the player does not have a pack with the icons
    • filterInItem

      org.bukkit.inventory.ItemStack filterInItem(org.bukkit.inventory.ItemStack item)
      Filter strings in an item's display name and lore
      Parameters:
      item - The item to filter (will modify the item directly)
      Returns:
      The filtered item
    • showItemToAll

      void showItemToAll(org.bukkit.entity.Player sender, org.bukkit.inventory.ItemStack item)
      Show an item to every online player
      Parameters:
      sender - The Player who should show the item
      item - The ItemStack to show
    • showItemToWorld

      void showItemToWorld(org.bukkit.entity.Player sender, org.bukkit.inventory.ItemStack item)
      Show an item to all players in the same world
      Parameters:
      sender - The Player who should show the item
      item - The ItemStack to show
    • showItemInRadius

      void showItemInRadius(org.bukkit.entity.Player sender, org.bukkit.inventory.ItemStack item, int radius)
      Show an item to everyone around the player
      Parameters:
      sender - The Player who should show the item
      item - The ItemStack to show
      radius - The radius to show the item in
    • showItemToPlayer

      void showItemToPlayer(org.bukkit.entity.Player sender, org.bukkit.entity.Player target, org.bukkit.inventory.ItemStack item)
      Show an item to another player
      Parameters:
      sender - The Player who should show the item
      target - The Player to show the item to
      item - The ItemStack to show
    • showInvToAll

      void showInvToAll(org.bukkit.entity.Player sender, Data invData)
      Show an inventory to every online player
      Parameters:
      sender - The Player who should show the inventory
      invData - The inventory data
    • showInvToWorld

      void showInvToWorld(org.bukkit.entity.Player sender, Data invData)
      Show an inventory to all players in the same world
      Parameters:
      sender - The Player who should show the inventory
      invData - The inventory data
    • showInvInRadius

      void showInvInRadius(org.bukkit.entity.Player sender, Data invData, int radius)
      Show an inventory to everyone around the player
      Parameters:
      sender - The Player who should show the inventory
      invData - The inventory data
      radius - The radius to show the inventory in
    • showInvToPlayer

      void showInvToPlayer(org.bukkit.entity.Player sender, org.bukkit.entity.Player target, Data invData)
      Show an inventory to another player
      Parameters:
      sender - The Player who should show the inventory
      target - The Player to show the inventory to
      invData - The inventory data
    • openInvData

      boolean openInvData(org.bukkit.entity.Player target, Data invData)
      Open a GUI to show the inventory data to a player
      Parameters:
      target - The target player
      invData - The data to show
      Returns:
      Whether or no the data was valid and could be opened