From 518650e842e7cf5ef2feccea52909e6fb345de34 Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Tue, 4 Feb 2014 11:11:43 -0500 Subject: [PATCH] Modifier order consistency --- .../src/com/earth2me/essentials/Essentials.java | 2 +- .../src/com/earth2me/essentials/ExecuteTimer.java | 2 +- Essentials/src/com/earth2me/essentials/I18n.java | 2 +- .../src/com/earth2me/essentials/ManagedFile.java | 2 +- .../src/com/earth2me/essentials/MetaItemStack.java | 4 ++-- .../src/com/earth2me/essentials/PlayerList.java | 12 ++++++------ Essentials/src/com/earth2me/essentials/Settings.java | 6 +++--- .../essentials/commands/Commandclearinventory.java | 4 ++-- .../earth2me/essentials/commands/Commandptime.java | 2 +- .../earth2me/essentials/commands/Commandwarp.java | 2 +- .../essentials/commands/EssentialsCommand.java | 2 +- .../src/com/earth2me/essentials/metrics/Metrics.java | 2 +- .../earth2me/essentials/perm/PermissionsHandler.java | 2 +- .../earth2me/essentials/signs/SignBlockListener.java | 6 +++--- .../earth2me/essentials/textreader/HelpInput.java | 2 +- .../essentials/textreader/KeywordReplacer.java | 4 ++-- .../earth2me/essentials/textreader/TextInput.java | 2 +- .../com/earth2me/essentials/utils/LocationUtil.java | 4 ++-- .../com/earth2me/essentials/utils/StringUtil.java | 4 ++-- .../test/com/earth2me/essentials/EconomyTest.java | 4 ++-- .../essentials/chat/EssentialsChatPlayer.java | 2 +- .../com/earth2me/essentials/xmpp/UserManager.java | 4 ++-- 22 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 5198fe5cb..1150d8bd7 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -579,7 +579,7 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials } } - static public void wrongVersion() + public static void wrongVersion() { LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *"); LOGGER.log(Level.SEVERE, _("notRecommendedBukkit")); diff --git a/Essentials/src/com/earth2me/essentials/ExecuteTimer.java b/Essentials/src/com/earth2me/essentials/ExecuteTimer.java index 301669428..f9da468b5 100644 --- a/Essentials/src/com/earth2me/essentials/ExecuteTimer.java +++ b/Essentials/src/com/earth2me/essentials/ExecuteTimer.java @@ -65,7 +65,7 @@ public class ExecuteTimer } - static private class ExecuteRecord + private static class ExecuteRecord { private final String mark; private final long time; diff --git a/Essentials/src/com/earth2me/essentials/I18n.java b/Essentials/src/com/earth2me/essentials/I18n.java index 760b9e2f9..f4f03a795 100644 --- a/Essentials/src/com/earth2me/essentials/I18n.java +++ b/Essentials/src/com/earth2me/essentials/I18n.java @@ -25,7 +25,7 @@ public class I18n implements net.ess3.api.II18n private final transient ResourceBundle defaultBundle; private final transient Map messageFormatCache = new HashMap(); private final transient IEssentials ess; - private final static Pattern NODOUBLEMARK = Pattern.compile("''"); + private static final Pattern NODOUBLEMARK = Pattern.compile("''"); public I18n(final IEssentials ess) { diff --git a/Essentials/src/com/earth2me/essentials/ManagedFile.java b/Essentials/src/com/earth2me/essentials/ManagedFile.java index 1d83c6894..84daefdef 100644 --- a/Essentials/src/com/earth2me/essentials/ManagedFile.java +++ b/Essentials/src/com/earth2me/essentials/ManagedFile.java @@ -17,7 +17,7 @@ import org.bukkit.Bukkit; public class ManagedFile { - private final static int BUFFERSIZE = 1024 * 8; + private static final int BUFFERSIZE = 1024 * 8; private final transient File file; public ManagedFile(final String filename, final IEssentials ess) diff --git a/Essentials/src/com/earth2me/essentials/MetaItemStack.java b/Essentials/src/com/earth2me/essentials/MetaItemStack.java index 8dd146c50..7c6634115 100644 --- a/Essentials/src/com/earth2me/essentials/MetaItemStack.java +++ b/Essentials/src/com/earth2me/essentials/MetaItemStack.java @@ -24,8 +24,8 @@ import org.bukkit.potion.PotionEffectType; public class MetaItemStack { - private final static Map colorMap = new HashMap(); - private final static Map fireworkShape = new HashMap(); + private static final Map colorMap = new HashMap(); + private static final Map fireworkShape = new HashMap(); static { for (DyeColor color : DyeColor.values()) diff --git a/Essentials/src/com/earth2me/essentials/PlayerList.java b/Essentials/src/com/earth2me/essentials/PlayerList.java index d8f624fa7..ef986a68a 100644 --- a/Essentials/src/com/earth2me/essentials/PlayerList.java +++ b/Essentials/src/com/earth2me/essentials/PlayerList.java @@ -16,7 +16,7 @@ import org.bukkit.entity.Player; public class PlayerList { // Cosmetic list formatting - static public String listUsers(final IEssentials ess, final List users, final String seperator) + public static String listUsers(final IEssentials ess, final List users, final String seperator) { final StringBuilder groupString = new StringBuilder(); Collections.sort(users); @@ -44,7 +44,7 @@ public class PlayerList } // Produce a user summary: There are 5 out of maximum 10 players online. - static public String listSummary(final IEssentials ess, final boolean showHidden) + public static String listSummary(final IEssentials ess, final boolean showHidden) { Server server = ess.getServer(); int playerHidden = 0; @@ -68,7 +68,7 @@ public class PlayerList } // Build the basic player list, divided by groups. - static public Map> getPlayerLists(final IEssentials ess, final boolean showHidden) + public static Map> getPlayerLists(final IEssentials ess, final boolean showHidden) { Server server = ess.getServer(); final Map> playerList = new HashMap>(); @@ -92,7 +92,7 @@ public class PlayerList } // Handle the merging of groups - static public List getMergedList(final IEssentials ess, final Map> playerList, final String groupName) + public static List getMergedList(final IEssentials ess, final Map> playerList, final String groupName) { final Set configGroups = ess.getSettings().getListGroupConfig().keySet(); final List users = new ArrayList(); @@ -122,7 +122,7 @@ public class PlayerList } // Output a playerlist of just a single group, /list - static public String listGroupUsers(final IEssentials ess, final Map> playerList, final String groupName) throws Exception + public static String listGroupUsers(final IEssentials ess, final Map> playerList, final String groupName) throws Exception { final List users = getMergedList(ess, playerList, groupName); final List groupUsers = playerList.get(groupName); @@ -141,7 +141,7 @@ public class PlayerList } // Build the output string - static public String outputFormat(final String group, final String message) + public static String outputFormat(final String group, final String message) { final StringBuilder outputString = new StringBuilder(); outputString.append(_("listGroupTag", FormatUtil.replaceFormat(group))); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 93e245f72..ebeb2a12c 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -24,7 +24,7 @@ import org.bukkit.inventory.ItemStack; public class Settings implements net.ess3.api.ISettings { private final transient EssentialsConf config; - private final static Logger logger = Logger.getLogger("Essentials"); + private static final Logger logger = Logger.getLogger("Essentials"); private final transient IEssentials ess; private boolean metricsEnabled = true; @@ -727,7 +727,7 @@ public class Settings implements net.ess3.api.ISettings { return config.getBoolean(configName, def); } - private final static BigDecimal MAXMONEY = new BigDecimal("10000000000000"); + private static final BigDecimal MAXMONEY = new BigDecimal("10000000000000"); private BigDecimal maxMoney = MAXMONEY; private BigDecimal _getMaxMoney() @@ -740,7 +740,7 @@ public class Settings implements net.ess3.api.ISettings { return maxMoney; } - private final static BigDecimal MINMONEY = new BigDecimal("-10000000000000"); + private static final BigDecimal MINMONEY = new BigDecimal("-10000000000000"); private BigDecimal minMoney = MINMONEY; private BigDecimal _getMinMoney() diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java index 140831bb4..d48f60543 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java @@ -19,8 +19,8 @@ public class Commandclearinventory extends EssentialsCommand { super("clearinventory"); } - static int BASE_AMOUNT = 100000; - static int EXTENDED_CAP = 8; + private static final int BASE_AMOUNT = 100000; + private static final int EXTENDED_CAP = 8; @Override public void run(Server server, User user, String commandLabel, String[] args) throws Exception diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java index 050a012ad..5cca2f6f5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java @@ -12,7 +12,7 @@ import org.bukkit.entity.Player; public class Commandptime extends EssentialsCommand { - public static final Set getAliases = new HashSet(); + private static final Set getAliases = new HashSet(); static { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java index 2c8f82673..3a574c628 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java @@ -19,7 +19,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; public class Commandwarp extends EssentialsCommand { - private final static int WARPS_PER_PAGE = 20; + private static final int WARPS_PER_PAGE = 20; public Commandwarp() { diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java index e51e392b6..d9f239a7c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java @@ -17,7 +17,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand private final transient String name; protected transient IEssentials ess; protected transient IEssentialsModule module; - protected final static Logger logger = Logger.getLogger("Essentials"); + protected static final Logger logger = Logger.getLogger("Essentials"); protected EssentialsCommand(final String name) { diff --git a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java index 4f0c588f0..5ecf9c60d 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java +++ b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java @@ -45,7 +45,7 @@ public class Metrics /** * The current revision number */ - private final static int REVISION = 7; + private static final int REVISION = 7; /** * The base url of the metrics domain diff --git a/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java b/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java index e6a36d46f..7ee97d2b1 100644 --- a/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java @@ -14,7 +14,7 @@ public class PermissionsHandler implements IPermissionsHandler private transient IPermissionsHandler handler = new NullPermissionsHandler(); private transient String defaultGroup = "default"; private final transient Plugin plugin; - private final static Logger LOGGER = Logger.getLogger("Essentials"); + private static final Logger LOGGER = Logger.getLogger("Essentials"); private transient boolean useSuperperms = false; public PermissionsHandler(final Plugin plugin) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index 78879b52d..c40827c99 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -18,9 +18,9 @@ import org.bukkit.event.block.*; public class SignBlockListener implements Listener { - private final static Logger LOGGER = Logger.getLogger("Essentials"); - private final static Material WALL_SIGN = Material.WALL_SIGN; - private final static Material SIGN_POST = Material.SIGN_POST; + private static final Logger LOGGER = Logger.getLogger("Essentials"); + private static final Material WALL_SIGN = Material.WALL_SIGN; + private static final Material SIGN_POST = Material.SIGN_POST; private final transient IEssentials ess; public SignBlockListener(IEssentials ess) diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java index 312a43cf3..c51b0cba8 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java @@ -16,7 +16,7 @@ public class HelpInput implements IText private static final String DESCRIPTION = "description"; private static final String PERMISSION = "permission"; private static final String PERMISSIONS = "permissions"; - private final static Logger logger = Logger.getLogger("Essentials"); + private static final Logger logger = Logger.getLogger("Essentials"); private final transient List lines = new ArrayList(); private final transient List chapters = new ArrayList(); private final transient Map bookmarks = new HashMap(); diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java index 193700adc..22bf1778d 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java +++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java @@ -31,8 +31,8 @@ import org.bukkit.plugin.Plugin; public class KeywordReplacer implements IText { - private final static Pattern KEYWORD = Pattern.compile("\\{([^\\{\\}]+)\\}"); - private final static Pattern KEYWORDSPLIT = Pattern.compile("\\:"); + private static final Pattern KEYWORD = Pattern.compile("\\{([^\\{\\}]+)\\}"); + private static final Pattern KEYWORDSPLIT = Pattern.compile("\\:"); private final transient IText input; private final transient List replaced; private final transient IEssentials ess; diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java index 1dc68d237..7de60979d 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java @@ -12,7 +12,7 @@ import net.ess3.api.IEssentials; public class TextInput implements IText { - private final static HashMap> cache = new HashMap>(); + private static final HashMap> cache = new HashMap>(); private final transient List lines; private final transient List chapters; private final transient Map bookmarks; diff --git a/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java b/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java index b142ac3a9..1accd6d6e 100644 --- a/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java +++ b/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java @@ -78,8 +78,8 @@ public class LocationUtil TRANSPARENT_MATERIALS.add((byte)Material.WATER.getId()); TRANSPARENT_MATERIALS.add((byte)Material.STATIONARY_WATER.getId()); } - public final static int RADIUS = 3; - public final static Vector3D[] VOLUME; + public static final int RADIUS = 3; + public static final Vector3D[] VOLUME; public static ItemStack convertBlockToItem(final Block block) { diff --git a/Essentials/src/com/earth2me/essentials/utils/StringUtil.java b/Essentials/src/com/earth2me/essentials/utils/StringUtil.java index c6efb4291..9858c77ca 100644 --- a/Essentials/src/com/earth2me/essentials/utils/StringUtil.java +++ b/Essentials/src/com/earth2me/essentials/utils/StringUtil.java @@ -6,8 +6,8 @@ import java.util.regex.Pattern; public class StringUtil { - private final static Pattern INVALIDFILECHARS = Pattern.compile("[^a-z0-9]"); - private final static Pattern INVALIDCHARS = Pattern.compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]"); + private static final Pattern INVALIDFILECHARS = Pattern.compile("[^a-z0-9]"); + private static final Pattern INVALIDCHARS = Pattern.compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]"); //Used to clean file names before saving to disk public static String sanitizeFileName(final String name) diff --git a/Essentials/test/com/earth2me/essentials/EconomyTest.java b/Essentials/test/com/earth2me/essentials/EconomyTest.java index 648113c0b..9d18e9f63 100644 --- a/Essentials/test/com/earth2me/essentials/EconomyTest.java +++ b/Essentials/test/com/earth2me/essentials/EconomyTest.java @@ -13,8 +13,8 @@ import org.junit.Test; public class EconomyTest extends TestCase { private final transient Essentials ess; - private final static String NPCNAME = "npc1"; - private final static String PLAYERNAME = "TestPlayer1"; + private static final String NPCNAME = "npc1"; + private static final String PLAYERNAME = "TestPlayer1"; public EconomyTest(final String testName) { diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java index d9d259997..6c97d91ed 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java @@ -13,7 +13,7 @@ import org.bukkit.event.player.AsyncPlayerChatEvent; public abstract class EssentialsChatPlayer implements Listener { - protected final static Logger logger = Logger.getLogger("Minecraft"); + protected static final Logger logger = Logger.getLogger("Minecraft"); protected transient IEssentials ess; protected final transient Server server; protected final transient Map chatStorage; diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java index 6439c9b9d..114cf6100 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java @@ -10,8 +10,8 @@ public class UserManager implements IConf { private final transient EssentialsConf users; private final transient List spyusers = Collections.synchronizedList(new ArrayList()); - private final static String ADDRESS = "address"; - private final static String SPY = "spy"; + private static final String ADDRESS = "address"; + private static final String SPY = "spy"; public UserManager(final File folder) {