How to hook SkinList
Use the bukkit event system and the event
- com.discovrus.SkinList.SkinListEvent
@EventHandler public void onSkinListEvent(SkinListEvent event) { /* * Do something here * * Disallowing the event will kick the player! * event.disallow("You can not use that skin!"); * event.allow(); */ }
To make your plugin query for a string use the method call
- public void com.discovrus.SkinList.SkinList.getHash(String player, SkinListCallbackInterface CB)
To make a callback use some code like
/* * @author Z903 */ public class MyCallbackClass implements SkinListCallbackInterface { @Override public void onSkinListCallback(String player, String hash) { // Some code here to do stuff! } }
And pass that to
SkinList.getHash(playerName, new MyCallbackClass());
Comments