From 50c80ba5c40eea7ae1f3efa299dc4581f91ab97b Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 21 Feb 2015 22:46:33 +1100 Subject: [PATCH] color --- .../intellectualcrafters/plot/PlotSquared.java | 17 ++++++++--------- .../intellectualcrafters/plot/commands/Ban.java | 7 ++++--- .../com/intellectualcrafters/plot/config/C.java | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java index b9742a59b..732961cce 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java @@ -20,7 +20,6 @@ import java.util.UUID; import net.milkbowl.vault.economy.Economy; -import org.bukkit.ChatColor; import org.bukkit.configuration.file.YamlConfiguration; import com.intellectualcrafters.plot.commands.Cluster; @@ -761,10 +760,10 @@ public class PlotSquared { Settings.API_URL = config.getString("uuid.api.location"); Settings.CUSTOM_API = config.getBoolean("uuid.api.custom"); Settings.UUID_FECTHING = config.getBoolean("uuid.fetching"); - C.COLOR_1 = ChatColor.getByChar(style.getString("color.1")); - C.COLOR_2 = ChatColor.getByChar(style.getString("color.2")); - C.COLOR_3 = ChatColor.getByChar(style.getString("color.3")); - C.COLOR_4 = ChatColor.getByChar(style.getString("color.4")); + C.COLOR_1 = "\u00A7" + (style.getString("color.1")); + C.COLOR_2 = "\u00A7" + (style.getString("color.2")); + C.COLOR_3 = "\u00A7" + (style.getString("color.3")); + C.COLOR_4 = "\u00A7" + (style.getString("color.4")); if (Settings.DEBUG) { final Map settings = new HashMap<>(); settings.put("Kill Road Mobs", "" + Settings.KILL_ROAD_MOBS); @@ -786,10 +785,10 @@ public class PlotSquared { private static void setupStyle() { style.set("version", VERSION); final Map o = new HashMap<>(); - o.put("color.1", C.COLOR_1.getChar()); - o.put("color.2", C.COLOR_2.getChar()); - o.put("color.3", C.COLOR_3.getChar()); - o.put("color.4", C.COLOR_4.getChar()); + o.put("color.1", C.COLOR_1.substring(1)); + o.put("color.2", C.COLOR_2.substring(1)); + o.put("color.3", C.COLOR_3.substring(1)); + o.put("color.4", C.COLOR_4.substring(1)); for (final Entry node : o.entrySet()) { if (!style.contains(node.getKey())) { style.set(node.getKey(), node.getValue()); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java index 9f7d93a7e..b4092996b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java @@ -21,13 +21,14 @@ public class Ban extends SubCommand { if (args.length < 1) { return MainUtil.sendMessage(plr, "&cUsage: &c" + this.usage); } - if (!BukkitPlayerFunctions.isInPlot(plr)) { + Plot plot = MainUtil.getPlot(plr.getLocation()); + if (plot == null) { return sendMessage(plr, C.NOT_IN_PLOT); } - final Plot plot = BukkitPlayerFunctions.getCurrentPlot(plr); - if (!plot.hasRights(plr)) { + if (!plot.isAdded(plr.getUUID())) { return sendMessage(plr, C.NO_PLOT_PERMS); } + return plr.performCommand("plot denied add " + args[0]); } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java index ac5be71dd..479355b21 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -444,7 +444,7 @@ public enum C { * @see com.intellectualsites.translation.TranslationLanguage */ protected final static TranslationLanguage lang = new TranslationLanguage("PlotSquared", "this", "use"); - public static ChatColor COLOR_1 = ChatColor.GOLD, COLOR_2 = ChatColor.GRAY, COLOR_3 = ChatColor.DARK_GRAY, COLOR_4 = ChatColor.DARK_AQUA; + public static String COLOR_1 = "\u00A76", COLOR_2 = "\u00A77", COLOR_3 = "\u00A78", COLOR_4 = "\u00A73"; /** * The TranslationManager *