Browse Source

Added a nickname and suffix feature.

cerevisiae 14 years ago
parent
commit
ee30fc2dba
2 changed files with 6 additions and 4 deletions
  1. 2 0
      TODO
  2. 4 4
      vMinecraftCommands.java

+ 2 - 0
TODO

@@ -21,6 +21,8 @@ Vminecraft b8 Todo:
 DONE
     + Fixed death messages and ezModo
 	+ Quick recode of /me to use the new getName function
+        + Simple Fire Antigrief
+        + /prefix
 	+ /a to toggle admin chat
 	+ Code was organized
 	+ Aliasing was added

+ 4 - 4
vMinecraftCommands.java

@@ -182,15 +182,15 @@ public class vMinecraftCommands{
         if(!player.canUseCommand("/prefix")){
             return EXIT_FAIL;
         }
-        if(args.length <= 1){
+        if(args.length == 0){
             vMinecraftChat.sendMessage(player, player, Colors.Rose + "Usage is /prefix [name color code] <prefix>");
             player.sendMessage(Colors.DarkPurple + "Example: /prefix e ^0[^a<3^0]");
             vMinecraftChat.sendMessage(player, player, Colors.DarkPurple + "This would produce a name like... " + Colors.Black + "[" + Colors.LightGreen + "<3" + Colors.Black + "]" + Colors.Yellow + player.getName());
             return EXIT_SUCCESS;
         }
-        if(args.length >= 2 && args[1] != null){
-            player.setPrefix("§" + args[1]);
-            if(args.length >= 3 && args[2] != null){
+        if(args.length >= 1 && args[0] != null){
+            player.setPrefix(args[1]);
+            if(args.length == 2 && args[1] != null){
                vMinecraftUsers.players.findProfile(player).setTag(args[2]);
                return EXIT_SUCCESS;
             }