ClearInv

ClearInv - A simple plugin that is useful to clear items from your own or other players inventories. You can either clear all items or select item(s). If you have any questions or comments please feel free to email me at [email protected] and I will reply to your email as soon as possible. I generally do not notice that there are comments on the page so that is your best chance at a response.

Version: 2.0.1

Features

  • Can either clear all the items in your inventory, clear certain items, or clear all items except certain items, or clear the armor from your armor slots. If you are using permissions, this requires clear.self
  • Can either clear all the items in another players inventory, clear certain items, or clear all items except certain items. This requires either OPs or permission node clear.other
  • Will post a warning in the server console if a player without the permission to clear others tries to.
  • A custom set of words for some items like rose for red_rose, and dandelion for yellow_flower (if you have any suggestion for new ones please let me know)
  • Allows those with the permission to clear other players inventory to view the inventory first*

Download Links

Permission Nodes

  • clear.self- Allows a player to clear their own inventory (this is good for a server that only allows certain permissions to certain donation levels.
  • clear.other- Allows a player to clear other players inventories. This property will only go to op's and people with this property.
  • clear.admin- Allows the player to clear the inventories of all the players online at the time either completely or selectively. Also allows a player to reload the items.csv

Command Syntax

  • </clear> <playername> except [item1] [item2]...
  • </clear> [item1] [item2]...
  • </clear> armor
  • </clear> reload
  • </clear> undo
  • </preview> <playername>
  • </unpreview>
  • </revert>
  • More

Change Log

  • V 2.0.1 Fixed a null pointer exception on the clear except command.
  • V 2.0.0 Added the debug code which Smiley43210 wrote with some minor tweaks. Also fixed a rare null pointer exception for the preview command. Added the new items for 1.2 to the item list. Updated for compatibility with 1.2. Added a new mode of previewing inventories (continuous, where it will continually update your preview). When previewing an inventory from the server console certain items are red as a warning indicator, this can be adjusted in the config.yml dangerItems value. Added the clear to chest which will clear the items you tell it to a chest that it will spawn 1 block away from you (roughly in the direction you are looking), this requires LWC. Also some minor bug fixes and missing values in the config.yml and items.yml, in order to make sure they are written properly I recommend deleting your old versions before installing this version of ClearInv.
  • V 1.9.6 a-lot of backend tweaks, heres the change log as I have it (from keeping track): Adjusted the output text to be more like other plugins (normal output grey, error output red). Also made the version command output the items.csv version currently on the server. Some major code cleanup (5 or 6 methods removed/combined), lots of comments added, and reworking of various methods. Added a new list to the config which is a list of item id's which have data values assigned to them (instead of the old way where they were hardcoded).
  • V 1.9.5 No major update really, just updating for the latest items, sorry it took so long, things at school have been hella busy
  • V 1.9.4 Ok so this version has a bit of code rewrite and removal. First I removed the autoupdate functionality in order to prevent some bugs. However in doing that I was able to make it so that java 6 was only required which is what everyone is using. I also wrote a function to check for updates (does not download them), and notify you, which should actually be faster in the check aspect than the library I was using. I also have included an items.csv within the jar which will automatically be written if the file does not exist already.
  • V 1.9.3 I fixed the clear except for the server console which I overlooked while fixing it for the players. On top of that I have added the ability to undo a clear with the /clear undo command. This will clear your last undo, even if it was on another player, there are however a few limitations. It will not restore armor if you clear a players inventory slots, it will also not restore everyones stuff if you clear everyones stuff at the same time using the "*" wildcard
  • V 1.9.2 I've had some people having the auto-updater download the item list to the wrong location (and had it work fine on other machines as well) so I added a way to reload the item list without reloading the server. So if yours puts the item list in the wrong place, just move it to plugins/ClearInv/items.csv and then run the clear reload command and it will reload the items.csv. This uses the clear.admin plugin and also can be done via the server console.
  • V 1.9.1 Rewrote the way that the config file is programmed to be much simpler and easy to read.
  • V 1.9.0 Updated and tested for the latest RB of craftbukkit.
  • V 1.8.8 Removed support for the permissions plugin, the choices are either bukkits built in permission system or none at all. I also fixed a couple of rare null pointer exceptions and adjusted and added some outputs. Also some code cleanup as well.
  • V 1.8.7 Fixed the console clear all players command (/clear *). Also some minor code cleanup.
  • V 1.8.6 Fixed the bug in /clear except. Also adjusted the autoupdate so that when it updates the items.csv it will automatically overwrite the old one which required some minor adjustments and a new branch for the item list.
  • V 1.8.5 Made it so you can preview an inventory from the server console
  • V 1.8.4 Added the option to do /revert to get your inventory back while previewing another players inventory. Also did a couple back end tweaks which should increase it's performance slightly.
  • V 1.8.3 Fixes the bug reported by SlyCooperMan, where upon loading the plugin if there is no config file, it throws an exception. Thank you for the report.
  • V 1.8.2 Updated the configuration file loading for the updated bukkit recomended build (1317).
  • V 1.8.1 got superperms in there for real this time. I also have fixed most of the command framework around the console (but clearing all players from there is still broken, for no apparent reason). I also have updated the items.csv for 1.9 which I will also link. I also have it so that you can have the plugin automatically download the updated item list if you give it permission to in the config.yml. Also I adjusted how the config.yml is written so that it will check to make sure all the values are there, and if they aren't it will add them with their default values.
  • V1.8.0 Rewrote most of how it works in the background. Version 1.8 can clear items with damage values (for example only red wool). I have also written a roughly 1600 line CSV which is what is used, so you will have to download this and put it on under "plugins\ClearInv\items.csv". I have also added an option for superperms, which may be buggy, but will be worked on however the permission nodes are the same as before. There are a few known bugs, that I will work on, however for the most part it works. I know for a fact that some of the commands do not work from the server console, the other bug i found is that you can not use /clear armor (however you can clear each individual piece). There may be some other ones I haven't found, but I don't think there are (at least not major ones). You will also have to download this latest version manually due to the number of changes, in order to prevent major complaints about incompatibility with the auto-update.
  • V1.7.1 Makes it so the preview will be unapplied after about 5 minutes (6000 server ticks). Also added the ability for the server admin (or anyone with the permission clear.admin) to clear all players inventories, either selectively or completely. You just have to use * as the player argument. This will also be able to execute from the server console.
  • V1.7.0 Added the ability for OP's and players with the clear.other to view the inventory of other players using the /preview command. To return to their own inventory they just use the /unpreview. If they disconnect or are kicked, their inventory will be returned to them as well (or at least the server will attempt to).
  • V 1.6.0 Code cleanup, and text fixes mostly however it also adds a new feature, added the ability to remove just select armor items, for example if you do /clear boots it will remove your boots. I also have done some major code cleanup in this latest version.
  • V 1.5.1 Updated the autoupdate library
  • V 1.5.0 This is a pretty major update as first off it fixes the bug that prevented being able to send the command via the server console. However it also includes the ability to have the plugin auto-update thanks to @Kalman Olah. If you wish to opt out of this, after the initial run of 1.5.0, then go into Plugins/ClearInv/config.yml and change the auto update value to false. In getting this set up so that it would auto-update it reqired some changes to the plugin.yml which will now make the folder that the config files are placed in ClearInv instead of clear, so once you update feel free to delete the clear folder. In the next update or two it will be code cleanup, and expanding the item list mostly.
  • V 1.41 Made it so you can now just do /clear <playername> instead of /clear p:<playername>. The bug still persists that you can not execute the command from the console unfortunately.
  • V 1.4 Added the ability to clear your armor slots (all of them only at once, I'll probably tweak this later). There is one known bug and that is that the server console can't execute the command, I can't seem to figure this out yet, but will keep working.
  • V1.33 Code cleanup mostly which reduced the size of the jar. It also outputs the item name you put in instead of bukkit's name since some of them are odd.
  • V1.32 Text bug oversight fixed. (also forgot to change the version in the jar file, so don't freak out when it lists the wrong version).
  • V1.31: Added support for pistons, sticky pistons and shears (with smart names instead of the long names given by bukkit
  • V 1.3: added the ability for the server console to clear a players inventory, and tested working on build 935
  • V 1.2.1: small bug fix, where people with permission to clear others inventories couldn't clear their own. Sorry about that bug slipping through.
  • V 1.2: initial public release, includes all the features listed above.

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    31096
  • Created
    Aug 24, 2011
  • Last Released File
    Apr 3, 2012
  • Total Downloads
    24,240
  • License

Categories

Members

Recent Files

Bukkit