*/
@@ -16,9 +17,8 @@ public interface Method
* Encodes the Plugin into an Object disguised as the Plugin. If you want the original Plugin Class you must cast it
* to the correct Plugin, to do so you have to verify the name and or version then cast.
*
- *
- * if(method.getName().equalsIgnoreCase("iConomy"))
- * iConomy plugin = ((iConomy)method.getPlugin());
+ * <
+ * pre> if(method.getName().equalsIgnoreCase("iConomy")) iConomy plugin = ((iConomy)method.getPlugin());
*
* @return Object
* @see #getName()
@@ -48,8 +48,7 @@ public interface Method
public String getVersion();
/**
- * Returns the amount of decimal places that get stored
- * NOTE: it will return -1 if there is no rounding
+ * Returns the amount of decimal places that get stored NOTE: it will return -1 if there is no rounding
*
* @return int
for each decimal place
*/
@@ -88,7 +87,9 @@ public interface Method
public boolean hasAccount(String name);
/**
- * Check to see if an account name
is tied to a bank
.
+ * Check to see if an account
+ * name
is tied to a
+ * bank
.
*
* @param bank Bank name
* @param name Account name
@@ -107,14 +108,16 @@ public interface Method
/**
* Forces an account creation
*
- * @param name Account name
+ * @param name Account name
* @param balance Initial account balance
* @return boolean
*/
public boolean createAccount(String name, Double balance);
/**
- * Returns a MethodAccount
class for an account name
.
+ * Returns a
+ * MethodAccount
class for an account
+ * name
.
*
* @param name Account name
* @return MethodAccount
or Null
@@ -122,7 +125,9 @@ public interface Method
public MethodAccount getAccount(String name);
/**
- * Returns a MethodBankAccount
class for an account name
.
+ * Returns a
+ * MethodBankAccount
class for an account
+ * name
.
*
* @param bank Bank name
* @param name Account name
@@ -131,8 +136,7 @@ public interface Method
public MethodBankAccount getBankAccount(String bank, String name);
/**
- * Checks to verify the compatibility between this Method and a plugin.
- * Internal usage only, for the most part.
+ * Checks to verify the compatibility between this Method and a plugin. Internal usage only, for the most part.
*
* @param plugin Plugin
* @return boolean
diff --git a/Essentials/src/net/ess3/economy/register/Methods.java b/Essentials/src/net/ess3/economy/register/Methods.java
index 93a92ba42..d3f378870 100644
--- a/Essentials/src/net/ess3/economy/register/Methods.java
+++ b/Essentials/src/net/ess3/economy/register/Methods.java
@@ -22,8 +22,10 @@ import org.bukkit.plugin.PluginManager;
* preferred: "iConomy"
*
*
- * @author: Nijikokun (@nijikokun) @copyright: Copyright (C) 2011 @license: AOL license
- *
+ * @author: Nijikokun (
+ * @nijikokun)
+ * @copyright: Copyright (C) 2011
+ * @license: AOL license
*/
public class Methods
{
@@ -255,8 +257,7 @@ public class Methods
/**
* Grab the existing and initialized (hopefully) Method Class.
*
- * @return Method
or
- * Null
+ * @return Method
or Null
*/
public static Method getMethod()
{
diff --git a/Essentials/src/net/ess3/economy/register/methods/BOSE7.java b/Essentials/src/net/ess3/economy/register/methods/BOSE7.java
index 24dbcacee..6cfff9225 100644
--- a/Essentials/src/net/ess3/economy/register/methods/BOSE7.java
+++ b/Essentials/src/net/ess3/economy/register/methods/BOSE7.java
@@ -9,8 +9,10 @@ import org.bukkit.plugin.Plugin;
* BOSEconomy 7 Implementation of Method
*
* @author Acrobot
- * @author Nijikokun (@nijikokun) @copyright (c) 2011 @license AOL license
- *
+ * @author Nijikokun (
+ * @nijikokun)
+ * @copyright (c) 2011
+ * @license AOL license
*/
public class BOSE7 implements Method
{
diff --git a/Essentials/src/net/ess3/economy/register/methods/iCo5.java b/Essentials/src/net/ess3/economy/register/methods/iCo5.java
index f559ab701..09ee7cc7d 100644
--- a/Essentials/src/net/ess3/economy/register/methods/iCo5.java
+++ b/Essentials/src/net/ess3/economy/register/methods/iCo5.java
@@ -12,8 +12,10 @@ import org.bukkit.plugin.Plugin;
/**
* iConomy 5 Implementation of Method
*
- * @author Nijikokun (@nijikokun) @copyright (c) 2011 @license AOL license
- *
+ * @author Nijikokun (
+ * @nijikokun)
+ * @copyright (c) 2011
+ * @license AOL license
*/
public class iCo5 implements Method
{
diff --git a/Essentials/src/net/ess3/economy/register/methods/iCo6.java b/Essentials/src/net/ess3/economy/register/methods/iCo6.java
index 4b2b3e641..0c0ad2dc0 100644
--- a/Essentials/src/net/ess3/economy/register/methods/iCo6.java
+++ b/Essentials/src/net/ess3/economy/register/methods/iCo6.java
@@ -11,8 +11,10 @@ import org.bukkit.plugin.Plugin;
/**
* iConomy 6 Implementation of Method
*
- * @author Nijikokun (@nijikokun) @copyright (c) 2011 @license AOL license
- *
+ * @author Nijikokun (
+ * @nijikokun)
+ * @copyright (c) 2011
+ * @license AOL license
*/
public class iCo6 implements Method
{
@@ -81,7 +83,7 @@ public class iCo6 implements Method
@Override
public boolean createAccount(String name)
{
- return !hasAccount(name) && (new Accounts()) .create(name);
+ return !hasAccount(name) && (new Accounts()).create(name);
}
@Override
diff --git a/Essentials/src/net/ess3/listener/EssentialsEntityListener.java b/Essentials/src/net/ess3/listener/EssentialsEntityListener.java
index a20874325..3adb35b47 100644
--- a/Essentials/src/net/ess3/listener/EssentialsEntityListener.java
+++ b/Essentials/src/net/ess3/listener/EssentialsEntityListener.java
@@ -41,7 +41,7 @@ public class EssentialsEntityListener implements Listener
attacker.updateActivity(true);
if (settings.getData().getGeneral().getLoginAttackDelay() > 0 && !Permissions.PVPDELAY_EXEMPT.isAuthorized(
attacker) && (System.currentTimeMillis() < (attacker.getTimestamp(
- TimestampType.LOGIN) + settings.getData().getGeneral().getLoginAttackDelay())))
+ TimestampType.LOGIN) + settings.getData().getGeneral().getLoginAttackDelay())))
{
event.setCancelled(true);
}
diff --git a/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java b/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java
index ef634e8c2..8b74e1af7 100644
--- a/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java
+++ b/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java
@@ -56,7 +56,8 @@ public class EssentialsPlayerListener implements Listener
public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final Player player = event.getPlayer();
- if (!player.isOnline()) {
+ if (!player.isOnline())
+ {
return;
}
final IUser user = userMap.getUser(player);
@@ -173,83 +174,83 @@ public class EssentialsPlayerListener implements Listener
delayedJoin(event.getPlayer());
}
});
-/* TODO: Make sure my update is good
- if (!event.getPlayer().isOnline())
- {
- return;
- }
+ /* TODO: Make sure my update is good
+ if (!event.getPlayer().isOnline())
+ {
+ return;
+ }
- ess.getBackup().startTask();
+ ess.getBackup().startTask();
- final String joinMessage = ess.getSettings().getData().getGeneral().getJoinMessage();
- if (joinMessage != null)
- {
- final IText itOutput = new KeywordReplacer(new SimpleTextInput(joinMessage), ess.getUserMap().getUser(event.getPlayer()), ess);
- final SimpleTextPager stPager = new SimpleTextPager(itOutput);
- event.setJoinMessage(FormatUtil.replaceFormat(stPager.getString(0)));
- }
- else
- {
- event.setJoinMessage(joinMessage);
- }
+ final String joinMessage = ess.getSettings().getData().getGeneral().getJoinMessage();
+ if (joinMessage != null)
+ {
+ final IText itOutput = new KeywordReplacer(new SimpleTextInput(joinMessage), ess.getUserMap().getUser(event.getPlayer()), ess);
+ final SimpleTextPager stPager = new SimpleTextPager(itOutput);
+ event.setJoinMessage(FormatUtil.replaceFormat(stPager.getString(0)));
+ }
+ else
+ {
+ event.setJoinMessage(joinMessage);
+ }
- final IUser user = ess.getUserMap().getUser(event.getPlayer());
+ final IUser user = ess.getUserMap().getUser(event.getPlayer());
- user.updateDisplayName();
- user.getData().setIpAddress(user.getPlayer().getAddress().getAddress().getHostAddress());
- user.updateActivity(false);
+ user.updateDisplayName();
+ user.getData().setIpAddress(user.getPlayer().getAddress().getAddress().getHostAddress());
+ user.updateActivity(false);
- for (String p : ess.getVanishedPlayers())
- {
- if (!Permissions.VANISH_SEE_OTHERS.isAuthorized(user))
- {
- user.getPlayer().hidePlayer(ess.getUserMap().getUser(p).getPlayer());
- }
- }
+ for (String p : ess.getVanishedPlayers())
+ {
+ if (!Permissions.VANISH_SEE_OTHERS.isAuthorized(user))
+ {
+ user.getPlayer().hidePlayer(ess.getUserMap().getUser(p).getPlayer());
+ }
+ }
- if (Permissions.SLEEPINGIGNORED.isAuthorized(user))
- {
- user.getPlayer().setSleepingIgnored(true);
- }
- user.queueSave();
+ if (Permissions.SLEEPINGIGNORED.isAuthorized(user))
+ {
+ user.getPlayer().setSleepingIgnored(true);
+ }
+ user.queueSave();
- final ISettings settings = ess.getSettings();
+ final ISettings settings = ess.getSettings();
- if (!settings.getData().getCommands().isDisabled("motd") && Permissions.MOTD.isAuthorized(user))
- {
- try
- {
- final IText input = new TextInput(user, "motd", true, ess);
- final IText output = new KeywordReplacer(input, user, ess);
- final TextPager pager = new TextPager(output, true);
- pager.showPage("1", null, "motd", user);
- }
- catch (IOException ex)
- {
- if (settings.getData().getGeneral().isDebug())
- {
- LOGGER.log(Level.WARNING, ex.getMessage(), ex);
- }
- else
- {
- LOGGER.log(Level.WARNING, ex.getMessage());
- }
- }
- }
+ if (!settings.getData().getCommands().isDisabled("motd") && Permissions.MOTD.isAuthorized(user))
+ {
+ try
+ {
+ final IText input = new TextInput(user, "motd", true, ess);
+ final IText output = new KeywordReplacer(input, user, ess);
+ final TextPager pager = new TextPager(output, true);
+ pager.showPage("1", null, "motd", user);
+ }
+ catch (IOException ex)
+ {
+ if (settings.getData().getGeneral().isDebug())
+ {
+ LOGGER.log(Level.WARNING, ex.getMessage(), ex);
+ }
+ else
+ {
+ LOGGER.log(Level.WARNING, ex.getMessage());
+ }
+ }
+ }
- if (!settings.getData().getCommands().isDisabled("mail") && Permissions.MAIL.isAuthorized(user))
- {
- final List mail = user.getData().getMails();
- if (mail == null || mail.isEmpty())
- {
- user.sendMessage(_("§6You have no new mail."));
- }
- else
- {
- user.sendMessage(_("§6You have§c {0} §6messages! Type §c/mail read§6 to view your mail.", mail.size()));
- }
- }*/
+ if (!settings.getData().getCommands().isDisabled("mail") && Permissions.MAIL.isAuthorized(user))
+ {
+ final List mail = user.getData().getMails();
+ if (mail == null || mail.isEmpty())
+ {
+ user.sendMessage(_("§6You have no new mail."));
+ }
+ else
+ {
+ user.sendMessage(_("§6You have§c {0} §6messages! Type §c/mail read§6 to view your mail.", mail.size()));
+ }
+ }*/
}
public void delayedJoin(final Player player)
@@ -330,19 +331,19 @@ public class EssentialsPlayerListener implements Listener
user.sendMessage(_("§6You have§c {0} §6messages! Type §c/mail read§6 to view your mail.", mail.size()));
}
}
- if(Permissions.FLY_SAFELOGIN.isAuthorized(user))
+ if (Permissions.FLY_SAFELOGIN.isAuthorized(user))
{
final Location loc = user.getPlayer().getLocation();
final World world = loc.getWorld();
final int x = loc.getBlockX();
int y = loc.getBlockY();
final int z = loc.getBlockZ();
- while(LocationUtil.isBlockUnsafe(world, x, y, z) && y > -1)
+ while (LocationUtil.isBlockUnsafe(world, x, y, z) && y > -1)
{
y--;
}
- if(loc.getBlockY() - y > 1 || y < 0)
+ if (loc.getBlockY() - y > 1 || y < 0)
{
user.getPlayer().setAllowFlight(true);
user.getPlayer().setFlying(true);
@@ -351,7 +352,6 @@ public class EssentialsPlayerListener implements Listener
}
}
-
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerLogin(final PlayerLoginEvent event)
{
@@ -449,7 +449,6 @@ public class EssentialsPlayerListener implements Listener
});
}
}
-
private final Pattern spaceSplit = Pattern.compile(" ");
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
@@ -612,7 +611,7 @@ public class EssentialsPlayerListener implements Listener
{
final IUser invOwner = userMap.getUser((Player)invHolder);
if (user.isInvSee() && (!Permissions.INVSEE_MODIFY.isAuthorized(user) || Permissions.INVSEE_PREVENT_MODIFY.isAuthorized(
- invOwner) || !invOwner.isOnline()))
+ invOwner) || !invOwner.isOnline()))
{
event.setCancelled(true);
}
@@ -620,7 +619,7 @@ public class EssentialsPlayerListener implements Listener
}
if (event.getView().getTopInventory().getType() == InventoryType.WORKBENCH)
{
- final IUser user = userMap.getUser((Player) event.getWhoClicked());
+ final IUser user = userMap.getUser((Player)event.getWhoClicked());
if (user.isRecipeSee())
{
event.setCancelled(true);
diff --git a/Essentials/src/net/ess3/listener/EssentialsPluginListener.java b/Essentials/src/net/ess3/listener/EssentialsPluginListener.java
index 9fa17750c..792d02b5c 100644
--- a/Essentials/src/net/ess3/listener/EssentialsPluginListener.java
+++ b/Essentials/src/net/ess3/listener/EssentialsPluginListener.java
@@ -36,9 +36,10 @@ public class EssentialsPluginListener implements Listener, IReload
if (!Methods.hasMethod() && Methods.setMethod(ess.getServer().getPluginManager()))
{
ess.getLogger().log(
- Level.INFO, "Payment method found ({0} version: {1})", new Object[]{
- Methods.getMethod().getName(), Methods.getMethod().getVersion()
- });
+ Level.INFO, "Payment method found ({0} version: {1})", new Object[]
+ {
+ Methods.getMethod().getName(), Methods.getMethod().getVersion()
+ });
}
}
diff --git a/Essentials/src/net/ess3/metrics/MetricsListener.java b/Essentials/src/net/ess3/metrics/MetricsListener.java
index d001e72f6..20fd00cc1 100644
--- a/Essentials/src/net/ess3/metrics/MetricsListener.java
+++ b/Essentials/src/net/ess3/metrics/MetricsListener.java
@@ -30,7 +30,7 @@ public class MetricsListener implements Listener
ISettings settings = ess.getSettings();
if (settings.getData().getGeneral().getMetricsEnabled() == null && (Permissions.ESSENTIALS.isAuthorized(
- event.getPlayer()) || event.getPlayer().hasPermission("bukkit.broadcast.admin")))
+ event.getPlayer()) || event.getPlayer().hasPermission("bukkit.broadcast.admin")))
{
player.sendMessage(_("metrics1"));
player.sendMessage(_("metrics2"));
diff --git a/Essentials/src/net/ess3/metrics/MetricsStarter.java b/Essentials/src/net/ess3/metrics/MetricsStarter.java
index 412742bef..75caf6c65 100644
--- a/Essentials/src/net/ess3/metrics/MetricsStarter.java
+++ b/Essentials/src/net/ess3/metrics/MetricsStarter.java
@@ -53,10 +53,10 @@ public class MetricsStarter implements Runnable
ess.getLogger().info(_("metrics4"));
start = false;
}
- else if (settings.getData().getGeneral().getMetricsEnabled())
- {
- start = true;
- }
+ else if (settings.getData().getGeneral().getMetricsEnabled())
+ {
+ start = true;
+ }
}
}
catch (Exception ex)
diff --git a/Essentials/src/net/ess3/permissions/BasePermission.java b/Essentials/src/net/ess3/permissions/BasePermission.java
index b1cb0be68..5312ebb93 100644
--- a/Essentials/src/net/ess3/permissions/BasePermission.java
+++ b/Essentials/src/net/ess3/permissions/BasePermission.java
@@ -1,5 +1,6 @@
package net.ess3.permissions;
+
public class BasePermission extends AbstractSuperpermsPermission
{
protected String permission;
diff --git a/Essentials/src/net/ess3/permissions/Permissions.java b/Essentials/src/net/ess3/permissions/Permissions.java
index 2ae61391f..fbacba29d 100644
--- a/Essentials/src/net/ess3/permissions/Permissions.java
+++ b/Essentials/src/net/ess3/permissions/Permissions.java
@@ -21,9 +21,9 @@ public enum Permissions implements IPermission
BAN_EXEMPT,
BAN_NOTIFY,
BAN_OFFLINE,
- BOOK_AUTHOR,
- BOOK_OTHERS,
- BOOK_TITLE,
+ BOOK_AUTHOR,
+ BOOK_OTHERS,
+ BOOK_TITLE,
BREAK_BEDROCK,
CHAT_COLOR,
CHAT_IGNORE_EXEMPT,
@@ -39,8 +39,8 @@ public enum Permissions implements IPermission
EXP_SET_OTHERS,
EXP_OTHERS,
FEED_OTHERS,
- FIREWORK_FIRE,
- FIREWORK_MULTIPLE,
+ FIREWORK_FIRE,
+ FIREWORK_MULTIPLE,
FLY_EXEMPT,
FLY_OTHERS,
FLY_SAFELOGIN,
@@ -170,8 +170,7 @@ public enum Permissions implements IPermission
{
return PermissionFactory.checkPermission(sender, this);
}
-
- public static final DotStarPermission ESSENTIALS = new DotStarPermission("essentials.");
+ public static final DotStarPermission ESSENTIALS = new DotStarPermission("essentials.");
public static final DotStarPermission ENCHANT = new DotStarPermission("essentials.enchant");
public static final DotStarPermission PERGROUPTELEPORT = new DotStarPermission("essentials.teleport.groups");
public static final MaterialDotStarPermission GIVE = new MaterialDotStarPermission("essentials.give", PermissionDefault.TRUE);
diff --git a/Essentials/src/net/ess3/settings/Kits.java b/Essentials/src/net/ess3/settings/Kits.java
index f68ac5d83..2892729c4 100644
--- a/Essentials/src/net/ess3/settings/Kits.java
+++ b/Essentials/src/net/ess3/settings/Kits.java
@@ -21,11 +21,10 @@ public class Kits implements StorageObject
kit.setDelay(10.0);
kit.setItems(
Arrays.asList(
- new ItemStack(Material.DIAMOND_SPADE, 1), new ItemStack(Material.DIAMOND_PICKAXE, 1), new ItemStack(Material.DIAMOND_AXE, 1)));
+ new ItemStack(Material.DIAMOND_SPADE, 1), new ItemStack(Material.DIAMOND_PICKAXE, 1), new ItemStack(Material.DIAMOND_AXE, 1)));
kits = new HashMap();
kits.put("tools", kit);
}
-
@MapValueType(Kit.class)
@Getter(AccessLevel.NONE)
@Setter(AccessLevel.NONE)
diff --git a/Essentials/src/net/ess3/settings/SpawnsHolder.java b/Essentials/src/net/ess3/settings/SpawnsHolder.java
index 666c808fa..00ca4a48f 100644
--- a/Essentials/src/net/ess3/settings/SpawnsHolder.java
+++ b/Essentials/src/net/ess3/settings/SpawnsHolder.java
@@ -36,7 +36,7 @@ public class SpawnsHolder extends AsyncStorageObjectHolder
/**
* Sets a spawn location
*
- * @param loc - Location you want to set as spawn
+ * @param loc - Location you want to set as spawn
* @param group - Group to save it under in the config
*/
public void setSpawn(final Location loc, final String group)
diff --git a/Essentials/src/net/ess3/settings/WorldOptions.java b/Essentials/src/net/ess3/settings/WorldOptions.java
index e49ebb181..40e57dee7 100644
--- a/Essentials/src/net/ess3/settings/WorldOptions.java
+++ b/Essentials/src/net/ess3/settings/WorldOptions.java
@@ -26,7 +26,6 @@ public class WorldOptions implements StorageObject
}
}
}
-
@Comment("Disables godmode for all players if they teleport to this world.")
private boolean godmode = true;
@Comment("Prevent creatures spawning")
diff --git a/Essentials/src/net/ess3/settings/Worlds.java b/Essentials/src/net/ess3/settings/Worlds.java
index b65dd1de4..0ef4f7ea2 100644
--- a/Essentials/src/net/ess3/settings/Worlds.java
+++ b/Essentials/src/net/ess3/settings/Worlds.java
@@ -9,5 +9,4 @@ import net.ess3.storage.StorageObject;
@EqualsAndHashCode(callSuper = false)
public class Worlds implements StorageObject
{
-
}
diff --git a/Essentials/src/net/ess3/settings/antibuild/Alert.java b/Essentials/src/net/ess3/settings/antibuild/Alert.java
index 4553f84ed..c2c538103 100644
--- a/Essentials/src/net/ess3/settings/antibuild/Alert.java
+++ b/Essentials/src/net/ess3/settings/antibuild/Alert.java
@@ -32,8 +32,9 @@ public class Alert implements StorageObject
public void setupDefaults()
{
- Material[] mat = {
- Material.LAVA, Material.STATIONARY_LAVA, Material.TNT, Material.LAVA_BUCKET
+ Material[] mat =
+ {
+ Material.LAVA, Material.STATIONARY_LAVA, Material.TNT, Material.LAVA_BUCKET
};
alertOnPlacement.addAll(Arrays.asList(mat));
alertOnUse.add(Material.LAVA_BUCKET);
diff --git a/Essentials/src/net/ess3/settings/commands/List.java b/Essentials/src/net/ess3/settings/commands/List.java
index e2b869aaf..ea47d9115 100644
--- a/Essentials/src/net/ess3/settings/commands/List.java
+++ b/Essentials/src/net/ess3/settings/commands/List.java
@@ -1,6 +1,5 @@
package net.ess3.settings.commands;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.ess3.storage.Comment;
diff --git a/Essentials/src/net/ess3/settings/commands/SocialSpy.java b/Essentials/src/net/ess3/settings/commands/SocialSpy.java
index 4460c0cfd..9cb572689 100644
--- a/Essentials/src/net/ess3/settings/commands/SocialSpy.java
+++ b/Essentials/src/net/ess3/settings/commands/SocialSpy.java
@@ -21,7 +21,6 @@ public class SocialSpy implements StorageObject
socialspyCommands.addAll(Arrays.asList("msg", "r", "mail", "m", "t", "emsg", "tell", "er", "reply", "ereply", "email"));
}
}
-
@ListType
@Comment("Commands to listen for in socialspy")
private List socialspyCommands = new ArrayList();
diff --git a/Essentials/src/net/ess3/settings/commands/Speed.java b/Essentials/src/net/ess3/settings/commands/Speed.java
index a59991dd1..696d4280f 100644
--- a/Essentials/src/net/ess3/settings/commands/Speed.java
+++ b/Essentials/src/net/ess3/settings/commands/Speed.java
@@ -12,7 +12,6 @@ public class Speed implements StorageObject
{
@Comment("Set the max fly speed, values range from 0.2 to 1.0")
private double maxFlySpeed = 1.0f;
-
@Comment("Set the max walk speed, values range from 0.1 to 1.0")
private double maxWalkSpeed = 0.8f;
}
diff --git a/Essentials/src/net/ess3/settings/commands/Tempban.java b/Essentials/src/net/ess3/settings/commands/Tempban.java
index aacebec88..1b49f3fbb 100644
--- a/Essentials/src/net/ess3/settings/commands/Tempban.java
+++ b/Essentials/src/net/ess3/settings/commands/Tempban.java
@@ -5,13 +5,13 @@ import lombok.EqualsAndHashCode;
import net.ess3.storage.Comment;
import net.ess3.storage.StorageObject;
+
@Data
@EqualsAndHashCode(callSuper = false)
public class Tempban implements StorageObject
{
@Comment(
- "Set to the maximum time in seconds a player can be tempbanned for.\n"+
- "Set to -1 to disable, and override with essentials.tempban.unlimited"
- )
+ "Set to the maximum time in seconds a player can be tempbanned for.\n"
+ + "Set to -1 to disable, and override with essentials.tempban.unlimited")
private long maxTempbanTime = -1;
}
diff --git a/Essentials/src/net/ess3/storage/StorageQueue.java b/Essentials/src/net/ess3/storage/StorageQueue.java
index 94880c542..44c1d804e 100644
--- a/Essentials/src/net/ess3/storage/StorageQueue.java
+++ b/Essentials/src/net/ess3/storage/StorageQueue.java
@@ -71,10 +71,14 @@ public class StorageQueue implements Runnable
{
if (this.enabled.getAndSet(enabled) != enabled)
{
- if (enabled) {
+ if (enabled)
+ {
startThread();
- } else {
- while (queue.size() > 0) {
+ }
+ else
+ {
+ while (queue.size() > 0)
+ {
work();
try
{
@@ -86,7 +90,7 @@ public class StorageQueue implements Runnable
}
}
}
-
+
}
public int getQueueSize()
diff --git a/Essentials/src/net/ess3/user/CooldownException.java b/Essentials/src/net/ess3/user/CooldownException.java
index 08e163522..2cd9ac543 100644
--- a/Essentials/src/net/ess3/user/CooldownException.java
+++ b/Essentials/src/net/ess3/user/CooldownException.java
@@ -3,12 +3,10 @@ package net.ess3.user;
public class CooldownException extends Exception
{
-
private static final long serialVersionUID = 913632836257457319L;
public CooldownException(String timeLeft)
{
super(timeLeft);
}
-
}
diff --git a/Essentials/src/net/ess3/user/IOfflinePlayer.java b/Essentials/src/net/ess3/user/IOfflinePlayer.java
index b6032d09f..8a15a003f 100644
--- a/Essentials/src/net/ess3/user/IOfflinePlayer.java
+++ b/Essentials/src/net/ess3/user/IOfflinePlayer.java
@@ -10,7 +10,6 @@ public interface IOfflinePlayer
String getDisplayName();
//Location getBedSpawnLocation();
-
void setBanned(boolean bln);
boolean hasPermission(Permission perm);
diff --git a/Essentials/src/net/ess3/user/IOfflineUser.java b/Essentials/src/net/ess3/user/IOfflineUser.java
index b5361da4f..237569825 100644
--- a/Essentials/src/net/ess3/user/IOfflineUser.java
+++ b/Essentials/src/net/ess3/user/IOfflineUser.java
@@ -5,5 +5,4 @@ import net.ess3.storage.IStorageObjectHolder;
public interface IOfflineUser extends IStorageObjectHolder//, IOfflinePlayer
{
-
}
diff --git a/Essentials/src/net/ess3/user/PlayerNotFoundException.java b/Essentials/src/net/ess3/user/PlayerNotFoundException.java
index a61757d95..d4fa6b436 100644
--- a/Essentials/src/net/ess3/user/PlayerNotFoundException.java
+++ b/Essentials/src/net/ess3/user/PlayerNotFoundException.java
@@ -5,7 +5,6 @@ import static net.ess3.I18n._;
public class PlayerNotFoundException extends Exception
{
-
private static final long serialVersionUID = -510752839980332640L;
public PlayerNotFoundException()
diff --git a/Essentials/src/net/ess3/user/User.java b/Essentials/src/net/ess3/user/User.java
index e74a0b878..6e0bfb13a 100644
--- a/Essentials/src/net/ess3/user/User.java
+++ b/Essentials/src/net/ess3/user/User.java
@@ -592,7 +592,6 @@ public class User extends UserBase implements IUser
{
return true;
}
-
private long teleportInvulnerabilityTimestamp = 0;
public void enableInvulnerabilityAfterTeleport()
@@ -635,7 +634,7 @@ public class User extends UserBase implements IUser
}
}
ess.getVanishedPlayers().add(getName());
- if(Permissions.VANISH_EFFECT.isAuthorized(this))
+ if (Permissions.VANISH_EFFECT.isAuthorized(this))
{
getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false));
}
@@ -647,7 +646,7 @@ public class User extends UserBase implements IUser
p.showPlayer(getPlayer());
}
ess.getVanishedPlayers().remove(getName());
- if(Permissions.VANISH_EFFECT.isAuthorized(this))
+ if (Permissions.VANISH_EFFECT.isAuthorized(this))
{
getPlayer().removePotionEffect(PotionEffectType.INVISIBILITY);
}
diff --git a/Essentials/src/net/ess3/user/UserData.java b/Essentials/src/net/ess3/user/UserData.java
index b9d684930..9b63fab2f 100644
--- a/Essentials/src/net/ess3/user/UserData.java
+++ b/Essentials/src/net/ess3/user/UserData.java
@@ -6,6 +6,7 @@ import net.ess3.storage.*;
import org.bukkit.Location;
import org.bukkit.Material;
+
@Data
@EqualsAndHashCode(callSuper = false)
public class UserData implements StorageObject
@@ -14,8 +15,6 @@ public class UserData implements StorageObject
{
JAIL, MUTE, LASTHEAL, LASTTELEPORT, LOGIN, LOGOUT, KIT, COMMAND
}
-
-
private String nickname;
private Double money;
@MapValueType(StoredLocation.class)
@@ -27,7 +26,6 @@ public class UserData implements StorageObject
{
return homes == null ? Collections.emptyMap() : Collections.unmodifiableMap(homes);
}
-
@ListType(Material.class)
@Getter(AccessLevel.NONE)
@Setter(AccessLevel.NONE)
@@ -37,7 +35,6 @@ public class UserData implements StorageObject
{
return unlimited == null ? Collections.emptySet() : Collections.unmodifiableSet(unlimited);
}
-
@MapValueType(List.class)
@MapKeyType(Material.class)
@Getter(AccessLevel.NONE)
@@ -48,7 +45,6 @@ public class UserData implements StorageObject
{
return powerTools == null ? Collections.>emptyMap() : Collections.unmodifiableMap(powerTools);
}
-
private StoredLocation lastLocation;
@MapKeyType(String.class)
@MapValueType(Long.class)
@@ -60,7 +56,6 @@ public class UserData implements StorageObject
{
return timestamps == null ? Collections.emptyMap() : Collections.unmodifiableMap(timestamps);
}
-
private String jail;
@ListType
@Getter(AccessLevel.NONE)
@@ -71,7 +66,6 @@ public class UserData implements StorageObject
{
return mails == null ? Collections.emptyList() : Collections.unmodifiableList(mails);
}
-
private Inventory inventory;
private boolean teleportEnabled;
@ListType
@@ -83,7 +77,6 @@ public class UserData implements StorageObject
{
return ignore == null ? Collections.emptySet() : Collections.unmodifiableSet(ignore);
}
-
private boolean godmode;
private boolean muted;
private boolean jailed;
diff --git a/Essentials/src/net/ess3/user/UserMap.java b/Essentials/src/net/ess3/user/UserMap.java
index c83047f0c..9df31e543 100644
--- a/Essentials/src/net/ess3/user/UserMap.java
+++ b/Essentials/src/net/ess3/user/UserMap.java
@@ -141,7 +141,6 @@ public class UserMap extends StorageObjectMap implements IUserMap
{
return matchUsers(name, false, false, requester);
}
-
private final Pattern comma = Pattern.compile(",");
public Set matchUsers(final String name, final boolean includeHidden, final boolean includeOffline, final Player requester)
diff --git a/Essentials/src/net/ess3/utils/DateUtil.java b/Essentials/src/net/ess3/utils/DateUtil.java
index af3de2536..5fd569246 100644
--- a/Essentials/src/net/ess3/utils/DateUtil.java
+++ b/Essentials/src/net/ess3/utils/DateUtil.java
@@ -30,11 +30,13 @@ public class DateUtil
}
StringBuilder sb = new StringBuilder();
- int[] types = new int[]{
- Calendar.YEAR, Calendar.MONTH, Calendar.DAY_OF_MONTH, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND
+ int[] types = new int[]
+ {
+ Calendar.YEAR, Calendar.MONTH, Calendar.DAY_OF_MONTH, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND
};
- String[] names = new String[]{
- _("year"), _("years"), _("month"), _("months"), _("day"), _("days"), _("hour"), _("hours"), _("minute"), _("minutes"), _("second"), _("seconds")
+ String[] names = new String[]
+ {
+ _("year"), _("years"), _("month"), _("months"), _("day"), _("days"), _("hour"), _("hours"), _("minute"), _("minutes"), _("second"), _("seconds")
};
for (int i = 0; i < types.length; i++)
{
diff --git a/Essentials/src/net/ess3/utils/ExecuteTimer.java b/Essentials/src/net/ess3/utils/ExecuteTimer.java
index 2d7b77605..bf97ee420 100644
--- a/Essentials/src/net/ess3/utils/ExecuteTimer.java
+++ b/Essentials/src/net/ess3/utils/ExecuteTimer.java
@@ -12,7 +12,6 @@ public class ExecuteTimer
private final List times;
private final DecimalFormat decimalFormat = new DecimalFormat("#0.000", DecimalFormatSymbols.getInstance(Locale.US));
-
public ExecuteTimer()
{
times = new ArrayList();
diff --git a/Essentials/src/net/ess3/utils/LocationUtil.java b/Essentials/src/net/ess3/utils/LocationUtil.java
index 8455f4864..664b0e74f 100644
--- a/Essentials/src/net/ess3/utils/LocationUtil.java
+++ b/Essentials/src/net/ess3/utils/LocationUtil.java
@@ -69,7 +69,6 @@ public class LocationUtil
}
return block.getLocation();
}
-
public final static int RADIUS = 3;
public final static Vector3D[] VOLUME;
@@ -82,13 +81,11 @@ public class LocationUtil
this.y = y;
this.z = z;
}
-
public int x;
public int y;
public int z;
}
-
static
{
List pos = new ArrayList();
@@ -213,7 +210,7 @@ public class LocationUtil
}
if ((!AIR_MATERIALS.contains(world.getBlockAt(x, y, z).getType().getId())) || (!AIR_MATERIALS.contains(
- world.getBlockAt(x, y + 1, z).getType().getId())))
+ world.getBlockAt(x, y + 1, z).getType().getId())))
{
return true;
}
diff --git a/Essentials/src/net/ess3/utils/Target.java b/Essentials/src/net/ess3/utils/Target.java
index 6e871a051..04fa17e1f 100644
--- a/Essentials/src/net/ess3/utils/Target.java
+++ b/Essentials/src/net/ess3/utils/Target.java
@@ -30,4 +30,3 @@ public class Target
return location;
}
}
-
diff --git a/Essentials/src/net/ess3/utils/Util.java b/Essentials/src/net/ess3/utils/Util.java
index 0817448bd..6f93b0909 100644
--- a/Essentials/src/net/ess3/utils/Util.java
+++ b/Essentials/src/net/ess3/utils/Util.java
@@ -16,7 +16,6 @@ public final class Util
private Util()
{
}
-
private final static Pattern INVALIDFILECHARS = Pattern.compile("[^\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]");
private final static Pattern INVALIDCHARS = Pattern.compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]");
@@ -82,7 +81,7 @@ public final class Util
public static ItemStack convertBlockToItem(final Block block)
{
final ItemStack is = new ItemStack(block.getType(), 1, block.getData());
-
+
final short durability = 0;
switch (is.getType())
@@ -215,5 +214,4 @@ public final class Util
}
return buf.toString();
}
-
}
diff --git a/Essentials/src/net/ess3/utils/gnu/inet/encoding/Punycode.java b/Essentials/src/net/ess3/utils/gnu/inet/encoding/Punycode.java
index ee72d36df..c1946c84f 100644
--- a/Essentials/src/net/ess3/utils/gnu/inet/encoding/Punycode.java
+++ b/Essentials/src/net/ess3/utils/gnu/inet/encoding/Punycode.java
@@ -2,38 +2,26 @@ package net.ess3.utils.gnu.inet.encoding;
/**
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
- * Foundation, Inc.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
*
* Author: Oliver Hitz
*
* This file is part of GNU Libidn.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
+ * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
*
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
/**
- * This class offers static methods for encoding/decoding strings
- * using the Punycode algorithm.
- *
- * Note that this implementation only supports 16-bit Unicode code
- * points.
+ * This class offers static methods for encoding/decoding strings using the Punycode algorithm. Note that this implementation only supports 16-bit Unicode code points.
*/
/*
* Changes by snowleo:
@@ -124,7 +112,7 @@ public class Punycode
{
int q = delta;
- for (int k = BASE; ; k += BASE)
+ for (int k = BASE;; k += BASE)
{
int t;
if (k <= bias)
@@ -203,7 +191,7 @@ public class Punycode
int oldi = i;
int w = 1;
- for (int k = BASE; ; k += BASE)
+ for (int k = BASE;; k += BASE)
{
if (d == input.length())
{
diff --git a/Essentials/src/net/ess3/utils/gnu/inet/encoding/PunycodeException.java b/Essentials/src/net/ess3/utils/gnu/inet/encoding/PunycodeException.java
index 7e4da7d79..fb1f3d0ce 100644
--- a/Essentials/src/net/ess3/utils/gnu/inet/encoding/PunycodeException.java
+++ b/Essentials/src/net/ess3/utils/gnu/inet/encoding/PunycodeException.java
@@ -2,30 +2,23 @@ package net.ess3.utils.gnu.inet.encoding;
/**
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
- * Foundation, Inc.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
*
* Author: Oliver Hitz
*
* This file is part of GNU Libidn.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
+ * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
*
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
/**
* Exception handling for Punycode class.
*/
diff --git a/Essentials/src/net/ess3/utils/textreader/ArrayListInput.java b/Essentials/src/net/ess3/utils/textreader/ArrayListInput.java
index 2bd0d914e..31b1ac991 100644
--- a/Essentials/src/net/ess3/utils/textreader/ArrayListInput.java
+++ b/Essentials/src/net/ess3/utils/textreader/ArrayListInput.java
@@ -27,5 +27,4 @@ public class ArrayListInput implements IText
{
return Collections.emptyMap();
}
-
}
diff --git a/Essentials/src/net/ess3/utils/textreader/BookInput.java b/Essentials/src/net/ess3/utils/textreader/BookInput.java
index b36d640dd..6f2543095 100644
--- a/Essentials/src/net/ess3/utils/textreader/BookInput.java
+++ b/Essentials/src/net/ess3/utils/textreader/BookInput.java
@@ -9,121 +9,121 @@ import java.util.*;
public class BookInput implements IText
{
- private final transient List lines;
- private final transient List chapters;
- private final transient Map bookmarks;
- private final transient long lastChange;
- private final static HashMap> cache = new HashMap>();
+ private final transient List lines;
+ private final transient List chapters;
+ private final transient Map bookmarks;
+ private final transient long lastChange;
+ private final static HashMap> cache = new HashMap>();
- public BookInput(final String filename, final boolean createFile, final IEssentials ess) throws IOException
- {
+ public BookInput(final String filename, final boolean createFile, final IEssentials ess) throws IOException
+ {
- File file = null;
- if (file == null || !file.exists())
- {
- file = new File(ess.getPlugin().getDataFolder(), filename + ".txt");
- }
- if (!file.exists())
- {
- if (createFile)
- {
- final InputStream input = ess.getPlugin().getResource(filename + ".txt");
- final OutputStream output = new FileOutputStream(file);
- try
- {
- final byte[] buffer = new byte[1024];
- int length = input.read(buffer);
- while (length > 0)
- {
- output.write(buffer, 0, length);
- length = input.read(buffer);
- }
- }
- finally
- {
- output.close();
- input.close();
- }
- ess.getLogger().info("File " + filename + ".txt does not exist. Creating one for you.");
- }
- }
- if (!file.exists())
- {
- lastChange = 0;
- lines = Collections.emptyList();
- chapters = Collections.emptyList();
- bookmarks = Collections.emptyMap();
- throw new FileNotFoundException("Could not create " + filename + ".txt");
- }
- else
- {
- lastChange = file.lastModified();
- boolean readFromfile;
- synchronized (cache)
- {
- final SoftReference inputRef = cache.get(file.getName());
- BookInput input;
- if (inputRef == null || (input = inputRef.get()) == null || input.lastChange < lastChange)
- {
- lines = new ArrayList();
- chapters = new ArrayList();
- bookmarks = new HashMap();
- cache.put(file.getName(), new SoftReference(this));
- readFromfile = true;
- }
- else
- {
- lines = Collections.unmodifiableList(input.getLines());
- chapters = Collections.unmodifiableList(input.getChapters());
- bookmarks = Collections.unmodifiableMap(input.getBookmarks());
- readFromfile = false;
- }
- }
- if (readFromfile)
- {
- final BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
- try
- {
- int lineNumber = 0;
- while (bufferedReader.ready())
- {
- final String line = bufferedReader.readLine();
- if (line == null)
- {
- break;
- }
- if (line.length() > 0 && line.charAt(0) == '#')
- {
- bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-fk]", ""), lineNumber);
- chapters.add(line.substring(1).replace('&', '§').replace("§§", "&"));
- }
- lines.add(line.replace('&', '§').replace("§§", "&"));
- lineNumber++;
- }
- }
- finally
- {
- bufferedReader.close();
- }
- }
- }
- }
+ File file = null;
+ if (file == null || !file.exists())
+ {
+ file = new File(ess.getPlugin().getDataFolder(), filename + ".txt");
+ }
+ if (!file.exists())
+ {
+ if (createFile)
+ {
+ final InputStream input = ess.getPlugin().getResource(filename + ".txt");
+ final OutputStream output = new FileOutputStream(file);
+ try
+ {
+ final byte[] buffer = new byte[1024];
+ int length = input.read(buffer);
+ while (length > 0)
+ {
+ output.write(buffer, 0, length);
+ length = input.read(buffer);
+ }
+ }
+ finally
+ {
+ output.close();
+ input.close();
+ }
+ ess.getLogger().info("File " + filename + ".txt does not exist. Creating one for you.");
+ }
+ }
+ if (!file.exists())
+ {
+ lastChange = 0;
+ lines = Collections.emptyList();
+ chapters = Collections.emptyList();
+ bookmarks = Collections.emptyMap();
+ throw new FileNotFoundException("Could not create " + filename + ".txt");
+ }
+ else
+ {
+ lastChange = file.lastModified();
+ boolean readFromfile;
+ synchronized (cache)
+ {
+ final SoftReference inputRef = cache.get(file.getName());
+ BookInput input;
+ if (inputRef == null || (input = inputRef.get()) == null || input.lastChange < lastChange)
+ {
+ lines = new ArrayList();
+ chapters = new ArrayList();
+ bookmarks = new HashMap();
+ cache.put(file.getName(), new SoftReference(this));
+ readFromfile = true;
+ }
+ else
+ {
+ lines = Collections.unmodifiableList(input.getLines());
+ chapters = Collections.unmodifiableList(input.getChapters());
+ bookmarks = Collections.unmodifiableMap(input.getBookmarks());
+ readFromfile = false;
+ }
+ }
+ if (readFromfile)
+ {
+ final BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
+ try
+ {
+ int lineNumber = 0;
+ while (bufferedReader.ready())
+ {
+ final String line = bufferedReader.readLine();
+ if (line == null)
+ {
+ break;
+ }
+ if (line.length() > 0 && line.charAt(0) == '#')
+ {
+ bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-fk]", ""), lineNumber);
+ chapters.add(line.substring(1).replace('&', '§').replace("§§", "&"));
+ }
+ lines.add(line.replace('&', '§').replace("§§", "&"));
+ lineNumber++;
+ }
+ }
+ finally
+ {
+ bufferedReader.close();
+ }
+ }
+ }
+ }
- @Override
- public List getLines()
- {
- return lines;
- }
+ @Override
+ public List getLines()
+ {
+ return lines;
+ }
- @Override
- public List getChapters()
- {
- return chapters;
- }
+ @Override
+ public List getChapters()
+ {
+ return chapters;
+ }
- @Override
- public Map getBookmarks()
- {
- return bookmarks;
- }
+ @Override
+ public Map getBookmarks()
+ {
+ return bookmarks;
+ }
}
diff --git a/Essentials/src/net/ess3/utils/textreader/BookPager.java b/Essentials/src/net/ess3/utils/textreader/BookPager.java
index dd3332b40..e5113024c 100644
--- a/Essentials/src/net/ess3/utils/textreader/BookPager.java
+++ b/Essentials/src/net/ess3/utils/textreader/BookPager.java
@@ -9,103 +9,103 @@ import java.util.Map;
public class BookPager
{
- private final transient IText text;
+ private final transient IText text;
- public BookPager(final IText text)
- {
- this.text = text;
- }
+ public BookPager(final IText text)
+ {
+ this.text = text;
+ }
- public List getPages(final String pageStr) throws Exception
- {
- List lines = text.getLines();
- List chapters = text.getChapters();
- List pageLines = new ArrayList();
- Map bookmarks = text.getBookmarks();
+ public List getPages(final String pageStr) throws Exception
+ {
+ List lines = text.getLines();
+ List chapters = text.getChapters();
+ List pageLines = new ArrayList();
+ Map bookmarks = text.getBookmarks();
- //This checks to see if we have the chapter in the index
- if (!bookmarks.containsKey(pageStr.toLowerCase(Locale.ENGLISH)))
- {
- throw new Exception(_("Unknown chapter."));
- }
+ //This checks to see if we have the chapter in the index
+ if (!bookmarks.containsKey(pageStr.toLowerCase(Locale.ENGLISH)))
+ {
+ throw new Exception(_("Unknown chapter."));
+ }
- //Since we have a valid chapter, count the number of lines in the chapter
- final int chapterstart = bookmarks.get(pageStr.toLowerCase(Locale.ENGLISH)) + 1;
- int chapterend;
- for (chapterend = chapterstart; chapterend < lines.size(); chapterend++)
- {
- final String line = lines.get(chapterend);
- if (line.length() > 0 && line.charAt(0) == '#')
- {
- break;
- }
- }
+ //Since we have a valid chapter, count the number of lines in the chapter
+ final int chapterstart = bookmarks.get(pageStr.toLowerCase(Locale.ENGLISH)) + 1;
+ int chapterend;
+ for (chapterend = chapterstart; chapterend < lines.size(); chapterend++)
+ {
+ final String line = lines.get(chapterend);
+ if (line.length() > 0 && line.charAt(0) == '#')
+ {
+ break;
+ }
+ }
- for (int lineNo = chapterstart; lineNo < chapterend; lineNo += 1)
- {
- String pageLine = "\u00a70" + lines.get(lineNo);
- String tempLine;
- final double max = 18;
- final int lineLength = pageLine.length();
- double length = 0;
- int pointer = 0;
- int start = 0;
- double weight = 1;
+ for (int lineNo = chapterstart; lineNo < chapterend; lineNo += 1)
+ {
+ String pageLine = "\u00a70" + lines.get(lineNo);
+ String tempLine;
+ final double max = 18;
+ final int lineLength = pageLine.length();
+ double length = 0;
+ int pointer = 0;
+ int start = 0;
+ double weight = 1;
- while (pointer < lineLength)
- {
- if (length >= max)
- {
- tempLine = pageLine.substring(start, pointer);
- pageLines.add(tempLine);
- start = pointer;
- length = 0;
- }
+ while (pointer < lineLength)
+ {
+ if (length >= max)
+ {
+ tempLine = pageLine.substring(start, pointer);
+ pageLines.add(tempLine);
+ start = pointer;
+ length = 0;
+ }
- Character letter = pageLine.charAt(pointer);
+ Character letter = pageLine.charAt(pointer);
- if (letter == '\u00a7')
- {
- Character nextLetter = pageLine.charAt(pointer + 1);
- if (nextLetter == 'l' || nextLetter == 'L')
- {
- weight = 1.25;
- }
- else
- {
- weight = 1;
- }
- pointer++;
- }
- else if (letter == ' ')
- {
- length += (0.7 * weight);
- }
- else
- {
- length += weight;
- }
- pointer++;
- }
- if (length > 0)
- {
- tempLine = pageLine.substring(start, lineLength);
- pageLines.add(tempLine);
- }
- }
+ if (letter == '\u00a7')
+ {
+ Character nextLetter = pageLine.charAt(pointer + 1);
+ if (nextLetter == 'l' || nextLetter == 'L')
+ {
+ weight = 1.25;
+ }
+ else
+ {
+ weight = 1;
+ }
+ pointer++;
+ }
+ else if (letter == ' ')
+ {
+ length += (0.7 * weight);
+ }
+ else
+ {
+ length += weight;
+ }
+ pointer++;
+ }
+ if (length > 0)
+ {
+ tempLine = pageLine.substring(start, lineLength);
+ pageLines.add(tempLine);
+ }
+ }
- List pages = new ArrayList();
- for (int count = 0; count < pageLines.size(); count += 12)
- {
- StringBuilder newPage = new StringBuilder();
- for (int i = count; i < count + 12 && i < pageLines.size(); i++)
- {
- newPage.append("\n").append(pageLines.get(i));
- }
+ List pages = new ArrayList();
+ for (int count = 0; count < pageLines.size(); count += 12)
+ {
+ StringBuilder newPage = new StringBuilder();
+ for (int i = count; i < count + 12 && i < pageLines.size(); i++)
+ {
+ newPage.append("\n").append(pageLines.get(i));
+ }
- pages.add(newPage.toString());
- }
+ pages.add(newPage.toString());
+ }
- return pages;
- }
+ return pages;
+ }
}
diff --git a/Essentials/src/net/ess3/utils/textreader/HelpInput.java b/Essentials/src/net/ess3/utils/textreader/HelpInput.java
index 8044a5807..334b1d0cd 100644
--- a/Essentials/src/net/ess3/utils/textreader/HelpInput.java
+++ b/Essentials/src/net/ess3/utils/textreader/HelpInput.java
@@ -56,8 +56,8 @@ public class HelpInput implements IText
try
{
if (!match.equalsIgnoreCase("") && (!pluginNameLow.contains(match)) && (!k.getKey().toLowerCase(Locale.ENGLISH).contains(
- match)) && (!(k.getValue().get(DESCRIPTION) instanceof String && ((String)k.getValue().get(DESCRIPTION)).toLowerCase(
- Locale.ENGLISH).contains(match))))
+ match)) && (!(k.getValue().get(DESCRIPTION) instanceof String && ((String)k.getValue().get(DESCRIPTION)).toLowerCase(
+ Locale.ENGLISH).contains(match))))
{
continue;
}
diff --git a/Essentials/src/net/ess3/utils/textreader/SimpleTextInput.java b/Essentials/src/net/ess3/utils/textreader/SimpleTextInput.java
index 58493fc86..6ef3731c1 100644
--- a/Essentials/src/net/ess3/utils/textreader/SimpleTextInput.java
+++ b/Essentials/src/net/ess3/utils/textreader/SimpleTextInput.java
@@ -32,5 +32,4 @@ public class SimpleTextInput implements IText
{
return Collections.emptyMap();
}
-
}
diff --git a/Essentials/test/net/ess3/EssentialsTest.java b/Essentials/test/net/ess3/EssentialsTest.java
index f01e14a5a..b6e17720b 100644
--- a/Essentials/test/net/ess3/EssentialsTest.java
+++ b/Essentials/test/net/ess3/EssentialsTest.java
@@ -91,7 +91,7 @@ public abstract class EssentialsTest extends TestCase
folder = new File(folder, "Essentials-" + System.currentTimeMillis());
when(plugin.getDataFolder()).thenReturn(folder);
when(world.getName()).thenReturn("world");
-
+
}
protected void createFolder()
diff --git a/Essentials/test/net/ess3/StorageTest.java b/Essentials/test/net/ess3/StorageTest.java
index 4ca05d9a8..4c96a165b 100644
--- a/Essentials/test/net/ess3/StorageTest.java
+++ b/Essentials/test/net/ess3/StorageTest.java
@@ -155,28 +155,28 @@ public class StorageTest extends EssentialsTest
}
/*@Test
- public void testOldUserdata()
- {
- ExecuteTimer ext = new ExecuteTimer();
- ext.start();
- OfflinePlayer base1 = server.createPlayer("testPlayer1", ess);
- server.addPlayer(base1);
- ext.mark("fake user created");
- UserData user = (UserData)ess.getUserMap().getUser(base1);
- ext.mark("load empty user");
- for (int j = 0; j < 1; j++)
- {
- user.setHome("home", new Location(world, j, j, j));
- }
- ext.mark("change home 1 times");
- user.save();
- ext.mark("write user");
- user.save();
- ext.mark("write user (cached)");
- user.reloadConfig();
- ext.mark("reloaded file");
- user.reloadConfig();
- ext.mark("reloaded file (cached)");
- System.out.println(ext.end());
- }*/
+ public void testOldUserdata()
+ {
+ ExecuteTimer ext = new ExecuteTimer();
+ ext.start();
+ OfflinePlayer base1 = server.createPlayer("testPlayer1", ess);
+ server.addPlayer(base1);
+ ext.mark("fake user created");
+ UserData user = (UserData)ess.getUserMap().getUser(base1);
+ ext.mark("load empty user");
+ for (int j = 0; j < 1; j++)
+ {
+ user.setHome("home", new Location(world, j, j, j));
+ }
+ ext.mark("change home 1 times");
+ user.save();
+ ext.mark("write user");
+ user.save();
+ ext.mark("write user (cached)");
+ user.reloadConfig();
+ ext.mark("reloaded file");
+ user.reloadConfig();
+ ext.mark("reloaded file (cached)");
+ System.out.println(ext.end());
+ }*/
}
diff --git a/Essentials/test/net/ess3/UserTest.java b/Essentials/test/net/ess3/UserTest.java
index 6457ef637..418c8d155 100644
--- a/Essentials/test/net/ess3/UserTest.java
+++ b/Essentials/test/net/ess3/UserTest.java
@@ -6,7 +6,6 @@ import net.ess3.api.IUser;
public class UserTest extends EssentialsTest
{
//private final IUser base1;
-
public UserTest(String testName)
{
super(testName);
@@ -21,49 +20,48 @@ public class UserTest extends EssentialsTest
}
/*public void testUpdate()
- {
- OfflinePlayer base1alt = server.createPlayer(base1.getName(), ess);
- assertEquals(base1alt, ess.getUserMap().getUser(base1alt).getBase());
- }
+ {
+ OfflinePlayer base1alt = server.createPlayer(base1.getName(), ess);
+ assertEquals(base1alt, ess.getUserMap().getUser(base1alt).getBase());
+ }
- public void testHome()
- {
- IUser user = ess.getUserMap().getUser(base1);
- Location loc = base1.getLocation();
- user.setHome();
- OfflinePlayer base2 = server.createPlayer(base1.getName(), ess);
- IUser user2 = ess.getUserMap().getUser(base2);
+ public void testHome()
+ {
+ IUser user = ess.getUserMap().getUser(base1);
+ Location loc = base1.getLocation();
+ user.setHome();
+ OfflinePlayer base2 = server.createPlayer(base1.getName(), ess);
+ IUser user2 = ess.getUserMap().getUser(base2);
- Location home = user2.getHome(loc);
- assertNotNull(home);
- assertEquals(loc.getWorld().getName(), home.getWorld().getName());
- assertEquals(loc.getX(), home.getX());
- assertEquals(loc.getY(), home.getY());
- assertEquals(loc.getZ(), home.getZ());
- assertEquals(loc.getYaw(), home.getYaw());
- assertEquals(loc.getPitch(), home.getPitch());
- }*/
+ Location home = user2.getHome(loc);
+ assertNotNull(home);
+ assertEquals(loc.getWorld().getName(), home.getWorld().getName());
+ assertEquals(loc.getX(), home.getX());
+ assertEquals(loc.getY(), home.getY());
+ assertEquals(loc.getZ(), home.getZ());
+ assertEquals(loc.getYaw(), home.getYaw());
+ assertEquals(loc.getPitch(), home.getPitch());
+ }*/
/*public void testMoney()
- {
- should("properly set, take, give, and get money");
- IUser user = ess.getUserMap().getUser(base1);
- double i;
- user.setMoney(i = 100.5);
- user.takeMoney(50);
- i -= 50;
- user.giveMoney(25);
- i += 25;
- assertEquals(user.getMoney(), i);
- }*/
+ {
+ should("properly set, take, give, and get money");
+ IUser user = ess.getUserMap().getUser(base1);
+ double i;
+ user.setMoney(i = 100.5);
+ user.takeMoney(50);
+ i -= 50;
+ user.giveMoney(25);
+ i += 25;
+ assertEquals(user.getMoney(), i);
+ }*/
/*public void testGetGroup()
- {
- should("return the default group");
- IUser user = ess.getUserMap().getUser(base1);
- //assertEquals(user.getGroup(), "default");
- }*/
-
+ {
+ should("return the default group");
+ IUser user = ess.getUserMap().getUser(base1);
+ //assertEquals(user.getGroup(), "default");
+ }*/
public void testNoop()
{
assertTrue(true);
diff --git a/Essentials/test/net/ess3/UtilTest.java b/Essentials/test/net/ess3/UtilTest.java
index c4b218745..749ee1c5a 100644
--- a/Essentials/test/net/ess3/UtilTest.java
+++ b/Essentials/test/net/ess3/UtilTest.java
@@ -12,12 +12,11 @@ import static net.ess3.I18n._;
public class UtilTest extends EssentialsTest
{
-
public UtilTest(String name)
{
super(name);
}
-
+
public void testI18n()
{
_("Hello {0}, how are you?");
diff --git a/Essentials2Compat/pom.xml b/Essentials2Compat/pom.xml
index 81dc96ac8..74222b99e 100644
--- a/Essentials2Compat/pom.xml
+++ b/Essentials2Compat/pom.xml
@@ -1,20 +1,20 @@
- 4.0.0
+ 4.0.0
-
- net.essentials3
- BuildAll
- 3.0-SNAPSHOT
- ../pom.xml
-
+
+ net.essentials3
+ BuildAll
+ 3.0-SNAPSHOT
+ ../pom.xml
+
- Essentials2Compat
-
-
- ${project.groupId}
- Essentials
- ${project.version}
-
-
+ Essentials2Compat
+
+
+ ${project.groupId}
+ Essentials
+ ${project.version}
+
+
diff --git a/Essentials2Compat/src/com/earth2me/essentials/Economy.java b/Essentials2Compat/src/com/earth2me/essentials/Economy.java
index aa383a40c..34ae3c60b 100644
--- a/Essentials2Compat/src/com/earth2me/essentials/Economy.java
+++ b/Essentials2Compat/src/com/earth2me/essentials/Economy.java
@@ -14,7 +14,6 @@ public final class Economy
private Economy()
{
}
-
private static IEssentials ess;
private static final String noCallBeforeLoad = "Essentials API is called before Essentials is loaded.";
@@ -38,11 +37,10 @@ public final class Economy
/**
* Sets the balance of a user
*
- * @param name Name of the user
+ * @param name Name of the user
* @param balance The balance you want to set
* @throws UserDoesNotExistException If a user by that name does not exists
- * @throws net.ess3.api.NoLoanPermittedException
- * If the user is not allowed to have a negative balance
+ * @throws net.ess3.api.NoLoanPermittedException If the user is not allowed to have a negative balance
*/
public static void setMoney(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException
{
@@ -56,10 +54,10 @@ public final class Economy
/**
* Adds money to the balance of a user
*
- * @param name Name of the user
+ * @param name Name of the user
* @param amount The money you want to add
* @throws UserDoesNotExistException If a user by that name does not exists
- * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
+ * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
public static void add(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
@@ -70,10 +68,10 @@ public final class Economy
/**
* Subtracts money from the balance of a user
*
- * @param name Name of the user
+ * @param name Name of the user
* @param amount The money you want to subtract
* @throws UserDoesNotExistException If a user by that name does not exists
- * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
+ * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
public static void subtract(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
@@ -84,10 +82,10 @@ public final class Economy
/**
* Divides the balance of a user by a value
*
- * @param name Name of the user
+ * @param name Name of the user
* @param value The balance is divided by this value
* @throws UserDoesNotExistException If a user by that name does not exists
- * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
+ * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
public static void divide(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException
{
@@ -98,10 +96,10 @@ public final class Economy
/**
* Multiplies the balance of a user by a value
*
- * @param name Name of the user
+ * @param name Name of the user
* @param value The balance is multiplied by this value
* @throws UserDoesNotExistException If a user by that name does not exists
- * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
+ * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
public static void multiply(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException
{
@@ -114,7 +112,7 @@ public final class Economy
*
* @param name Name of the user
* @throws UserDoesNotExistException If a user by that name does not exists
- * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
+ * @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
public static void resetBalance(String name) throws UserDoesNotExistException, NoLoanPermittedException
{
@@ -126,7 +124,7 @@ public final class Economy
}
/**
- * @param name Name of the user
+ * @param name Name of the user
* @param amount The amount of money the user should have
* @return true, if the user has more or an equal amount of money
* @throws UserDoesNotExistException If a user by that name does not exists
@@ -137,7 +135,7 @@ public final class Economy
}
/**
- * @param name Name of the user
+ * @param name Name of the user
* @param amount The amount of money the user should have
* @return true, if the user has more money
* @throws UserDoesNotExistException If a user by that name does not exists
@@ -148,7 +146,7 @@ public final class Economy
}
/**
- * @param name Name of the user
+ * @param name Name of the user
* @param amount The amount of money the user should not have
* @return true, if the user has less money
* @throws UserDoesNotExistException If a user by that name does not exists
diff --git a/Essentials2Compat/src/com/earth2me/essentials/ISettings.java b/Essentials2Compat/src/com/earth2me/essentials/ISettings.java
index 61cfcaad6..e566b82c9 100644
--- a/Essentials2Compat/src/com/earth2me/essentials/ISettings.java
+++ b/Essentials2Compat/src/com/earth2me/essentials/ISettings.java
@@ -1,6 +1,5 @@
package com.earth2me.essentials;
-
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -24,7 +23,6 @@ public interface ISettings
long getBackupInterval();
//MessageFormat getChatFormat(String group);
-
int getChatRadius();
double getCommandCost(String label);
diff --git a/Essentials2Compat/src/com/earth2me/essentials/Settings.java b/Essentials2Compat/src/com/earth2me/essentials/Settings.java
index cda4a91c5..40ed1918c 100644
--- a/Essentials2Compat/src/com/earth2me/essentials/Settings.java
+++ b/Essentials2Compat/src/com/earth2me/essentials/Settings.java
@@ -52,7 +52,6 @@ public final class Settings implements ISettings
{
return config.getInt("sethome-multiple." + set, config.getInt("sethome-multiple.default", 3));
}
-
private int chatRadius = 0;
private int _getChatRadius()
@@ -89,7 +88,6 @@ public final class Settings implements ISettings
{
return config.getInt("starting-balance", 0);
}
-
private Set disabledCommands = new HashSet();
@Override
@@ -142,10 +140,8 @@ public final class Settings implements ISettings
}
return config.getBoolean("override-" + name.toLowerCase(Locale.ENGLISH), false);
}
-
private ConfigurationSection commandCosts;
-
public ConfigurationSection _getCommandCosts()
{
if (config.isConfigurationSection("command-costs"))
@@ -178,7 +174,6 @@ public final class Settings implements ISettings
}
return 0.0;
}
-
private String nicknamePrefix = "~";
private String _getNicknamePrefix()
@@ -203,7 +198,6 @@ public final class Settings implements ISettings
{
return config.getDouble("heal-cooldown", 0);
}
-
private ConfigurationSection kits;
public ConfigurationSection _getKits()
@@ -244,7 +238,6 @@ public final class Settings implements ISettings
}
return null;
}
-
private ChatColor operatorColor = null;
@Override
@@ -318,31 +311,29 @@ public final class Settings implements ISettings
{
return config.getString("backup.command", null);
}
-
private Map chatFormats = Collections.synchronizedMap(new HashMap());
/*@Override //TODO: implement this
- public MessageFormat getChatFormat(String group)
- {
- MessageFormat mFormat = chatFormats.get(group);
- if (mFormat == null)
- {
- String format = config.getString("chat.group-formats." + (group == null ? "Default" : group),
- config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}"));
- format = Util.replaceFormat(format);
- format = format.replace("{DISPLAYNAME}", "%1$s");
- format = format.replace("{GROUP}", "{0}");
- format = format.replace("{MESSAGE}", "%2$s");
- format = format.replace("{WORLDNAME}", "{1}");
- format = format.replace("{SHORTWORLDNAME}", "{2}");
- format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]");
- format = "§r".concat(format);
- mFormat = new MessageFormat(format);
- chatFormats.put(group, mFormat);
- }
- return mFormat;
- }*/
-
+ public MessageFormat getChatFormat(String group)
+ {
+ MessageFormat mFormat = chatFormats.get(group);
+ if (mFormat == null)
+ {
+ String format = config.getString("chat.group-formats." + (group == null ? "Default" : group),
+ config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}"));
+ format = Util.replaceFormat(format);
+ format = format.replace("{DISPLAYNAME}", "%1$s");
+ format = format.replace("{GROUP}", "{0}");
+ format = format.replace("{MESSAGE}", "%2$s");
+ format = format.replace("{WORLDNAME}", "{1}");
+ format = format.replace("{SHORTWORLDNAME}", "{2}");
+ format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]");
+ format = "§r".concat(format);
+ mFormat = new MessageFormat(format);
+ chatFormats.put(group, mFormat);
+ }
+ return mFormat;
+ }*/
public String getDefaultChatformat()
{
return config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}");
@@ -384,7 +375,6 @@ public final class Settings implements ISettings
return config.getBoolean("sort-list-by-groups", true);
}
-
public void reloadConfig()
{
config.load();
@@ -415,7 +405,6 @@ public final class Settings implements ISettings
warnOnBuildDisallow = _warnOnBuildDisallow();
mailsPerMinute = _getMailsPerMinute();
}
-
private List itemSpawnBl = new ArrayList();
@Override
@@ -451,7 +440,6 @@ public final class Settings implements ISettings
}
return epItemSpwn;
}
-
private List enabledSigns = new ArrayList();
private boolean signsEnabled = false;
@@ -490,7 +478,6 @@ public final class Settings implements ISettings
}
return newSigns;
}
-
private boolean warnOnBuildDisallow;
private boolean _warnOnBuildDisallow()
@@ -503,7 +490,6 @@ public final class Settings implements ISettings
{
return warnOnBuildDisallow;
}
-
private boolean debug = false;
private boolean configDebug = false;
@@ -596,7 +582,6 @@ public final class Settings implements ISettings
{
return config.getBoolean(configName, def);
}
-
private final static double MAXMONEY = 10000000000000.0;
@Override
@@ -609,7 +594,6 @@ public final class Settings implements ISettings
}
return max;
}
-
private final static double MINMONEY = -10000000000000.0;
@Override
@@ -644,7 +628,6 @@ public final class Settings implements ISettings
{
return config.getBoolean("remove-god-on-disconnect", false);
}
-
private boolean changeDisplayName = true;
private boolean _changeDisplayName()
@@ -657,7 +640,6 @@ public final class Settings implements ISettings
{
return changeDisplayName;
}
-
private boolean changePlayerListName = false;
private boolean _changePlayerListName()
@@ -676,7 +658,6 @@ public final class Settings implements ISettings
{
return config.getBoolean("use-bukkit-permissions", false);
}
-
private boolean prefixsuffixconfigured = false;
private boolean addprefixsuffix = false;
private boolean essentialsChatActive = false;
@@ -702,7 +683,6 @@ public final class Settings implements ISettings
{
return prefixsuffixconfigured ? addprefixsuffix : essentialsChatActive;
}
-
private boolean disablePrefix = false;
private boolean _disablePrefix()
@@ -715,7 +695,6 @@ public final class Settings implements ISettings
{
return disablePrefix;
}
-
private boolean disableSuffix = false;
private boolean _disableSuffix()
@@ -740,7 +719,6 @@ public final class Settings implements ISettings
{
return config.getLong("auto-afk-kick", -1);
}
-
private boolean getFreezeAfkPlayers;
@Override
@@ -753,7 +731,6 @@ public final class Settings implements ISettings
{
return config.getBoolean("freeze-afk-players", false);
}
-
private boolean cancelAfkOnMove;
@Override
@@ -772,7 +749,6 @@ public final class Settings implements ISettings
{
return config.getBoolean("death-messages", true);
}
-
private Set noGodWorlds = new HashSet();
@Override
@@ -804,7 +780,6 @@ public final class Settings implements ISettings
{
return config.getBoolean("world-home-permissions", false);
}
-
private boolean registerBackInListener;
@Override
@@ -817,7 +792,6 @@ public final class Settings implements ISettings
{
return config.getBoolean("register-back-in-listener", false);
}
-
private boolean disableItemPickupWhileAfk;
@Override
@@ -875,7 +849,6 @@ public final class Settings implements ISettings
{
this.metricsEnabled = metricsEnabled;
}
-
private boolean teleportInvulnerability;
@Override
@@ -894,7 +867,6 @@ public final class Settings implements ISettings
{
return teleportInvulnerability;
}
-
private long loginAttackDelay;
private long _getLoginAttackDelay()
@@ -907,7 +879,6 @@ public final class Settings implements ISettings
{
return loginAttackDelay;
}
-
private int signUsePerSecond;
private int _getSignUsePerSecond()
@@ -937,7 +908,6 @@ public final class Settings implements ISettings
double maxSpeed = config.getDouble("max-walk-speed", 0.8);
return maxSpeed > 1.0 ? 1.0 : Math.abs(maxSpeed);
}
-
private int mailsPerMinute;
private int _getMailsPerMinute()
diff --git a/Essentials2Compat/src/com/earth2me/essentials/UpdateUserFiles.java b/Essentials2Compat/src/com/earth2me/essentials/UpdateUserFiles.java
index 040fdd875..a34734cf9 100644
--- a/Essentials2Compat/src/com/earth2me/essentials/UpdateUserFiles.java
+++ b/Essentials2Compat/src/com/earth2me/essentials/UpdateUserFiles.java
@@ -134,7 +134,6 @@ class UpdateUserFiles
String realname = getPlayer(name);
return realname == null ? BROKENNAME : realname;
}
-
private final Map players = new HashMap();
private String getPlayer(String check)
diff --git a/Essentials2Compat/src/com/earth2me/essentials/UserData.java b/Essentials2Compat/src/com/earth2me/essentials/UserData.java
index 7acf309df..b7f6d2d40 100644
--- a/Essentials2Compat/src/com/earth2me/essentials/UserData.java
+++ b/Essentials2Compat/src/com/earth2me/essentials/UserData.java
@@ -16,7 +16,6 @@ public class UserData
private EssentialsConf config;
private final File folder;
-
protected UserData(IEssentials ess, File file)
{
this.ess = ess;
@@ -59,7 +58,6 @@ public class UserData
kitTimestamps = _getKitTimestamps();
nickname = _getNickname();
}
-
private double money;
private double _getMoney()
@@ -91,7 +89,6 @@ public class UserData
config.setProperty("money", value);
config.save();
}
-
private Map homes;
private Map _getHomes()
@@ -124,7 +121,6 @@ public class UserData
return config.getLocation("homes." + search, ess.getServer());
}
-
public List getHomes()
{
return new ArrayList(homes.keySet());
@@ -166,7 +162,6 @@ public class UserData
}
return false;
}
-
private String nickname;
public String _getNickname()
@@ -185,7 +180,6 @@ public class UserData
config.setProperty("nickname", nick);
config.save();
}
-
private List unlimited;
private List _getUnlimited()
@@ -216,7 +210,6 @@ public class UserData
config.setProperty("unlimited", unlimited);
config.save();
}
-
private Map powertools;
private Map _getPowertools()
@@ -270,7 +263,6 @@ public class UserData
{
return !powertools.isEmpty();
}
-
private StoredLocation lastLocation;
private StoredLocation _getLastLocation()
@@ -289,8 +281,6 @@ public class UserData
{
return lastLocation;
}
-
-
private long lastTeleportTimestamp;
private long _getLastTeleportTimestamp()
@@ -309,7 +299,6 @@ public class UserData
config.setProperty("timestamps.lastteleport", time);
config.save();
}
-
private long lastHealTimestamp;
private long _getLastHealTimestamp()
@@ -328,7 +317,6 @@ public class UserData
config.setProperty("timestamps.lastheal", time);
config.save();
}
-
private String jail;
private String _getJail()
@@ -355,7 +343,6 @@ public class UserData
}
config.save();
}
-
private List mails;
private List _getMails()
@@ -388,7 +375,6 @@ public class UserData
mails.add(mail);
setMails(mails);
}
-
private boolean teleportEnabled;
private boolean getTeleportEnabled()
@@ -421,7 +407,6 @@ public class UserData
setSocialSpyEnabled(ret);
return ret;
}
-
private List ignoredPlayers;
public List getIgnoredPlayers()
@@ -443,8 +428,6 @@ public class UserData
}
config.save();
}
-
-
private boolean godmode;
private boolean _getGodModeEnabled()
@@ -463,7 +446,6 @@ public class UserData
config.setProperty("godmode", set);
config.save();
}
-
private boolean muted;
public boolean getMuted()
@@ -482,7 +464,6 @@ public class UserData
config.setProperty("muted", set);
config.save();
}
-
private long muteTimeout;
private long _getMuteTimeout()
@@ -501,7 +482,6 @@ public class UserData
config.setProperty("timestamps.mute", time);
config.save();
}
-
private boolean jailed;
private boolean getJailed()
@@ -527,7 +507,6 @@ public class UserData
setJailed(ret);
return ret;
}
-
private long jailTimeout;
private long _getJailTimeout()
@@ -568,7 +547,6 @@ public class UserData
config.setProperty("ban.timeout", time);
config.save();
}
-
private long lastLogin;
private long _getLastLogin()
@@ -586,8 +564,6 @@ public class UserData
lastLogin = time;
config.setProperty("timestamps.login", time);
}
-
-
private long lastLogout;
private long _getLastLogout()
@@ -606,7 +582,6 @@ public class UserData
config.setProperty("timestamps.logout", time);
config.save();
}
-
private String lastLoginAddress;
private String _getLastLoginAddress()
@@ -624,7 +599,6 @@ public class UserData
lastLoginAddress = address;
config.setProperty("ipAddress", address);
}
-
private boolean afk;
private boolean getAfk()
@@ -650,7 +624,6 @@ public class UserData
setAfk(ret);
return ret;
}
-
private boolean newplayer; //TODO: unused variable?
private String geolocation;
@@ -678,7 +651,6 @@ public class UserData
}
config.save();
}
-
private boolean isSocialSpyEnabled;
private boolean _isSocialSpyEnabled()
@@ -697,7 +669,6 @@ public class UserData
config.setProperty("socialspy", status);
config.save();
}
-
private boolean isNPC;
private boolean _isNPC()
@@ -716,7 +687,6 @@ public class UserData
config.setProperty("npc", set);
config.save();
}
-
private boolean arePowerToolsEnabled;
public boolean arePowerToolsEnabled()
@@ -742,7 +712,6 @@ public class UserData
{
return config.getBoolean("powertoolsenabled", true);
}
-
private ConfigurationSection kitTimestamps;
private ConfigurationSection _getKitTimestamps()
diff --git a/Essentials2Compat/src/com/earth2me/essentials/Util.java b/Essentials2Compat/src/com/earth2me/essentials/Util.java
index 21ff4e8b4..bb66d7dcc 100644
--- a/Essentials2Compat/src/com/earth2me/essentials/Util.java
+++ b/Essentials2Compat/src/com/earth2me/essentials/Util.java
@@ -12,7 +12,6 @@ public class Util
private Util()
{
}
-
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]");
@@ -33,8 +32,6 @@ public class Util
{
return INVALIDCHARS.matcher(string).replaceAll("");
}
-
-
private static DecimalFormat dFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US));
public static String formatAsCurrency(final double value)
diff --git a/EssentialsAntiBuild/pom.xml b/EssentialsAntiBuild/pom.xml
index 0db30ef3b..b99f53c5d 100644
--- a/EssentialsAntiBuild/pom.xml
+++ b/EssentialsAntiBuild/pom.xml
@@ -1,20 +1,20 @@
- 4.0.0
+ 4.0.0
-
- net.essentials3
- BuildAll
- 3.0-SNAPSHOT
- ../pom.xml
-
+
+ net.essentials3
+ BuildAll
+ 3.0-SNAPSHOT
+ ../pom.xml
+
- EssentialsAntiBuild
-
-
- ${project.groupId}
- Essentials
- ${project.version}
-
-
+ EssentialsAntiBuild
+
+
+ ${project.groupId}
+ Essentials
+ ${project.version}
+
+
diff --git a/EssentialsAntiBuild/src/net/ess3/antibuild/IAntiBuild.java b/EssentialsAntiBuild/src/net/ess3/antibuild/IAntiBuild.java
index 51e49c463..1cbd4df6e 100644
--- a/EssentialsAntiBuild/src/net/ess3/antibuild/IAntiBuild.java
+++ b/EssentialsAntiBuild/src/net/ess3/antibuild/IAntiBuild.java
@@ -1,6 +1,5 @@
package net.ess3.antibuild;
-
import org.bukkit.plugin.Plugin;
diff --git a/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java b/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java
index f280be873..eb980a2b2 100644
--- a/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java
+++ b/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java
@@ -67,12 +67,10 @@ public enum Permissions implements IPermission
{
return PermissionFactory.checkPermission(sender, this);
}
-
public static MaterialDotStarPermission PLACEMENT = new MaterialDotStarPermission("essentials.build.place");
public static MaterialDotStarPermission BREAK = new MaterialDotStarPermission("essentials.build.break");
public static MaterialDotStarPermission INTERACT = new MaterialDotStarPermission("essentials.build.interact");
public static MaterialDotStarPermission CRAFT = new MaterialDotStarPermission("essentials.build.craft");
public static MaterialDotStarPermission PICKUP = new MaterialDotStarPermission("essentials.build.pickup");
public static MaterialDotStarPermission DROP = new MaterialDotStarPermission("essentials.build.drop");
-
}
diff --git a/EssentialsChat/pom.xml b/EssentialsChat/pom.xml
index e59886710..6be18a14c 100644
--- a/EssentialsChat/pom.xml
+++ b/EssentialsChat/pom.xml
@@ -1,20 +1,20 @@
- 4.0.0
+ 4.0.0
-
- net.essentials3
- BuildAll
- 3.0-SNAPSHOT
- ../pom.xml
-
+
+ net.essentials3
+ BuildAll
+ 3.0-SNAPSHOT
+ ../pom.xml
+
- EssentialsChat
-
-
- ${project.groupId}
- Essentials
- ${project.version}
-
-
+ EssentialsChat
+
+
+ ${project.groupId}
+ Essentials
+ ${project.version}
+
+
diff --git a/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java b/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java
index 7b33ba1a4..15e2d3b8b 100644
--- a/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java
+++ b/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java
@@ -83,9 +83,10 @@ public abstract class EssentialsChatPlayer implements Listener
{
event.setFormat(
format.format(
- new Object[]{
- group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH)
- }));
+ new Object[]
+ {
+ group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH)
+ }));
}
}
diff --git a/EssentialsExtra/pom.xml b/EssentialsExtra/pom.xml
index fc2f8e23f..0caa52250 100644
--- a/EssentialsExtra/pom.xml
+++ b/EssentialsExtra/pom.xml
@@ -1,20 +1,20 @@
- 4.0.0
+ 4.0.0
-
- net.essentials3
- BuildAll
- 3.0-SNAPSHOT
- ../pom.xml
-
+
+ net.essentials3
+ BuildAll
+ 3.0-SNAPSHOT
+ ../pom.xml
+
- EssentialsExtra
-
-
- ${project.groupId}
- Essentials
- ${project.version}
-
-
+ EssentialsExtra
+
+
+ ${project.groupId}
+ Essentials
+ ${project.version}
+
+
diff --git a/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java b/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java
index 05418e9d8..258b53bb5 100644
--- a/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java
+++ b/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java
@@ -14,6 +14,7 @@ public @interface AnnotatedCommand
String usage() default "";
- String[] aliases() default {
+ String[] aliases() default
+ {
};
}
diff --git a/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
index 4445dbd11..90cfb85aa 100644
--- a/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
+++ b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
@@ -68,8 +68,9 @@ public class EssentialsExtra extends JavaPlugin
}
}
}
- urls = new URL[]{
- commandDir.toURI().toURL()
+ urls = new URL[]
+ {
+ commandDir.toURI().toURL()
};
}
catch (Exception ex)
diff --git a/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java b/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java
index a6173a243..36ee400e0 100644
--- a/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java
+++ b/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java
@@ -1,6 +1,5 @@
package net.ess3.extra.commands;
-
import java.util.Random;
import net.ess3.api.IUser;
import net.ess3.commands.EssentialsCommand;
diff --git a/EssentialsGeoIP/pom.xml b/EssentialsGeoIP/pom.xml
index 18727e281..4b3808f01 100644
--- a/EssentialsGeoIP/pom.xml
+++ b/EssentialsGeoIP/pom.xml
@@ -35,11 +35,11 @@
shade
-
-
- org.kohsuke:geoip
-
-
+
+
+ org.kohsuke:geoip
+
+
diff --git a/EssentialsGeoIP/src/net/ess3/geoip/ConfigHolder.java b/EssentialsGeoIP/src/net/ess3/geoip/ConfigHolder.java
index e96b8094c..07e68c3ee 100644
--- a/EssentialsGeoIP/src/net/ess3/geoip/ConfigHolder.java
+++ b/EssentialsGeoIP/src/net/ess3/geoip/ConfigHolder.java
@@ -10,7 +10,7 @@ import org.bukkit.plugin.Plugin;
public class ConfigHolder extends AsyncStorageObjectHolder
{
private final Plugin geoip;
-
+
public ConfigHolder(final IEssentials ess, final Plugin geoip)
{
super(ess, GeoIP.class, new File(geoip.getDataFolder(), "config.yml"));
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java
index cb438335b..5e31c4996 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java
@@ -75,7 +75,8 @@ public class GMGroupEvent extends Event
public enum Action
{
- GROUP_PERMISSIONS_CHANGED, GROUP_INHERITANCE_CHANGED, GROUP_INFO_CHANGED, GROUP_ADDED, GROUP_REMOVED,}
+ GROUP_PERMISSIONS_CHANGED, GROUP_INHERITANCE_CHANGED, GROUP_INFO_CHANGED, GROUP_ADDED, GROUP_REMOVED,
+ }
public void schedule(final GMGroupEvent event)
{
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java
index d7f2e276e..58d6a9f3e 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java
@@ -49,7 +49,8 @@ public class GMSystemEvent extends Event
public enum Action
{
- RELOADED, SAVED, DEFAULT_GROUP_CHANGED, VALIDATE_TOGGLE,}
+ RELOADED, SAVED, DEFAULT_GROUP_CHANGED, VALIDATE_TOGGLE,
+ }
public void schedule(final GMSystemEvent event)
{
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java
index ed3f71c53..45dd13f7b 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java
@@ -75,7 +75,8 @@ public class GMUserEvent extends Event
public enum Action
{
- USER_PERMISSIONS_CHANGED, USER_INHERITANCE_CHANGED, USER_INFO_CHANGED, USER_GROUP_CHANGED, USER_SUBGROUP_CHANGED, USER_ADDED, USER_REMOVED,}
+ USER_PERMISSIONS_CHANGED, USER_INHERITANCE_CHANGED, USER_INFO_CHANGED, USER_GROUP_CHANGED, USER_SUBGROUP_CHANGED, USER_ADDED, USER_REMOVED,
+ }
public void schedule(final GMUserEvent event)
{
diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java
index 8fb893809..3500c6d3e 100644
--- a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java
+++ b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java
@@ -12,6 +12,7 @@ import org.bukkit.event.entity.EntityTargetEvent.TargetReason;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.hanging.HangingBreakEvent;
+
public class EssentialsProtectEntityListener implements Listener
{
private final IProtect prot;
@@ -38,7 +39,7 @@ public class EssentialsProtectEntityListener implements Listener
return;
}
- final Player user = target instanceof Player ? (Player) target : null;
+ final Player user = target instanceof Player ? (Player)target : null;
if (target instanceof Player && event instanceof EntityDamageByBlockEvent)
{
final DamageCause cause = event.getCause();
@@ -62,9 +63,9 @@ public class EssentialsProtectEntityListener implements Listener
if (target instanceof Player && event instanceof EntityDamageByEntityEvent)
{
- final EntityDamageByEntityEvent edEvent = (EntityDamageByEntityEvent) event;
+ final EntityDamageByEntityEvent edEvent = (EntityDamageByEntityEvent)event;
final Entity eAttack = edEvent.getDamager();
- final Player attacker = eAttack instanceof Player ? (Player) eAttack : null;
+ final Player attacker = eAttack instanceof Player ? (Player)eAttack : null;
// PVP Settings
if (target instanceof Player && eAttack instanceof Player && (!Permissions.PVP.isAuthorized(user) || !Permissions.PVP.isAuthorized(attacker)))
@@ -75,35 +76,35 @@ public class EssentialsProtectEntityListener implements Listener
//Player damage prevention section
if (eAttack instanceof Creeper && getSettings().isCreeperPlayerdamage() || (Permissions.PREVENTDAMAGE_CREEPER.isAuthorized(
- user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
+ user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
{
event.setCancelled(true);
return;
}
if (eAttack instanceof ExplosiveMinecart && getSettings().isTntMinecartPlayerdamage() || (Permissions.PREVENTDAMAGE_TNTMINECART.isAuthorized(
- user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
+ user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
{
event.setCancelled(true);
return;
}
if ((event.getEntity() instanceof Fireball || event.getEntity() instanceof SmallFireball || event.getEntity() instanceof LargeFireball) && (Permissions.PREVENTDAMAGE_FIREBALL.isAuthorized(
- user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
+ user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
{
event.setCancelled(true);
return;
}
if ((eAttack instanceof WitherSkull && Permissions.PREVENTDAMAGE_WITHERSKULL.isAuthorized(
- user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
+ user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
{
event.setCancelled(true);
return;
}
if ((eAttack instanceof Wither && event.getCause() == DamageCause.ENTITY_EXPLOSION) && getSettings().isWitherSpawnPlayerdamage() || (Permissions.PREVENTDAMAGE_WITHER.isAuthorized(
- user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
+ user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
{
event.setCancelled(true);
return;
@@ -116,9 +117,9 @@ public class EssentialsProtectEntityListener implements Listener
}
if (edEvent.getDamager() instanceof Projectile && ((Permissions.PREVENTDAMAGE_PROJECTILES.isAuthorized(
- user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(
- user)) || (((Projectile) edEvent.getDamager()).getShooter() instanceof Player && (!Permissions.PVP.isAuthorized(
- user) || !Permissions.PVP.isAuthorized((Player) ((Projectile) edEvent.getDamager()).getShooter())))))
+ user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(
+ user)) || (((Projectile)edEvent.getDamager()).getShooter() instanceof Player && (!Permissions.PVP.isAuthorized(
+ user) || !Permissions.PVP.isAuthorized((Player)((Projectile)edEvent.getDamager()).getShooter())))))
{
event.setCancelled(true);
return;
@@ -135,13 +136,13 @@ public class EssentialsProtectEntityListener implements Listener
}
if (cause == DamageCause.SUFFOCATION && (Permissions.PREVENTDAMAGE_SUFFOCATION.isAuthorized(user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(
- user)))
+ user)))
{
event.setCancelled(true);
return;
}
if ((cause == DamageCause.FIRE || cause == DamageCause.FIRE_TICK) && (Permissions.PREVENTDAMAGE_FIRE.isAuthorized(
- user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
+ user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)))
{
event.setCancelled(true);
return;
@@ -152,7 +153,7 @@ public class EssentialsProtectEntityListener implements Listener
return;
}
if (cause == DamageCause.LIGHTNING && (Permissions.PREVENTDAMAGE_LIGHTNING.isAuthorized(user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(
- user)))
+ user)))
{
event.setCancelled(true);
}
@@ -179,7 +180,7 @@ public class EssentialsProtectEntityListener implements Listener
event.setCancelled(true);
}
else if (entity instanceof Creeper && (getSettings().isCreeperBlockdamage() || getSettings().isCreeperBlockdamage()
- || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight)))
+ || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight)))
{
event.setCancelled(true);
event.getLocation().getWorld().createExplosion(event.getLocation(), 0F);
@@ -213,11 +214,11 @@ public class EssentialsProtectEntityListener implements Listener
if (entity.getType() == EntityType.PLAYER)
{
- final Player user = (Player) event.getTarget();
+ final Player user = (Player)event.getTarget();
if ((event.getReason() == TargetReason.CLOSEST_PLAYER || event.getReason() == TargetReason.TARGET_ATTACKED_ENTITY || event.getReason() == TargetReason.PIG_ZOMBIE_TARGET
- || event.getReason() == TargetReason.RANDOM_TARGET || event.getReason() == TargetReason.TARGET_ATTACKED_OWNER
- || event.getReason() == TargetReason.OWNER_ATTACKED_TARGET)
- && !prot.getSettings().getData().getPrevent().isEntitytarget() && !Permissions.ENTITY_TARGET_BYPASS.isAuthorized(
+ || event.getReason() == TargetReason.RANDOM_TARGET || event.getReason() == TargetReason.TARGET_ATTACKED_OWNER
+ || event.getReason() == TargetReason.OWNER_ATTACKED_TARGET)
+ && !prot.getSettings().getData().getPrevent().isEntitytarget() && !Permissions.ENTITY_TARGET_BYPASS.isAuthorized(
user, event.getEntity().getType().getName().toLowerCase()))
{
event.setCancelled(true);
@@ -253,12 +254,12 @@ public class EssentialsProtectEntityListener implements Listener
final ProtectHolder settings = prot.getSettings();
Entity remover = event.getRemover();
if ((event.getCause() == HangingBreakEvent.RemoveCause.ENTITY)
- && ((remover instanceof Creeper) && getSettings().isCreeperBlockdamage())
- || ((remover instanceof Wither) && getSettings().isWitherSpawnBlockdamage())
- || ((remover instanceof Fireball) && getSettings().isFireballBlockdamage())
- || ((remover instanceof TNTPrimed) && getSettings().isTntBlockdamage())
- || ((remover instanceof WitherSkull) && getSettings().isWitherskullBlockdamage())
- || ((remover instanceof ExplosiveMinecart) && getSettings().isTntMinecartBlockdamage()))
+ && ((remover instanceof Creeper) && getSettings().isCreeperBlockdamage())
+ || ((remover instanceof Wither) && getSettings().isWitherSpawnBlockdamage())
+ || ((remover instanceof Fireball) && getSettings().isFireballBlockdamage())
+ || ((remover instanceof TNTPrimed) && getSettings().isTntBlockdamage())
+ || ((remover instanceof WitherSkull) && getSettings().isWitherskullBlockdamage())
+ || ((remover instanceof ExplosiveMinecart) && getSettings().isTntMinecartBlockdamage()))
{
event.setCancelled(true);
}
diff --git a/EssentialsProtect/src/net/ess3/protect/Permissions.java b/EssentialsProtect/src/net/ess3/protect/Permissions.java
index 306a09152..f5e59d965 100644
--- a/EssentialsProtect/src/net/ess3/protect/Permissions.java
+++ b/EssentialsProtect/src/net/ess3/protect/Permissions.java
@@ -73,6 +73,5 @@ public enum Permissions implements IPermission
{
return PermissionFactory.checkPermission(sender, this);
}
-
public static DotStarPermission ENTITY_TARGET_BYPASS = new DotStarPermission("essentials.protect.entitytarget.bypass");
}
diff --git a/EssentialsSigns/pom.xml b/EssentialsSigns/pom.xml
index 85a47c60b..781bd4512 100644
--- a/EssentialsSigns/pom.xml
+++ b/EssentialsSigns/pom.xml
@@ -1,20 +1,20 @@
- 4.0.0
+ 4.0.0
-
- net.essentials3
- BuildAll
- 3.0-SNAPSHOT
- ../pom.xml
-
+
+ net.essentials3
+ BuildAll
+ 3.0-SNAPSHOT
+ ../pom.xml
+
- EssentialsSigns
-
-
- ${project.groupId}
- Essentials
- ${project.version}
-
-
+ EssentialsSigns
+
+
+ ${project.groupId}
+ Essentials
+ ${project.version}
+
+
diff --git a/EssentialsSigns/src/net/ess3/signs/EssentialsSign.java b/EssentialsSigns/src/net/ess3/signs/EssentialsSign.java
index e1dd99367..385147ef8 100644
--- a/EssentialsSigns/src/net/ess3/signs/EssentialsSign.java
+++ b/EssentialsSigns/src/net/ess3/signs/EssentialsSign.java
@@ -212,8 +212,9 @@ public class EssentialsSign
{
return true;
}
- final BlockFace[] directions = new BlockFace[]{
- BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST
+ final BlockFace[] directions = new BlockFace[]
+ {
+ BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST
};
for (BlockFace blockFace : directions)
{
@@ -254,7 +255,7 @@ public class EssentialsSign
{
return EMPTY_SET;
}
-
+
protected final void validateTrade(final ISign sign, final int index, final IEssentials ess) throws SignException
{
final String line = sign.getLine(index).trim();
diff --git a/EssentialsSigns/src/net/ess3/signs/listeners/SignBlockListener.java b/EssentialsSigns/src/net/ess3/signs/listeners/SignBlockListener.java
index 7af02af5b..69ca1b4c2 100644
--- a/EssentialsSigns/src/net/ess3/signs/listeners/SignBlockListener.java
+++ b/EssentialsSigns/src/net/ess3/signs/listeners/SignBlockListener.java
@@ -150,7 +150,7 @@ public class SignBlockListener implements Listener
final Block block = event.getBlock();
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
- new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
+ new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -175,7 +175,7 @@ public class SignBlockListener implements Listener
final Block block = event.getBlock();
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
- new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
+ new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -201,7 +201,7 @@ public class SignBlockListener implements Listener
for (Block block : event.getBlocks())
{
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
- new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
+ new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -229,7 +229,7 @@ public class SignBlockListener implements Listener
{
final Block block = event.getBlock();
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
- new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
+ new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
diff --git a/EssentialsSigns/src/net/ess3/signs/listeners/SignEntityListener.java b/EssentialsSigns/src/net/ess3/signs/listeners/SignEntityListener.java
index 272d7ac11..be1e5398e 100644
--- a/EssentialsSigns/src/net/ess3/signs/listeners/SignEntityListener.java
+++ b/EssentialsSigns/src/net/ess3/signs/listeners/SignEntityListener.java
@@ -34,7 +34,7 @@ public class SignEntityListener implements Listener
for (Block block : event.blockList())
{
if (((block.getTypeId() == Material.WALL_SIGN.getId() || block.getTypeId() == Material.SIGN_POST.getId()) && EssentialsSign.isValidSign(
- new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
+ new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -60,7 +60,7 @@ public class SignEntityListener implements Listener
final Block block = event.getBlock();
if (((block.getTypeId() == Material.WALL_SIGN.getId() || block.getTypeId() == Material.SIGN_POST.getId()) && EssentialsSign.isValidSign(
- new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
+ new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
diff --git a/EssentialsSigns/src/net/ess3/signs/signs/SignEnchant.java b/EssentialsSigns/src/net/ess3/signs/signs/SignEnchant.java
index fb2521c8c..b7873a9cb 100644
--- a/EssentialsSigns/src/net/ess3/signs/signs/SignEnchant.java
+++ b/EssentialsSigns/src/net/ess3/signs/signs/SignEnchant.java
@@ -90,7 +90,7 @@ public class SignEnchant extends EssentialsSign
final ItemStack playerHand = player.getPlayer().getItemInHand();
if (playerHand == null || playerHand.getAmount() != 1 || (playerHand.containsEnchantment(enchantment) && playerHand.getEnchantmentLevel(
- enchantment) == level))
+ enchantment) == level))
{
throw new SignException(_("§4You do not have {0}x {1}.", 1, sign.getLine(1)));
}
diff --git a/EssentialsSigns/src/net/ess3/signs/signs/SignKit.java b/EssentialsSigns/src/net/ess3/signs/signs/SignKit.java
index 4cee8ab41..636805319 100644
--- a/EssentialsSigns/src/net/ess3/signs/signs/SignKit.java
+++ b/EssentialsSigns/src/net/ess3/signs/signs/SignKit.java
@@ -55,7 +55,7 @@ public class SignKit extends EssentialsSign
final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH);
final String group = sign.getLine(2);
if ((!group.isEmpty() && ("§2Everyone".equals(group) || ess.getRanks().inGroup(player, group))) || (group.isEmpty() && Permissions.KITS.isAuthorized(
- player, kitName)))
+ player, kitName)))
{
final Trade charge = getTrade(sign, 3, ess);
charge.isAffordableFor(player);
diff --git a/EssentialsSigns/src/net/ess3/signs/signs/SignRepair.java b/EssentialsSigns/src/net/ess3/signs/signs/SignRepair.java
index 7c69c6372..3c1620bcd 100644
--- a/EssentialsSigns/src/net/ess3/signs/signs/SignRepair.java
+++ b/EssentialsSigns/src/net/ess3/signs/signs/SignRepair.java
@@ -40,8 +40,9 @@ public class SignRepair extends EssentialsSign
Commandrepair command = new Commandrepair();
command.init(ess, "repair");
- String[] args = new String[]{
- sign.getLine(1)
+ String[] args = new String[]
+ {
+ sign.getLine(1)
};
try
{
diff --git a/EssentialsSigns/src/net/ess3/signs/signs/SignWarp.java b/EssentialsSigns/src/net/ess3/signs/signs/SignWarp.java
index 43e4792aa..750e71ee7 100644
--- a/EssentialsSigns/src/net/ess3/signs/signs/SignWarp.java
+++ b/EssentialsSigns/src/net/ess3/signs/signs/SignWarp.java
@@ -53,7 +53,7 @@ public class SignWarp extends EssentialsSign
final String group = sign.getLine(2);
if ((!group.isEmpty() && ("§2Everyone".equals(group) || ess.getRanks().inGroup(player, group))) || (group.isEmpty() && Permissions.WARPS.isAuthorized(
- player, warpName)))
+ player, warpName)))
{
final Trade charge = getTrade(sign, 3, ess);
try
diff --git a/EssentialsUpdate/pom.xml b/EssentialsUpdate/pom.xml
index 69ac828e3..06836d177 100644
--- a/EssentialsUpdate/pom.xml
+++ b/EssentialsUpdate/pom.xml
@@ -36,11 +36,11 @@
shade
-
-
- pircbot:pircbot
-
-
+
+
+ pircbot:pircbot
+
+
diff --git a/EssentialsUpdate/src/net/ess3/update/AbstractWorkListener.java b/EssentialsUpdate/src/net/ess3/update/AbstractWorkListener.java
index 5b6f62353..6b39beb1a 100644
--- a/EssentialsUpdate/src/net/ess3/update/AbstractWorkListener.java
+++ b/EssentialsUpdate/src/net/ess3/update/AbstractWorkListener.java
@@ -10,7 +10,6 @@ public abstract class AbstractWorkListener
this.plugin = plugin;
this.newVersionInfo = newVersionInfo;
}
-
private final Plugin plugin;
private final VersionInfo newVersionInfo;
diff --git a/EssentialsUpdate/src/net/ess3/update/UpdateProcess.java b/EssentialsUpdate/src/net/ess3/update/UpdateProcess.java
index 3deda79af..9d09264e3 100644
--- a/EssentialsUpdate/src/net/ess3/update/UpdateProcess.java
+++ b/EssentialsUpdate/src/net/ess3/update/UpdateProcess.java
@@ -96,7 +96,8 @@ public class UpdateProcess implements Listener
{
UpdateProcess.this.currentPlayer = null;
}
- //TODO: make sure this is threadsafe
+ //TODO: make sure this is threadsafe
+
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerChat(final AsyncPlayerChatEvent event)
{
diff --git a/EssentialsUpdate/src/net/ess3/update/Version.java b/EssentialsUpdate/src/net/ess3/update/Version.java
index 3611705ec..9910882c8 100644
--- a/EssentialsUpdate/src/net/ess3/update/Version.java
+++ b/EssentialsUpdate/src/net/ess3/update/Version.java
@@ -30,7 +30,6 @@ public class Version implements Comparable
{
return type;
}
-
private final int major;
private final int minor;
private final int build;
diff --git a/EssentialsUpdate/src/net/ess3/update/states/StateMachine.java b/EssentialsUpdate/src/net/ess3/update/states/StateMachine.java
index 5a5279b71..8b3509639 100644
--- a/EssentialsUpdate/src/net/ess3/update/states/StateMachine.java
+++ b/EssentialsUpdate/src/net/ess3/update/states/StateMachine.java
@@ -14,8 +14,6 @@ public class StateMachine extends AbstractWorkListener implements Runnable
{
ABORT, WAIT, DONE, NONE
}
-
-
private final StateMap states = new StateMap();
private AbstractState current;
private Player player;
@@ -84,7 +82,6 @@ public class StateMachine extends AbstractWorkListener implements Runnable
}
return result;
}
-
private Iterator iterator;
public void startWork()