Sueta

NoDropItem

0.3

When in a players inventory, their items and/or XP will be returned to them on death

·Plugin

Whilst a player has a NoDropItem in their inventory, if they should happen to die, their inventory contents will be saved and returned to them upon respawning.

  • Configure wether players keeps their inventory and/or their XP.
  • Edit material, display name & lore of the NoDropItem.
  • Enabled or disable crafting of the NDI item.
  • Change if the item is consumed on use.
  • Change the crafting requirements.
  • Play a sound to the player when they respawn, and their inventory/XP was returned to them.
  • Edit message that is show the player when their inventory/XP was returned to them.
  • Change all the command messages.


command:
Gives the player a NoDropItem.
/ndi give <playername>

permissions:
Allows the use on the /ndi give command.
nodropitem.give

Example config.yml

Settings:
  # Color Codes & Unicodes can be used for all text.
  # Example. \u00A7b\u00A7m\u00A7l---\u00A7r\u00A78\u00A7m\u00A7l[--\u00A7r \u00A7aNo Drop \u00A72Item \u00A7r\u00A78\u00A7m\u00A7l--]\u00A7b\u00A7m\u00A7l---
  # Example. &b&m&l---&r&8&m&l[--&r &aNo Drop &2Item &r&8&m&l--]&b&m&l---
 
  # Enable or Disable usage of ndi.
  Enabled: true
  # When a player dies with this item in inventory,
  # Should the players inventory be restored?
  Keep Inventory: true
  # When a player dies with this item in inventory,
  # Should the players XP level to restored?
  Keep XP Levels: true
  # When a player dies with this item in inventory, should this item be consumed.
  # If multiple items are found it will remove only one of the items.
  Consume Item: true
 
  # Settings related to how the item looks.
  Item:
    # The material of the item.
    Material: 'END_CRYSTAL'
    # Size of the item stack.
    Amount: 1
    # The Display name of the item.
    Display Name: '&b&m&l-----&r&8&m&l[--&r &aNo Drop &2Item &r&8&m&l--]&b&m&l-----'
    # The lore text of the item.
    Lore:
    - '&bWhilst you have this item in your inventory.'
    - '&bYou are safe from loosing your inventory contents'
    - '&bIf you should happen to meet your maker.'
    - '&cItem is consumed on usage.'
    - '&b&m&l--------------------------'

  # Settings related to crafting.
  Crafting:
    # Enable or disable crafting of items.
    # True allows players to craft this item.
    # False means, item is only attainable from the /ndi give <playername> command.
    Is Craftable: true
    # Pattern and items used to craft the item.
    # Item names can be found @
    # https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
    # Top is the top row of a crafting table
    # Middle is the Middle row of a crafting table
    # Bottom is the Bottom row of a crafting table
    # Use 'AIR' if no item in that slot is required.
    Crafting Pattern:
      TopLeft: 'DIAMOND'
      TopMiddle: 'DIAMOND'
      TopRight: 'DIAMOND'
      MiddleLeft: 'DIAMOND'
      Middle: 'END_CRYSTAL'
      MiddleRight: 'DIAMOND'
      BottomLeft: 'DIAMOND'
      BottomMiddle: 'DIAMOND'
      BottomRight: 'DIAMOND'
 
  # Settings related to sounds
  Sounds:
    # Enabled this sound or not.
    # Play a sound to the player on respawn, if their inventory
    # was saved because they had a NoDropItem.
    Enabled: true
    # Sound file to play.
    # https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
    Sound: 'ENTITY_GHAST_SCREAM'
    # Volume of the playing sound.
    Volume: 1.0f
    # Pitch of playing sound
    Pitch: 1.0f
 
  # Settings related to chat messages.
  Chat:
    # Enable or disable sending of chat messages..
    Enabled: true
    # Message to send to player's chat when they respawn.
    # And their inventory was restored due to having the item
    # in the inventory.
    Usage Message:
    - '&b&m&l----------------------------------'
    - ' &ePhew... That was lucky... '
    - ' &eYou had a &aNo Drop &2Item &ein your inventory, your inventory was saved.'
    - '&b&m&l----------------------------------'
    # Messages related to command usage.
    Command Messages:
      # Message sent to the player receiving the item.
      ReceiverCompleted: '&aYou just received a &aNo Drop &2Item. &aLucky you!.'
      # Message sent to the player using the command, if command was completed..
      SenderCompleted: '&aGiving of &aNo Drop &2Item &acompleted.'
      # Message sent to the player using command, if command failed because receivers inventory was full.
      SenderInventoryFull: '&cGive failed. Players inventory is full.'
      # Message sent to the player using command, if command failed because receiver is not online.
      SenderPlayerNotOnline: '&cGive failed. Player is not online.'
      # Message sent to the player using command, if command failed because the receiver was not found.
      SenderNoPlayerFound: '&cGive failed. No such player was found.'
      # Message sent to the player using command, if command is unknown.
      SenderUnknowCommand: '&cUnknown command'
      # Message sent to the player using command, if command failed because of wrong usage.
      SenderInvalidUsage: '&cInvalid command usage. /ndi give <playername>'
      # Message sent to the player using command, if command failed because sender dont have permission to do so.
      SenderNoPermission: '&cYou dont have permission'

Similar projects

Plugin →