diff --git a/vCom.java b/vCom.java index f6982c068..f40c8cb81 100644 --- a/vCom.java +++ b/vCom.java @@ -335,13 +335,6 @@ private static HashMap hidden = new HashMap(); } return EXIT_FAIL; } - //===================================================================== - //Function: prefix (/prefix) - //Input: Player player: The player using the command - // String[] args: The name of the player - //Output: int: Exit Code - //Use: Freezes a player in place - //===================================================================== public static int freeze(Player player, String[] args){ if(player.canUseCommand("/freeze") && vConfig.getInstance().freeze()){ if (args.length < 1){ @@ -406,7 +399,6 @@ private static HashMap hidden = new HashMap(); + "The player you specified is a higher rank than you."); return EXIT_SUCCESS; } - //Check if the prefix is too long if(vChat.msgLength(args[1]) > 60) @@ -425,8 +417,10 @@ private static HashMap hidden = new HashMap(); if(args.length >= 3 && args[1] != null) { - vUsers.players.findProfile(other).setTag(args[2]); + String tagbag = etc.combineSplit(2, args, ""); + vUsers.players.findProfile(other).setTag(tagbag); player.sendMessage(Colors.LightGreen + "Prefix changed"); + log.log(Level.INFO, player + " changed their prefix to " + tagbag); } return EXIT_SUCCESS; } diff --git a/vConfig.java b/vConfig.java index 6e1541542..de62e3c75 100644 --- a/vConfig.java +++ b/vConfig.java @@ -18,7 +18,7 @@ public class vConfig { //The feature settings static boolean toggle = true, adminChat = false, - groupcoloredbrackets = false, + groupcoloredbrackets = false, partyChat = false, greentext = false, FFF = false, diff --git a/vmc.java b/vmc.java index db006f353..b58306b10 100644 --- a/vmc.java +++ b/vmc.java @@ -1,5 +1,4 @@ import java.io.*; -import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; public class vmc { @@ -45,7 +44,7 @@ String location = "groups.txt"; String groups[] = player.getGroups(); String groupline[] = null; String prefix = Colors.White; - if(vConfig.getInstance().groupcoloredbrackets()){ + if(vConfig.getInstance().groupcoloredbrackets() && groups[0].toString().length() > 0){ //Read the file properties = new PropertiesFile(location); try { @@ -54,10 +53,9 @@ String location = "groups.txt"; log.log(Level.SEVERE, "Exception while loading " + location, e); } //Grab the line with the same group as the player - if(!groups[0].isEmpty()) groupline = properties.getString(groups[0]).split(":"); //Check if the prefix is null or not - if(groupline[0] != null) + if(!groupline[0].isEmpty()) { //vChat.colorChange(groupline[0].charAt(0)); prefix = groupline[0];