LootManager
[General]
This plugin currently has 2 key features: handling mob loot and handling chest/inventory loot with advanced options and timer settings. I will only give a very brief description of the features in this section. Loot can consist of items and money, and is defined trough configs that allow a lot of customization. For items, this includes but is not limited to: custom item names, custom lore, enchantments and randomized quantity). Once loot is configured it can be used for mob drops, dungeon loot, ... As extra features, this plugin can also be used to fill chests once for drop parties, and to keep chests stocked forever. All messages that are sent to players can be configured in a seperate config.
Important:
- If you want to use the money features of this plugin, you need Vault (and an enconomy plugin that supports Vault).
- This plugin was previously known as ChestFiller. Because so many things have changed (config files, database structure) the old ChestFiller configs and database are incompatible. You have to relink all your chests if you want to upgrade.
Some eye candy:
Latest noteworthy additions:
- Money loot is now possible (requires vault).
- Mob loot can now be configured.
- New messages to provide feedback to the player upon loot attempts.
- All interaction with the player can now be configured.
Made a youtube video reviewing this plugin? Send me a pm. If i like it, i'll add it in the description.
[Configuration]
This section describes in detail, all that can be configured in the configs. If you run this plugin for the first time, a map named resources will be created. Inside this map you should find seperate maps for chest configs and loot configs, each containing a default example file. If you want to quickly test the plugin, take a look at the Guide section and link the default file ingame.
config.yml
- auto_update: When set to true, the plugin will connect to curse upon server startups to possibly download newer versions of this plugin.
- mob_drops
- enabled: enable or disable this feature. Default is disabled.
- links:
- mobname:
- config: specify the loot config to be used for drops.
- clear_drops: Default is false
- ...
- mobname:
- worlds: May be used to specify mob drops for specific worlds. This overrides global settings.
- wordname:
- links: Same as above
- ...
- wordname:
Loot config:
- items:
- name: [Optional] The in-game name for this item
- lore: [Optional] The lore for this item.
- id: The minecraft id of the item to spawn.
- dmg: [Optional] The damage to be applied to this item. Can also be used for special items such as a creeper eg (380:50 -> Put the 50 in dmg). The default value is 0.
- dmg_randomness: [Optional] The actual dmg is somewhere between dmg-randomness and dmg+randomness. The default value is 0.
- chance: Determines the chance for this item to spawn.
- amount: Determines the amount of this item to spawn.
- amount_randomness: [Optional] The actual amount of items is somwhere between amount - amount_randomness and amount + amount_randomness. Default value is 0.
- enchantments: [Optional] A list of enchantments that should be added to the item (Enchantments that may not be possible in standard minecraft). Take a look at the default file for the required names and values. The default is no enchantments.
- money:
- amount: The amount of money to give to a player upon looting.
- randomness: The actual amount given to the player is somewhere between amount - randomness and amount + randomness.
Chest Config:
- time: The time (in the format HH:MM:SS) that should pass to fill the chest.
- randomness: [Optional] (in the format HH:MM:SS) The actual trigger time is somewhere between time-randomness and time+randomness. In the default case, there is no randomness.
- empty_on_trigger: [Optional] Indicates whether the chest should be emptied before being filled. The default value is true.
- message: [Optional] Message that should be broadcasted when the chest is filled. The default value is "" (no message).
- players_required: [Optional] Amount of players that need to be online in order for the chest to be filled. The default value is 0.
- trigger_on_looted: [Optional] If set to true, the timer will only trigger when someone accesses the loot. The default value is false.
- Itemsets: A list of different Itemsets (names) to use for this config.
- items: Exactly the same as in loot configs (see above).
- money: Exactly the same as in loot configs (see above).
[Commands]
- /lm help: Show the list of commands and their description ingame.
- /lm configlist: Show a list of config names that are available for linking.
- /lm reload: Reload changes to config files + detect new config files.
- /lm link config: Link the inventory block you are looking at with the given config.
- /lm fill [chestconfig/lootconfig] config: Fill the inventory block you are looking at with the items and chances specified in the config file (Useful for drop parties). If both a loot config and a chest config with the same name exist, the optional parameter is mandatory.
- /lm autorefill : Link the inventory block you are looking at to autorefill mode. No need to specify a config, this command uses the items currently in the chest.
- /lm remove: Remove any links/autorefills from the inventory block you are looking at.
[permissions]
If you want to give users acces to all commands (except for the help command, which should always be available) use lootmanager.*. A server op automatically gains access to all commands.
For finer control use the following permissions:
- lootmanager.help
- lootmanager.link
- lootmanager.fill
- lootmanager.remove
- lootmanager.autorefill
- lootmanager.configlist
- lootmanager.reload
[Guide]
The parameters of config files are explained above. Hava a look at the default configs for a concrete example. This guide explains how to link chest configs ingame and how to fill a chest once with the items in either a chest config or a loot config. The configuration of the language.yml config has been omited because it is straightforward.
Full linking procedure:
First check if the chest config you want to link is available using /lm configlist. Make sure to check your console for possible errors in the config file. If there are errors fix them. After fixing the errors a simple /lm reload should do the trick.
In order to link a config to a chest, type the following command ingame: /lm link configname while looking at a chest/furnace/whathever block that holds an inventory. You should receive a message that the linking process has succeeded.
Filling a chest once
Same procedure as the linking process above, except that you should now use /lm fill config.
Making a chest that's always filled
Simply use /lm link autorefill while looking at the chest you want to maintain stocked.
[Work in progress / Planned]
- Individual chest loot! (25/100)
- Add a particle effect option to chest configs, that is played above the chest to indicate that it hasn't been looted yet (0/100)
- Allow customization of loot standardly generated in dungeons(0/100)
- Provide a more convenient/flexible way to maintain loot (Ingame with GUI?) + allow any current and future item (tipped arrows) to be added.(0/100) - should have priority if i work on this again.
[Addons]
This plugin uses an update-checker (made by Gravity) that makes a connection to Curse to inform you of plugin updates. You can disable this feature in the config.yml file in this plugin's data folder.
This plugin uses PluginMetrics, a plugin to that sends data to mcstats.org to give feedback on usage. If you wish to disable this feature, please set 'opt-out' to 'true' in the 'config.yml' file in the PluginMetrics folder.
[Donating]
If you are feeling extremely generous, you can reward me for my work on this (and possibly future) plugins by donating.
[Donator list (paypal donations)]
- jonny999999 : 7,50 euros
hey, i have a problem who say "Target block does not have an inventory to be linked" and im looking for the chest :(
If you want a drop to be beef when the kill is made without fire aspect, but cooked beef when killed with fire aspect, how do you mark that up?
Hi,
I have a problem. When I set "empty_on_trigger: true" it would still refill the chest without emptying it after the time passes.
If I set "trigger_on_looted: true", no mather if "empty_on_trigger: true/false", it would fill the chest only once. After that, the chest won't refill again.
I need it to be fixed because I'm trying to make some dungeons which's chests would refill only when the players leave the dungeon. I didn't find any good plugin atm but this one can help me if the auto-fill timer starts only when a player has looted the chest.
Good work anyway on this plugin, thank you very much.
was trying to figure out this plugin works and after many adjustments it stopped working, no errors in chat or config. I'm using v3.0.2 going to try v3.0.1
In reply to Ironic8b49:
Hey
I received this console error:
https://pastebin.com/Sz9JL3iM
The plugin goes the same way but for security...
In reply to stepkrep:
Hi Fantasm, best wishes for your work, but i have a problem with the chance parameters.
Every time all the items spawns regardless the chance !
I'm using 1.10.2 and this appear with the default config.
Hi,
A default chance of 1 is used when there is no "chance" field in the yml file. However since you are using the default config this definitely shouldn't happen (it seemed to work fine on my own tests before releasing the last version). I will look into this as soon as i can, and pm you if i need any more details.
I have pushed a fix for this critical problem. This happened in all plugin versions as i accidentally deleted instead of moved a check at some time close to the previous release. Thank you for reporting this! (Your new version will likely download automatically once approved, unless you disabled that feature).
Ok No prob, i'm waiting for the update thanks !!!
@nieelssman
i guess such a feature might be cool as players can instantly see if there is loot when the chest is present. Not sure if i can find the time to add features anytime soon though. The last release was mainly to improve performance.
Great plugin, realy cool. But can you make the chest disapear when they are looted and show them again when they are refilled? Like when you open the chest, the items fell out and the chest disapears. After the timer the chests appears and has new random items in it?
@Kwilith
I haven't heard from people getting this error before, however a null pointer seems to be an error on my end. Just to verify, are you using the default configs, or did you change stuff (since the error happens on parsing the configs).
@SamuelDancing
I'm not really sure what you are suggesting, it sounds a bit like the /cf fill command that is already available.
Hey, i have 2 questions^^
1: is there a way to protect the chests?
I have verry much chests all over the map (random treasures that refill after some time).
At the moment everyone can simply destroy the chests :(
So it would be verry nice if noone could just break the chests or somehow destroy it with creepers tnt etc.
Note1: when i protect the chest with any other plugin (Worldguard, LWC, etc.) it simply removes the link when trying to destroy the chest...
Note2: I also tried setting the permissions to -chestfiller.remove or -chestfiller.* (- means i take that permission from player)
2: Do chests that are verry far away and no player is near (not loaded chunk?) get refilled?
I made a chest that refills 20seconds after it was looted that worked fine!
But when i loot it, teleport far away and come back later it did not refill!
Even if i wait it does not refill anymore. Only if i recreate the chest or restart the server it fills again.
(same happens with trigger_on_looted false it just stops refilling after leaving the chest once)
Is there a way to fix this? maybe always load chunks with chests?
Anyways i might be able to bypass that problem with any additional Chunk loader plugin.
I would be verry glad to get a reply to that questions :)
thanks
-Jonny999999
Hello, i just updated my server from 1.9 to 1.10.2 now i get this error when i start the server:
[im running: git-Spigot-de459a2-51263e9 (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)] (i get the exact same error for an other plugin that seems to be outdated) Despite this error the plugin seems to work fine in the first moment (for new chests) but when i restart the server all the chests i have linked to configs wont refill anymore... I would be extremely happy if you could update this awesome plugin! It plays a verry essential role on my server :) - jonny999999
EDIT: I Solved my problem! The plugin works verry well in 1.10.2 . The problem was that i renamed my world during the server update. I just deleted the database.db file so the plugin had no trouble with not existing worlds anymore^^
My commands doesn't work yet i see the plugin on the /pl. I see that on my console. org.bukkit.command.CommandException: Unhandled exception executing command 'cf' in plugin ChestFiller v2.1at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:645) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerConnection.java:1115) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:950) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:26) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:53) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_112]at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_112]at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:683) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:623) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:526) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]Caused by: java.lang.NullPointerExceptionat constraints.ItemsConstraint.checkConstraint(ItemsConstraint.java:33) [?:?]at input.ItemSetConfig.checkConstraints(ItemSetConfig.java:57) [?:?]at input.ChestConfig.checkConstraints(ChestConfig.java:91) [?:?]at input.ItemSetConfig.validateConfiguration(ItemSetConfig.java:41) [?:?]at input.ItemSetConfig.loadConfig(ItemSetConfig.java:34) [?:?]at input.ItemSetConfig.(ItemSetConfig.java:29) [?:?]at input.ChestConfig.(ChestConfig.java:27) [?:?]at input.ChestConfigManager.reLoadChestConfigs(ChestConfigManager.java:40) [?:?]at input.ChestConfigManager.(ChestConfigManager.java:24) [?:?]at input.ChestConfigManager.getInstance(ChestConfigManager.java:64) [?:?]at commands.LinkCommand.execute(LinkCommand.java:37) [?:?]at miscellaneous.ChestFiller.onCommand(ChestFiller.java:114) [?:?]at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigotmc-1.8-R0.1.jar:git-Spigot-59b08be-0899683]... 14 more
I see that too: [20:08:55] [Server thread/ERROR]: Error occurred while enabling ChestFiller v2.1 (Is it up to date?) Yet i'm on 1.8 and the plugin for 1.8 don't work and the plugin for 1.9 i see it on pl but it don't work.
@jtoney21
but what if you only want to link say 10 chests to one loot config and then link 20 to another loot config so you would need a way to select all the chests you want to link but that is a great idea nonetheless
edit: i have an idea for the next update where it gives you the ability to add a new loot chest to the config in the game, the command to do that might be:
/cf addconfig <Chest_Name> (Chest Rarity (Must Be Specified If Using Anything Impossible To Obtain Without Commands Or Anything That Is Obtained With A Plugin Or Else The Chance To Get It Is 0.001))
and then you would use that while looking at a chest and it would add that loot set with a chance of getting items depending on how rare that item is and it's enchants (unless chest rarity has a value) that would fix any problem with ID's and open up the loot chests to so much more potential this way you can even add custom enchants to a loot chest or add data tags like Unbreakable
Love the plugin! Absolutely wonderful for a variety of applications.
I would love to see "Add further support for managing a large amount of chests (e.g. /cf linkall, /cf removeall)" sometime in the future!
@_fantasm0_
Thanks. Potions have changed so now the old config entry of id: 373-16421 doesn't work (gives me oak saplings for any potion). There's a variety of potions to work with now and then there's tipped arrows/potion arrows that can be created from them also. Let me know the config entry for these if they are supported.
Also, you can't /cf link <config> when looking up at a chest. Only when looking horizontally at it or down. Not directly up.
Thanks!