Started the refactoring

This commit is contained in:
Olof Larsson
2011-03-18 17:33:23 +01:00
parent 35d7985fb2
commit 1da8b6b30a
18 changed files with 849 additions and 471 deletions

View File

@@ -1,39 +0,0 @@
package com.bukkit.mcteam.factions.util;
import java.util.*;
import org.bukkit.entity.Player;
import com.bukkit.mcteam.factions.Factions;
public class Log {
public static String prefix = Factions.factions.getDescription().getName();
public static ArrayList<Player> debuggers = new ArrayList<Player>();
public static int threshold = 10;
public static void log(int level, String prefix, String msg) {
if (threshold <= level) {
msg = Log.prefix+prefix+msg;
System.out.println(msg);
for(Player debugger : debuggers) {
debugger.sendMessage(msg);
}
}
}
public static void debug (String msg) {
log(10, " debug: ", msg);
}
public static void info (String msg) {
log(20, " info: ", msg);
}
public static void warn (String msg) {
log(30, " warn: ", msg);
}
public static void severe (String msg) {
log(40, " severe: ", msg);
}
}

View File

@@ -3,7 +3,7 @@ import java.util.*;
import org.bukkit.Material;
import com.bukkit.mcteam.factions.entities.*;
import com.bukkit.mcteam.factions.Conf;
public class TextUtil {
public static String titleize(String str) {