Inactive [FUN/ECON] KarmicShare v0.32 - Bukkit alternative to Ender Chest [1.2.5-R4]

Discussion in 'Inactive/Unsupported Plugins' started by Mitsugaru, Jan 6, 2012.

  1. Offline


    Version: v0.32
    BukkitDev page
    GitHub source


    This plugin acts as cloud storage for items that anyone (with the proper permission nodes or in the same group) can give and take items to/from. However, in order to prevent players from abusing the global / group item pools, there is a configurable per-item karma system in place to limit how many items a player can take without giving back.

    This system can effectively create protected item pools that are accessible anywhere: between different locations, worlds, even servers (by sharing MySQL). Essentially, its a "one chest to rule them all" plugin. Players and groups can create these item pools with peace of mind that their items are safe from griefers/theives/accidents. Think of it like Dropbox for items: Just put your items in KarmicShare and access them wherever and whenever.

    • Shared global pool of items based on player item donations to the community.
    • Per-item karma multiplier: specify which items have more karma points.
    • Admin commands to manage the item pool and player karma.
    • Nifty (optional) effects :D
    • Enchantment support
    • Potion support
    • Physical chests that link to the item pool
    • Chest page support
      • Can hold more than 2000000000 pages of items! More item slots than you will ever need.
      • To change the "page" of a linked chest, either left click the chest or click on the sign (left or right click). Or jump to a specific page using an in-game command.
    • Group support, groups have their own shared item pool
      • Shift click a link sign / chest to cycle through your groups. Or use a command to set your selected group.
    • Multiworld control: Define which worlds have / don't have access
    • Vault support
    • MySQL support
    • Way more powerful than native Ender Chests
      • Comment on comparison here
    • Economy support
    Signs and Chest access (open)

    To have a chest hook into the item pool, you need to have a wall sign directly above the chest with the tag [KarmicShare] (including brackets) on the second line.

    Commands and Permissions

    • Basic economy support
      • Use your economy system in place of the karma system
      • Requires Vault and a supported economy plugin
    • Separate give / take values on items
      • For default settings in the config.yml, set karma.change.give and karma.change.set
    • Completely redesigned per-item karma configuration structure
      • Make sure to update your karma.yml to reflect the new structure
    Changelog (open)

    • Fixed NPE from previous version on load.
    • Overhauled how the configuration is handled internally
    • Consolidated some duplicate code
    • Fixed so that blocks are not placed when interacting with signs
    • Fixed some FindBugs issues
    • Other minor edits
    v0.315 skipped
    • Fixed admin commands that dealt with groups / karma.
      • Fixed resetting / setting a player's karma
      • Fixed remove a group
      • Fixed draining items from a group
      • Updated help to show the cleanup command and updated drain parameters
    • Displaying groups should now word wrap appropriately (or close to it)
    • Changes to inventory click logic
    • Removed internal custom version of LogBlockQuestioner.
      • Old questions are now using the Conversations API.
    • Fixed adding initial groups to players with null group.
    Thanks again to FlukiestEmperor for taking the time to help me step through the issue.

    • Fix adding players to the new, persistent groups, if they lack groups.
    • Fix on exception when grabbing player groups.
    • Fixes group commands to use the new format correctly now.
    • Fixes the right click add single item to chest.
    • Fixes sign permission check.
    • Fixed "duplication" issue with a specific inventory interaction
    • Using the self group should no longer change karma
    Thanks again to FlukiestEmperor for catching the above issues.

    • Multiworld control: define what worlds should not have access to KarmicShare
      • List of disabled worlds should be added to the config. The new path will automatically be added in. World names are not case sensitive.
    • Fix permissions check for certain commands.
    Massive Overhaul
    • Major changes throughout the plugin.
      • Database schema changes. The updater should handle it properly, however I urge you to read the important note below regarding this.
      • Reduction in overall complexity. Should produce faster results for certain situations. (Also looks cleaner too)
      • Removed anything unused / outdated. (Unless its to be re-added later)
      • Consolidated old and similar code into shared methods.
      • Internalized custom SQLibrary classes so that changes do not conflict with other plugins.
    • Use of custom inventory holder rather than populating the chest's inventory.
      • This means that a chest's previous items will **no longer be wiped**.
      • Also, people viewing the same inventories from different locations will now be able to see other player edits in real time.
      • This enables the chest inventory view to be accessed via a command as well.
      • The inventory will always emulate the size of a double chest, even if the chest opened is a single chest.
      • The inventory, when opened, will be titled the group your are viewing and the current page.
    • Groups and interactions have been completely overhauled
      • You no longer have to define a group for the link sign. Groups are now tied to the player.
      • To cycle between groups, you can either:
        • Shift click the sign/chest to cycle in increments of the groups you are a part of
        • Use command to set your selected group, so long as you are a part of that group or have the appropriate ignore permission node.
      • Your currently selected group is highlighted in your group list in the /ks command.
    • List command now allows for viewing and paging through any group (no longer statically defined as "global").
      • This is tied to your currently selected group.
      • Should work the same for give/take commands as well.
    • Fixed issue with ghost item exploit of enchanted items.
      • This was due to not having an order to the enchantments of an item. Remedied with custom enchantment wrapper to provide necessary order / sorting.
    • Removed the automated "cleanup" task and replaced it with a command.
    • Command changes:
      • New command to set your selected group: /ks group set <group>
      • New command to remove irregular items (items with negative amount) : /ks admin cleanup
      • New command to open an inventory view anywhere: /ks open [page#]
    • Permission changes:
      • Removed unnecessary node -
      • Added node - KarmicShare.admin.cleanup
      • Added node -
    Thanks to FlukiestEmperor for the brainstorm that led to these changes.
    And thanks to everyone that has been using this plugin. Wouldn't be here if it weren't for your support :D
    • VERY important changes to the database. While I've tested it to be a clean transition, we all know things can go wrong... So, please back up your databases just in case the updater doesn't work entirely correct.
    • Also, in the case that you have groups that have capital letters, please change them to be lower case in the interim.
    • Fixed tools with high durability with certain inventory actions, most notability shift-click and switching items.
      • Thanks to odielag for pointing out that it was still around
    • Fixed SQL query with the list command
      • Thanks to @consultingdetective for notifying me
    • Internal changes to how permissions are handled, another set towards 0.3
    • Fixed exploit with diamond tools / items with high durability (which means soon to break) reverting to back full durability.
      • Old items prior to this will automatically be "fixed" to show appropriate durability.
      • Thanks to odielag for pointing it out.
    • Internal restructuring in preparation for next major milestone, 0.3.
    • Fixes exploits and errors with player-chest inventory interaction logic.
    • Should now play nice with custom inventories of other plugins.
    • Increased intervals between cleanup task. Probably not even needed at this point.
    • Fixed shift right click from chest.
    • SQLibrary changes.
    If you use any of the following plugins, update them as well due to this internal library change:
    • Tested to resolve conflict with OpenInv and probably any other plugins that interact with inventories.
    • Also, tested on a 1.2.4 server.
    • Fix for double chests as Bukkit has fixed their issue.
    • Actually cancel event on the NPE check for inventory interaction.
    • Added NPE checks for Inventory interactions.
    Skipped v0.253 for no reason

    • Ability to jump page numbers for chests using chat command: /ks page <num>
      • Requires chests to be enabled and player to have chest permission node: KarmicShare.chest
    • Chests now correctly clear contents when they are destroyed by an explosion.
    • Major changes to custom SQLibrary classes.
    • Removed dependency on Spout. Uses Bukkit API for Inventory click events.
    • A lot of minor changes to update to the latest Bukkit API.
    • Updated to new Event system of the latest recommended builds.
    • Completely assimilated custom LogBlockQuestioner package.
      • Should resolve conflicts with existing LogBlockQuestioner.jar. They should now coexist fine.
    • Config is reloaded before saving on server stop. Changes to config.yml should now be preserved on plugin disable.
    • Removing a group also removes the group's associated items from the item table.
    • Massive internal refactoring and optimization.
      • Smaller file size for what its worth...
    • Fix on the drain command when giving a specific group name.
    • Minor edits on strings.
    • MySQL support
    • Drain command now accepts a group name, so you can specify what item pool you want to empty.

    If you were on a release before v0.2, and wish to use MySQL. Run the plugin as it at least once for the following reasons:
    • Add the config automatically to the config.yml.
    • VERY important changes to the database and table names.
    If you do not run it at least once, and configure everything manually from MySQL, then there is no way use the built-in auto-import process. You will have to either: 1) Manually import from SQLite to MySQL 2) Rename the SQLite database tables to the appropriate table names 3) Revert the version number to something before '0.2', set mysql.use to false in the config, and then run at least once to update the SQLite tables to the appropriate names

    Version 0.192
    • Better Spout checks on the Listeners
    • Minor edits to the internal LogBlockQuestioner
    Version 0.191
    • Bows are now considered tools, so enchantments and durability will be appropriately saved.
      • Sorry for not catching this earlier in regards to durability. (Maybe it sorta was working...?)
    Version 0.19
    • Full right-click support for chest access
    • Potions now stack appropriately when using the command to take them from the item pool
    • Right clicking the link sign now goes to the previous page. Should make navigating the chest pages a bit nicer.
      • Forwarding the page is still left click either the sign or the chest. This should allow for some consistency in that left goes forward and right goes backward.
    • Chest access re-population occurs on a 1-tick interval, instead of the 5-tick. Changes made to chests should now be ever so slightly faster.
      • IF this is an issue, please let me know.
    • Adding ALL the permission nodes (or a lot at the very least)
      • KarmicShare.commands.list : Allows user to use the command, /ks list
      • KarmicShare.commands.value : Allows user to use the command to view multipliers, /ks value
      •* : Allows users access to all group commands
        • : Allows user to create groups
        • : Allows user to add players to their groups
        • : Allows user to remove players from their groups
        • : Allows user to leave their groups
      • KarmicShare.admin.*: Allows admin to access to all admin commands
        • KarmicShare.admin.add : Allows admin to add generated items to item pool
        • KarmicShare.admin.reset : Allows admin to reset player's karma
        • KarmicShare.admin.set : Allows admin to set a player's karma
        • KarmicShare.admin.drain : Allows admin to drain the item pool
        • KarmicShare.admin.reload : Allows admin to reload plugin
        •* : Allows admin access to all group admin commands
          • : Allows admin to create groups
          • : Allows admin to delete groups
          • : Allows admin to force add players to groups
          • : Allows admin to force remove players from groups
    These permissions were added to have more fine control over what players had access to. For instance, you would probably want mods the ability to force add players to a group, but not access to the drain command. Or, maybe you want to hide the command-based list function from users to persuade them to use the chests. Maybe you want players to add and create groups, but not to remove other players. Etc, etc.

    Please adjust your permissions accordingly

    KarmicShare.admin has been replace with the modular permission nodes. For a better list, as to how its supposed to work, look on the Commands and Permissions page.

    Version 0.18
    • ProperPEX support.
      • Sorry, apparently Vault was getting first dibs when checking permission. Now, Vault is second if PEX is detected. This should fix permission errors with PEX and Vault.
    • Changed group commands to support multiple users:
      • /ks group add <groupname> <player> [player2]...
      • /ks group remove <groupname> <player> [player2]...
      • /ks group leave <group> [group2] ...
      • /ks admin group add <group> <player> [player2] ...
      • /ks admin group remove <group> <player> [player2] ...
    • Added more defaults for items thanks to @holsamoht
    Version 0.17

    • Chests now display the stacks of the items rather than a singular item
      • Linked chests now behave a lot like regular Minecraft chests. Interactions should now be much faster and enjoyable.
    • The /ks list command now only shows items for the global group rather than all the groups.
    • New permission nodes specifically for the chat commands /ks give and /ks take. Please update your permissions accordingly.
      • Respective nodes are: KarmicShare.commands.give and KarmicShare.commands.take
      • Please note, these are ONLY for chat commands. Not needed for chest access. However, you still need the main command, KarmicShare.give / KarmicShare.take to either give/take. Much like how chests enable viewing, but you still need the respective permissions to do anything.
    Version 0.16

    • Cleanup task occurs every minute and is much more concise of a query.
    • Now check against the impossible, rather than assume that the impossible is impossible.
      • Basically, rather than only removing entries if the amount equals 0, remove entries if they're zero or negative.
    • Should have fixed dupe bugs on chest access.
      • Shift clicks may or may not still be an issue....
    • The ignore permission nodes are now default to false, and thus must be explicitly added.
    Version 0.15

    • Critical update: fixed typos on queries.
    Version 0.14

    • Initial group support
      • Players can create and add people to groups.
        • When adding players to a group, if no group is specified, it will use your main group (if you are in a group), which is the first group listed when using /ks.
      • Admin commands to manage/force groups and membership.
      • Chest support for groups.
      • Due to sign line limitations, group names must be at or less than 15 characters, alphanumeric, no spaces.
    • Chest link signs have been modified. You must put the [KarmicShare] tag on the secondline, or it will NOT be detected.
      • To link a chest to a group, put the group name in the first line. You may colorize it / or use caps.
      • Due to the new group system, current signs will need to be remade.
    • Fixed a critical bug regarding enchanted items and chest access.
    • Added a cleaner thread, in the event that an item's amount hits 0 or a negative number. This does not ordinarily happen, and it probably only occurred during testing. However, just in case, this cleanup task occurs every hour only for erroneous item entries. So, all in all, it probably isn't necessary unless the SQLite database gets mucked up from an external source.
    • Drain, reset, and other admin commands now ask for confirmation (if you're in-game. Console bypasses it.), thanks to DiddiZ's LogBlockQuestioner.
    • Added new permission nodes, all of which default to op:
      • KarmicShare.ignore.karma - Completely ignores the karma system for the player. Player's karma does not change.
      • - Player is treated as if they are in the group, even if they're not. Thus, they're in "all" groups essentially.
      • KarmicShare.ignore.* - has the above nodes enabled.
    Please note, the item table needs to be rebuilt due to database schema changes. While I have repeatedly tested the updater for tables of v0.13 (and thus supports any other previous versions), if for whatever reason it isn't able to smoothly transfer your item database, then I can only suggest removing the database file and starting anew. Once again though, I have tested it and it ought to work just fine. It may take an extra second when enabling on update to move stuff over into the new table, but it ought to be rather quick.

    Version 0.13
    • CRITICAL : Fixed bug on wall sign breaking saying no permission. When moving stuff around, I forgot the vital check to see if it was even one of the plugin signs and not a generic sign that I shouldn't care about. VERY SORRY ABOUT THIS. D:
    Version 0.12

    • Fixed shift-click from linked chest to player inventory.
    • Made the item re-population occur twice as fast.
      • If item re-population does not occur, and you know the item still exists in the pool, please let me know. It takes 5 ticks now before it adds the item back to the chest, so long as it exists, versus the 10 ticks in previous versions. I don't believe this should be an issue, especially considering the shift-click task on the player side is set to only a 1 tick delay. I'll keep testing and see if 1 tick for the chest is alright or not.
    • Updated version to 0.12
    Version 0.11

    • Shift-click from chest to inventory seems to be bugged. Currently disabled until ghost item issue is fixed.
    • When using /ks version to show current config, chests state is given now.
    • Updated version to 0.11
    Version 0.1

    • Physical chest support :D
      • To make a chest linked to the item pool, just create a wall sign above the chest with "[KarmicShare]" (no quotations).
      • Or place a chest under a sign that has been detected and it will activate.
      • To cycle through the item pool using chests, either left click the chest or left/right click the sign. The page number will change appropriately.
      • Using chests require the KarmicShare.chest permission node.
      • Creation/Destruction of [KarmicShare] signs require the KarmicShare.sign permission node.
      • Signs/chests that are destroyed do NOT drop items from the item pool. So, they're safe to destroy.
      • Items in chests only have a stack size of 1. Thus, each item is a representation of a unique item in the item pool. When an item is taken out, it is automatically repopulated if there is still more in the pool.
      • Right click has been disabled for KarmicShare chests due to a ghost item bug. To ensure that users don't encounter such issues, right click events are cancelled/denied.
      • Chests are enabled by default. To disable them, make sure that you set chests to false in the config.yml before the plugin is enabled.
      • Due to a weird dupe bug, that shouldn't happen, signs cannot be placed next to existing, verified [KarmicShare] signs.
      • Item edits are reflected in the item cache for the command-based version of item-lists. So, everything should be in sync.
    • Per-item karma has potion support.
    • Vault support for permissions.
    • Generic cleanup and edits on minor sections of code.
    • Changed version number to 0.1
    Important notes: If you want to use chests, you NEEDto have the SpoutPlugin on the server side. If you don't, then you cannot use chests at all. This is vital as there is no base Bukkit for me to get the individual clicks and interactions in an inventory at the moment.

    Delayed update due to working on a custom jail plugin solution for my server.
    If you encounter any issues, please don't hesitate to create a ticket.

    Version 0.09
    • Full potion support! :D
      • Only supports known, usable potions. The unused potions are stored correctly, however they have the display name of "potion"
    • Music discs are now appropriately named, following the Minecraft Wiki.
    • Fixed cauldron name, used to be "cauldron item" due to bukkit's naming scheme.
    • SQLite database will be auto-updated to support potions, so, no need to replace the database file.
    • When taking potions or glass bottles from the item pool, they are given one at a time since they don't stack normally anyways.
    • Item inspection command, /ks info, supports potions with a new boolean check.
    • When using the admin command to add potions to the item pool, the data value is actually the durability. Just use it as normal and it will work.
    • Changed version number to 0.09
    Sorry for the delayed update as well as the missing potion support on earlier versions. I have been working on my personal fork of the CashFlowplugin for the past few days. This took up much of my time away from my current projects. I didn't know that potions were so special and weren't being handled correctly. Same with music discs, I thought that the names would have been in Bukkit...

    Anyways, majority of special items are supported now. And since my fork of CashFlow is mostly done and stable I ought to be able to update this more often. I'll be trying to work on physical chests soon.
    Thanks to all those that have been using my plugin :D

    Past Versions
    • Missing the change logs. However, all commit changes can be found on the GitHub link.
    jerohi, odielag and columb like this.
  2. Offline


  3. Offline


    any way of making this adapt into towny so each town can have an individual pool for there town ??
  4. Offline


    Well, while I may not directly integrate with Towny, the plugin allows players to create group item pools:
    @holsamoht requested Factions support for the same reason. While I will look into Towny support, there may be some restrictions that bar me from doing it:
    If I can't get integrate with Towny to "auto-gen" an item pool, the players themselves can still create their own pool and add their residents/users to have access to it.

    /ks group create <groupname>
    /ks group add <groupname> <player> [player2] ...

    And as I stated in my earlier quote, anyone of a group can add/remove players to the same group. So, it ought to be entirely player managed (for the most part).
  5. Offline


    right that sounds really good cheers for that mate ill try it with my users to see if they can understand that and hopefully you can get it to read from towny aswell thanks
  6. Offline


    If this helps any, here's a quick walkthrough:

    Say I want to make a group item pool for my friends:
    I do: /ks group create awesome
    And this creates the group named "awesome" if it isn't already taken.

    Then I just add some people to the group: /ks group add awesome sticker cl ell
    And this adds three people (if they're online) to the group. Note, that the names autocomplete for me.
    After that, they can add anyone else they feel like to the group using the same command, just with different names.

    Lastly, I make a chest (or double chest) and put a wall sign directly above it with the following:
    Line 1: awesome
    Line 2: [KarmicShare]

    and leave lines 3 and 4 empty since it'll be reformatted.
    The chest would then be linked (and should tell the player who put the sign that it linked, as well as make the tag colored aqua) to the item pool and only players with the group "awesome" can access it.

    Hope the above helps in explaining it. :D
  7. Offline


    right that does thanks if i have your permission i will post this in my guides forum on website for server
  8. Offline


    Absolutely, whatever helps. :)
  9. Offline


    This is cool, but could there be a way to make some chests store things independently from the pool? It would act the same as a normal chest, except that it changes your Karma when you store things in it or take things out of it.
  10. Offline


    Yes, this is what the group system allows for. The group creates a separate item pool that only allow those of that group access to.
  11. Offline


    Ah, I see, Ill make each chest belong to a different group, and give everyone ""
    so that everyone can access them.
  12. Offline


    2012-01-15 13:46:54 [SEVERE] Error occurred while enabling KarmicShare v0.19 (Is it up to date?): tried to access class de.diddiz.LogBlockQuestioner.LogBlockQuestionerPlayerListener from class com.mitsugaru.KarmicShare.KarmicShare
    java.lang.IllegalAccessError: tried to access class de.diddiz.LogBlockQuestioner.LogBlockQuestionerPlayerListener from class com.mitsugaru.KarmicShare.KarmicShare
    at com.mitsugaru.KarmicShare.KarmicShare.onEnable(
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(
    at net.minecraft.server.MinecraftServer.t(
    at net.minecraft.server.MinecraftServer.a(
    at net.minecraft.server.MinecraftServer.init(

    What do I do?
  13. Offline


    Make a ticket on this issue on BukkitDev.

    Also, I will uploading v0.192. I made some minor changes. Let me know if it works out for you.
  14. Offline


    Version 0.2 has MySQL support, for those that had been wanting it.

    Version 0.22 should fix your issue. Please test and reply.

    If version 0.22 doesn't have the fix, version 0.23 will. I may have gotten my numbers mixed up XD
  15. Offline


    Thanks, I'll try them!

    Works perfectly :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 22, 2016
  16. Offline


    Good to know and glad we could get it resolved.

    If you have any other issues or suggestions, let me know.
  17. Offline


    How about introducing a reward system? P.e. on karma level 250, you will receive a reward out of 3 or 4 possible (configurable), on karma 1000 more valuable rewards, and so.
  18. Offline


    What determines how they get the reward? When/How are they rewarded?

    If a player is "rewarded" upon reaching/going above a certain karma limit, I can see players taking advantage of this by simply alternating between the reward levels...

    Do you have any ideas on how to counteract the above issue?
  19. Offline


    Hm, maybe when they reach a certain karma amount, they are notified ingame and the item is just added to his inventory.


    Lets imagine we have 3 differents rewards, each one determined by a higher karma level than the previous one. And lets call them "reward1, reward2 and reward3".Simply by creating 3 mysql tables: reward1, 2 and 3. When a player reaches reward1, the "reward1" field for that player would change from "no" to "yes", thus that player wont receive "reward1" anymore. On flatfile, it could simply add "reward1" on the player data, having the same effect.

    By the way, thanks for your great job with this awesome plugin :)
  20. Offline


    Alright. I'm thinking of a different schema that'll integrate to the current tables rather than make a bunch of other ones... but I see what you mean and its possible for me to implement.

    It might be some time though, as I'm rather focused on my Capstone project for my university, just so you know.
  21. Offline


    Looks awesome!
    Nothing for my server tho but still!
    I hope this gets alot of notifications, It seems pretty good and could be fun on small friendly whitelist communitys etc.

    So goodluck with the plugin!
  22. Offline


    I've noticed that most people tend to comment on the BukkitDev page. Which is good for me as I get the email notification there and not on the forums here.

    And the plugin is very flexible and can scale to your needs.

    Thanks for your support. :D
  23. Offline


    Cool Plugin:D
  24. Offline


    One person let me know that if they put a diamondpickaxe with low durability in the chest and take it out, the durability is back to full.
  25. Offline


    Thanks for letting me know. I'll work on fixing that exploit.

    EDIT: Try version 0.26. It should fix the bug. If its not available on the BukkitDev page, you can grab it from the project's GitHub downloads page as well.
  26. Offline


    Bump for major release. As usual, its also available on the GitHub download page as well.
  27. Offline


    Ok you know what this needs is another version called Megatrade, kinda like Runescapes Grand Exchange but it should be able to link to multiple economy plugins like "IConomy" ecspecially. but this would be a great way to sell and buy objects of value it would be very useful on very large servers if you think it is a good idea come to my server email me msg me at or any other way you can think of i do check my youtube channel mostly for hate mail though
  28. Offline


    Actually, its been in the pipeline to add economy support and use it in place of the built-in karma system.

    If anything though, I'm actually working on a market system... in the middle of trying to get the first alpha release out.
  29. Offline


    Are you going to work on completely replacing the ender chests?
  30. Offline


    They don't have to "replace" ender chests. I will still allow the ender chest's native implementation to work side by side with KarmicShare. What I will work on in the future, once the update is released, is allowing the link sign to support the ender chest to hook into KarmicShare.

    Or was it something else that you meant?

Share This Page