wwsean08 / clearinv Goto Github PK
View Code? Open in Web Editor NEWA bukkit plugin for selectively clearing an inventory and allowing ops to preview an inventory
Home Page: http://wwsean08.com/?page_id=22
A bukkit plugin for selectively clearing an inventory and allowing ops to preview an inventory
Home Page: http://wwsean08.com/?page_id=22
This is the bukkit ClearInv plugin, which allows you to selectively clear a players inventory or preview that players inventory. Change Log: * V 2.0.2 [WIP] Added 2 new permission nodes specifically for previewing inventories, and removed some unused code in the preview command parser for an unused mode (was currently the same as continuous). I may try and implement the full preview again sometime. Refactored InventoryRunnable to PreviewaInventoryUpdater. Fixed a bug when selectively clearing items with data (though I can't seem to get leaves to clear as of right now still) * 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). * 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 Added a quick command to check the version /clear version. Made the clear perm and non-perm match up for clearing other players. Also updated for minecraft 1.1 * V 1.9.4 Code Cleanup, and 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. Also added command executors for the preview commands and gave them their own class. * 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 Updated the way that the config file works to be much simpler to read and work with. * 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/added some outputs * 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. * V 1.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. * V 1.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 inventorys, either selectively or completely. You just have to use * as the player argument. This will also be able to execute from the server console. * V 1.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 required 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. * V 1.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. * V 1.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). * V 1.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.
Hey so I was reading your change log, and I saw that you had to remove your auto updater due to Java version conflicts. My plugin GetPerms has an auto updater, and it only uses Java 6. Feel free to use it :) ! Note: it doesn't replace the jar, just downloads it to the specified location.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.