MaterialIdLib
Abandoned
This project is abandoned, because it is no longer save to get materials by IDs. Please use material names instead.
MaterialIdLib is an linkage between Materials (org.bukkit.Material) and IDs (java.lang.Integer). So you can get a Material by an ID and the other way. So you don't have to use the deprecated methods from Bukkit.
Permissions:
- materialidlib.warn
- Anyone with this permission will be notified when MaterialIdLib is incompatible with the bukkit that the server is running on
JavaDoc: http://docs.blockhaus2000.com/materialidlib
GitHub (Source Code): https://github.com/Blockhaus2000/MaterialIdLib
Use MaterialIdLib
NOTICE: Don't forget to add softdepend: [MaterialidLib] or depend: [MaterialIdLib] to your plugin.yml
NOTICE: See JavaDoc Source at GitHub (https://github.com/Blockhaus2000/MaterialIdLib) for return types or anything else
// Get a Material by an ID MaterialIdLib.getMaterialById(int id); // Get an ID by a Material MaterialIdLib.getIdByMaterial(Material mat); // Get available Materials MaterialIdLib.getAvailableMaterials(); // Get available IDs MaterialIdLib.getAvailableIds(); // Get the whole Material - ID linkage MaterialIdLib.getMaterialIdLinkage();
Information for Maven Projects
<repository> <id>blockhaus2000-repo</id> <url>http://repo.blockhaus2000.com/</url> </repository> ... <dependency> <groupId>com.blockhaus2000</groupId> <artifactId>materialidlib</artifactId> <version>See GitHub</version> <packaging>jar</packaging> </dependency>
-
View User Profile
-
Send Message
Posted Feb 13, 2014@LenonMojang
At first: Sorry for the late answer, I haven't seen your comment.
Now to the question: GetTypeId: You can use MaterialIdLib.getIdByMaterial(Material mat); to get the ID of a material.
getData: No, beacause that is based on a material in the internal bukkit source. We cannot rebuild it with a plugin, so you have to use the deprecated method instead. Sorry for that :( But we tried to implement that, because we needed it too. But we cannot do that :(
-
View User Profile
-
Send Message
Posted Dec 31, 2013supports GetTypeId and getData?