From 333ede514d2922b0bc7354f586b39c7edf00f56d Mon Sep 17 00:00:00 2001 From: sauilitired Date: Tue, 14 Jul 2015 09:18:31 +0200 Subject: [PATCH] Fix styling issues --- .../plot/commands/Debug.java | 2 +- .../plot/commands/Set.java | 30 ++++++------------- .../plot/commands/plugin.java | 12 ++++---- .../intellectualcrafters/plot/config/C.java | 6 ++-- 4 files changed, 19 insertions(+), 31 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java index 9c1be1085..5fef8181a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java @@ -45,7 +45,7 @@ public class Debug extends SubCommand { String header, line, section; { information = new StringBuilder(); - header = C.DEUBG_HEADER.s(); + header = C.DEBUG_HEADER.s(); line = C.DEBUG_LINE.s(); section = C.DEBUG_SECTION.s(); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index ce8348092..f1d71519e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -20,13 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.apache.commons.lang.StringUtils; -import org.bukkit.Material; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Configuration; @@ -34,20 +27,14 @@ import com.intellectualcrafters.plot.flag.AbstractFlag; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.listeners.APlotListener; -import com.intellectualcrafters.plot.object.BlockLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.SetBlockQueue; -import com.intellectualcrafters.plot.util.StringComparison; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; /** * @author Citymonstret @@ -93,7 +80,8 @@ public class Set extends SubCommand { } if (args[0].equalsIgnoreCase("flag")) { if (args.length < 2) { - final String message = StringUtils.join(FlagManager.getFlags(plr), "&c, &6"); + final String message = StringMan.replaceFromMap("$2" + (StringUtils.join(FlagManager.getFlags(plr), "$1, $2")), C.replacements); + // final String message = StringUtils.join(FlagManager.getFlags(plr), "&c, &6"); MainUtil.sendMessage(plr, C.NEED_KEY.s().replaceAll("%values%", message)); return false; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java index 8a74c23b6..e24db29c5 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java @@ -71,15 +71,15 @@ public class plugin extends SubCommand { final ArrayList strings = new ArrayList() { // $2>> $1%id$2:$1%world $2- $1%owner { - add(String.format("$2>> $1PlotSquared $2(Version$2: $1%s$2)", PS.get().IMP.getVersion())); - add(String.format("$2>> $1Authors$2: $1Citymonstret $2& $1Empire92")); - add(String.format("$2>> $1Wiki$2: \n$1https://github.com/IntellectualCrafters/PlotSquared/wiki")); - add(String.format("$2>> $1Website$2: \n$1http://plotsquared.co")); - add(String.format("$2>> $1Newest Version$2:\n$1" + (PS.get().update == null ? PS.get().IMP.getVersion() : PS.get().update))); + add(String.format("$2>> $1&lPlotSquared $2(Version$2: $1%s$2)", PS.get().IMP.getVersion())); + add(String.format("$2>> $1&lAuthors$2: $1Citymonstret $2& $1Empire92")); + add(String.format("$2>> $1&lWiki$2: $1https://github.com/IntellectualCrafters/PlotSquared/wiki")); + add(String.format("$2>> $1&lWebsite$2: $1http://plotsquared.co")); + add(String.format("$2>> $1&lNewest Version$2: $1" + (PS.get().update == null ? PS.get().IMP.getVersion() : PS.get().update))); } }; for (final String s : strings) { - MainUtil.sendMessage(plr, StringMan.replaceFromMap(s, C.replacements)); + MainUtil.sendMessage(plr, StringMan.replaceFromMap(s, C.replacements), false); } } }); 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 9a8aa2a78..824506379 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -125,7 +125,7 @@ public enum C { INVALID_INBOX("$2That is not a valid inbox.&-$1Accepted values: %s", "Comment"), NO_PERM_INBOX("$2You do not have permission for that inbox", "Comment"), NO_PERM_INBOX_MODIFY("$2You do not have permission to modify that inbox", "Comment"), - NO_PLOT_INBOX("$2You must stand in or supply a plot argument", "Comment"), + NO_PLOT_INBOX("$2You must stand in or supply a plot argument", "Comment"), COMMENT_REMOVED("$4Successfully deleted comment/s:n$2 - '$3%s$2'", "Comment"), COMMENT_ADDED("$4A comment has been left", "Comment"), COMMENT_HEADER("$2====== Comments ======", "Comment"), @@ -322,7 +322,7 @@ public enum C { /* * Debug */ - DEUBG_HEADER("$1Debug Information&-", "Debug"), + DEBUG_HEADER("$1Debug Information&-", "Debug"), DEBUG_SECTION("$2>> $1&l%val%", "Debug"), DEBUG_LINE("$2>> $1%var%$2:$1 %val%&-", "Debug"), /* @@ -401,7 +401,7 @@ public enum C { /* * PlotMe */ - NOT_USING_PLOTME("$2This server uses the $1PlotSquared $2plot management system. Please use the $1/ps &2or $1/p2 $2or $1/plots $2instead", "Errors"), + NOT_USING_PLOTME("$2This server uses the $1PlotSquared $2plot management system. Please use the $1/ps $2or $1/p2 $2or $1/plots $2instead", "Errors"), /* * Wait */