myPluginWiki
This plugin works as a library for other Minecraft plugins. It includes a large amount of information pertaining to Minecraft items and is very useful as a tool for many plugins. For example, myGuardDog and myOpAids (soon to be released) require this plugin. This plugin also includes a couple of helpful informational commands that anyone on the server can use!
features
method-managed library
- This plugin contains a large amount of information stored in a couple of enormous arrays.
- If you're a developer and you want to use this plugin's library of information, you don't need to just access those arrays themselves. Just use one of the simple methods that can organize the information in the arrays for you. For example, the getItemName() method will give you the full name of the item designated using the block, ItemStack, or simple I.D. and data values given.
- The most important feature of this library is its versatility; it contains not only every item in the game by name and I.D., but also every different name of the item for every available data value and every name you could possible think of for the item. In other words, you won't just find "potions", you'll find "potions" in general (data = -1), "water bottles" (data = 0), "Awkward Potions", and so on and each of these different things comes with aliases (for example, "water bottles" can also be "canteens" or whatever else someone might think to call it).
easy to use, versatile, simple informational commands everyone can use
- This plugin has commands that let players on your server easily access basic Minecraft information. You can look at the commands below to get more information.
methods
^ Click me to read about all the methods available to the Java developer that uses me!
commands
/id [item name or I.D.] outputs the item name and I.D. that coordinate with the item name or I.D. given. You can type just the first few letters of an item name to get a result and you can type [I.D.]:[data] to specify the data value of the item.
/recipe [item name or I.D.] outputs a text-based diagram of how to craft the item given in a crafting table interface. Note: this command is not fully complete yet! Not all items have recipes written out for them yet!
permission nodes
There are none! Anyone can use the commands!
source code
^ Click me to go see my source code on GitHub!
other plugins
myGuardDog
- Griefers can go find a different server to grief on.
myUltraWarps
- This super simple plugin has so many features your head may just implode.
donations
^I run a Minecraft server myself and it costs a good amount of money each month to have it hosted, so if you love this plugin, you can click the link above and donate to show your gratitude! Every cent helps!
my server
^I know that most of you here are Bukkit server admins yourselves, so you probably won't be interested in this, but I have a server. If you're interested, I put a link to our website here. Our server is hosted by FragNet and is up 24/7. It's a basic Survival freebuild server with a few basic plugin modifications. Building is vanilla, but everyone can warp freely (using myUltraWarps). I have written almost half of the plugins on the server and we're moving toward having all the plugins written by me. There are some plugins of mine on that server that aren't even on Bukkit yet. If you feel like visiting, please do! We love new people!
comments
If you have any opinions, ideas for new features, bugs to report, or anything else, pleeeeeeeeeeeeeeeeeease post a comment below! Also, if you feel inclined to be harsh, I won't take it personally. Feel free.
Have fun in the library!
@metalhedd
I see your point(s), but the problem with the methods you're suggesting to do what this plugin does is that they return unformatted results that have to be processed. Besides that, most parts of CraftBukkit's naming systems are badly put together and the rest are just flat wrong.
For example, I was having trouble with a statement to check if something was a wooden door or not ("if (block.getType() == Material.WOOD_DOOR)"). Well, after frustration, testing, and confusion, I finally found the problem. Material.WOOD_DOOR is the wooden door item; Material.WOODEN_DOOR is the wooden door block type. How was I supposed to know which was which? How was I supposed to know that there were two Materials for the same thing that cannot be differentiated by name alone? CraftBukkit didn't care. They wrote it anyway.
...and surely the enchantments make everything difficult. They didn't name one single enchantment properly except Silk Touch. Enchantment.LOOT_BONUS_BLOCKS? What the heck? Oh, it's Fortune. Enchantment.WATER_WORKER? Oh, wait, that's Aqua Affinity, and there's no way to get the proper names for any of these enchantments from CraftBukkit.
MyPluginWiki's naming system is properly formatted, correct, more human-readable rather than machine-readable, more lenient, and able to handle data values. In getItemName() methods, you can decide whether the item name you want returned is singular or plural, whether or not it has an article before it, and whether or not you want the data suffix that allows myPluginWiki to differentiate between items with different data values just by reading the name even if the different items don't have different names with different data values (like logs, oak logs, and birch logs). MyPluginWiki can even understand when you try to use items that share item I.D.s with other items like water bottles and Potions of Harming. CraftBukkit is next to useless in that respect.
Those "silly and unnecessary 'translations'" you mentioned actually have a purpose. If someone uses a command or any kind of search mechanism which includes the name of the item, that player doesn't have to get the item name exactly right for the command to work. For example, myPluginWiki comes with a very useful /id command that anyone on the server can use. The beauty of /id is that if you want, say, the item I.D. of a Bottle o' Enchanting, you don't have to type "/id Bottle o' Enchanting" exactly right for it to work; you can type "/id bottl of enchant" or "/id bot ench" or, using a 'translation', even "/id xp bottle". That's the purpose of the 'translations'; you don't necessarily have to know the proper name of the item for myPluginWiki to identify it. If you say "xp bottle", myPluginWiki knows you mean a Bottle o' Enchanting because "xp bottle" is one of its 'translations' for Bottles o' Enchanting.
If you're just trying to identify items within your program, myPluginWiki isn't of much help. There are much simpler ways to do that, like you said. For that, why not just use Material.[whatever].name() or just the Material or I.D. value or whatever else? However, when it comes to any kind of user interface or human interaction like sending a player a message to tell them their carrot on a stick (you know, CARROT_STICK) is now enchanted with Unbreaking III (you know, DURABILITY=3) or describing an event in a log file as "REALDrummer broke some cobblestone", there is nothing that even compares to the tools you get with myPluginWiki.
That, my friend, is the purpose of this plugin.
Also, if you feel inclined to be harsh, I won't take it personally. Feel free.
well... since you asked :P
I can't imagine ever using something like this... All of the information is already available in-game through more reliable methods.
The arrays are filled with silly and unnecessary 'translations' like these: { { "air", "some air" } }, { { "stone", "some stone", "rock", "smooth stone" } }, { { "grass", "some grass", "grass blocks" } },
I just can't imagine a situation where someone wanted to be able to parse the string 'some grass' into a Block ID. The idea is absurd to me.
What I find most troubling is that even though all of this information (with the exception of unnecessary renamings) can be obtained programatically, you opted to write it by-hand into a massive set of arrays. Its too error prone, and I would never trust that you didn't miss something or make a mistake. ESPECIALLY With the recipes.. the source code is a nightmare to read, so I have to imagine it was a nightmare to write and verify as well. I would be shocked if there aren't at least a few mistakes in there... so I would never consider using it when I can just as easily do getServer().getRecipesFor(itemStack);
Sorry... :(