mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
onChat hook error fixed
This commit is contained in:
parent
621fe2279b
commit
ce6c242cf2
12
vCom.java
12
vCom.java
@ -335,13 +335,6 @@ private static HashMap<String, Player> hidden = new HashMap<String, Player>();
|
||||
}
|
||||
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){
|
||||
@ -407,7 +400,6 @@ private static HashMap<String, Player> hidden = new HashMap<String, Player>();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//Check if the prefix is too long
|
||||
if(vChat.msgLength(args[1]) > 60)
|
||||
{
|
||||
@ -425,8 +417,10 @@ private static HashMap<String, Player> hidden = new HashMap<String, Player>();
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
6
vmc.java
6
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];
|
||||
|
Loading…
Reference in New Issue
Block a user