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
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
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())