Giter Site home page Giter Site logo

keepitems's Introduction

KeepItems (1.14.4 - 1.19.3)

Keeps/removes various items in the inventory upon player death

Maintenance

Config

The config should be self explanatory. If you have a question, you can open a ticket on my discord server or add me on Discord (sehrschlecht#2929).

config-version: 4 #Do NOT edit this!

filter:
  everything:
    enabled: false #If the everything filter is enabled, all items will be kept on death.
  material:
    enabled: false #If the material filter is enabled, only items that are in this list will be kept on death.
    materials: #List of Materials: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
      - BUNDLE
  custom-name:
    enabled: false #If the custom name filter is enabled, only items with the custom names in this list will be kept on death.
    check-contains: true #If this is enabled, the plugin will check if the custom name of an item contains the specified name.
    names:
      - "&aEmerald sword"
  custom-model-data:
    enabled: false
    items:
      - DIAMOND_SWORD:12345
  #Filters that support external plugins:
  custom-crafting:
    enabled: false #If this filter is enabled, all items created by the custom crafting plugin by WolfyScript that are defined in the list will be kept on death.
    items:
      - "myitems:emerald_sword" #Seperate folder and key with a ".".
  executable-items:
    enabled: false #If this filter is enabled, all items created by the executable items plugin by Ssomar that are defined in the list will be kept on death.
    items:
      - "emerald_sword" #Use the id you entered when creating the item
permission:
  enabled: false
  value: "keepitems.use"

# If this is enabled, items will be removed instead of kept on player death.
clear-items: false

# Debugging - If you want to see information about the filters in the console, set this to true.
# Do not use this on a production server as it will spam the console.
debug: false
# The following config setting is only needed if you are making changes to the config.yml file or the Config class of the KeepItems plugin.
# It will also spam the console.
# debug-config: false

Filters

There are currently 6 filters. You can add your own filters by using the KeepItems API.

  • Everything (All items are filtered)
  • Material (checks the type of the item)
  • Custom Name (checks the custom name of the item)
  • Custom Model Data (checks the type and custom model data of the item)
  • Support for the Custom Crafting plugin
  • Support for the Executable Items plugin

API

The plugin has a small api that you can use to add your own filters. The ItemFilter and FilterManager classes contain javadocs that describe how to use the api.

You have to create a class in your plugin that extends the ItemFilter class.

Examples: MaterialFilter, CustomNameFilter

In your onEnable Method, you then have to register that filter using FilterManager: FilterManager.getInstance().registerFilter(new YourFilterClassName())

keepitems's People

Contributors

dependabot[bot] avatar sehrschlechtyt avatar

Watchers

 avatar

keepitems's Issues

Add custom model data filter

Filters items by item type and custom model data

Example:

custom-model-data:
  enabled: true
  items:
    - DIAMOND_SWORD:12345

would filter all items that are diamond swords and have a custom model data of 12345.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.