Added !handItemName and !handItemID

This commit is contained in:
Ne0n x3r0 2012-05-19 22:31:19 -05:00
parent 4245aa115e
commit 7749201ef1
3 changed files with 15 additions and 3 deletions

View File

@ -27,3 +27,11 @@ gm:
# hand all parameters in order
s:
"*": /say I want to say "!*", there I said it!
# replaced with the item name in the player's hand
hand:
0: I have a !handItemName in my hand right now!
# replace with the item ID in the player's hand
handid:
0: /give !name !handItemID

View File

@ -43,6 +43,10 @@ class BetterAliasPlayerListener implements Listener{
text = e.getMessage().replace("/"+cmd[0]+" ","");
}else if(text.equalsIgnoreCase("name")){
text = player.getName();
}else if(text.equalsIgnoreCase("handItemName")){
text = player.getItemOnCursor().getType().name();
}else if(text.equalsIgnoreCase("handItemID")){
text = new Integer(player.getItemInHand().getTypeId()).toString();
}else if(text.equalsIgnoreCase("oppositeGameMode")){
text = (player.getGameMode() == GameMode.SURVIVAL ? "1" : "0");

View File

@ -1,5 +1,5 @@
name: BetterAlias
main: com.gmail.Ne0nx3r0.BetterAlias
version: '0.2.1'
version: '0.3'
database: false
description: Command alias system