mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-26 22:29:07 +02:00
Revert "Remove Transient :: Formatting Cleanup"
This commit is contained in:
@@ -49,34 +49,34 @@ import org.bukkit.plugin.InvalidDescriptionException;
|
||||
public class Essentials implements IEssentials
|
||||
{
|
||||
@Getter
|
||||
private ISettings settings;
|
||||
private transient ISettings settings;
|
||||
@Getter
|
||||
private IJails jails;
|
||||
private transient IJails jails;
|
||||
@Getter
|
||||
private IKits kits;
|
||||
private transient IKits kits;
|
||||
@Getter
|
||||
private IWarps warps;
|
||||
private transient IWarps warps;
|
||||
@Getter
|
||||
private IWorth worth;
|
||||
private transient IWorth worth;
|
||||
@Getter
|
||||
private IBackup backup;
|
||||
private transient IBackup backup;
|
||||
@Getter
|
||||
private IItemDb itemDb;
|
||||
private transient IItemDb itemDb;
|
||||
@Getter
|
||||
@Setter
|
||||
private IRanks ranks;
|
||||
private transient IRanks ranks;
|
||||
@Getter
|
||||
private SpawnsHolder spawns;
|
||||
private transient SpawnsHolder spawns;
|
||||
@Getter
|
||||
private final Methods paymentMethod = new Methods();
|
||||
private transient final Methods paymentMethod = new Methods();
|
||||
@Getter
|
||||
private IUserMap userMap;
|
||||
private transient IUserMap userMap;
|
||||
@Getter
|
||||
private final I18n i18n;
|
||||
@Getter
|
||||
private ICommandHandler commandHandler;
|
||||
private transient ICommandHandler commandHandler;
|
||||
@Getter
|
||||
private Economy economy;
|
||||
private transient Economy economy;
|
||||
@Getter
|
||||
private final Server server;
|
||||
@Getter
|
||||
@@ -85,16 +85,16 @@ public class Essentials implements IEssentials
|
||||
private final IPlugin plugin;
|
||||
@Getter
|
||||
@Setter
|
||||
private Metrics metrics;
|
||||
private transient Metrics metrics;
|
||||
@Getter
|
||||
private EssentialsTimer timer;
|
||||
private transient EssentialsTimer timer;
|
||||
@Getter
|
||||
private List<String> vanishedPlayers = new ArrayList<String>();
|
||||
private transient List<String> vanishedPlayers = new ArrayList<String>();
|
||||
@Getter
|
||||
private final StorageQueue storageQueue;
|
||||
private ExecuteTimer execTimer;
|
||||
private final transient StorageQueue storageQueue;
|
||||
private transient ExecuteTimer execTimer;
|
||||
public static boolean testing;
|
||||
private List<IReload> reloadList;
|
||||
private transient List<IReload> reloadList;
|
||||
|
||||
public Essentials(final Server server, final Logger logger, final IPlugin plugin)
|
||||
{
|
||||
|
@@ -12,10 +12,10 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class EssentialsTimer implements Runnable
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final Set<IUser> onlineUsers = new HashSet<IUser>();
|
||||
private long lastPoll = System.currentTimeMillis();
|
||||
private final LinkedList<Float> history = new LinkedList<Float>();
|
||||
private final transient IEssentials ess;
|
||||
private final transient Set<IUser> onlineUsers = new HashSet<IUser>();
|
||||
private transient long lastPoll = System.currentTimeMillis();
|
||||
private final transient LinkedList<Float> history = new LinkedList<Float>();
|
||||
|
||||
EssentialsTimer(final IEssentials ess)
|
||||
{
|
||||
|
@@ -19,13 +19,13 @@ public class I18n implements II18n
|
||||
{
|
||||
private static I18n instance;
|
||||
private static final String MESSAGES = "messages";
|
||||
private final Locale defaultLocale = Locale.getDefault();
|
||||
private Locale currentLocale = defaultLocale;
|
||||
private ResourceBundle customBundle;
|
||||
private ResourceBundle localeBundle;
|
||||
private final ResourceBundle defaultBundle;
|
||||
private final Map<String, MessageFormat> messageFormatCache = new HashMap<String, MessageFormat>();
|
||||
private final IEssentials ess;
|
||||
private final transient Locale defaultLocale = Locale.getDefault();
|
||||
private transient Locale currentLocale = defaultLocale;
|
||||
private transient ResourceBundle customBundle;
|
||||
private transient ResourceBundle localeBundle;
|
||||
private final transient ResourceBundle defaultBundle;
|
||||
private final transient Map<String, MessageFormat> messageFormatCache = new HashMap<String, MessageFormat>();
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public I18n(final IEssentials ess)
|
||||
{
|
||||
@@ -100,6 +100,7 @@ public class I18n implements II18n
|
||||
}
|
||||
return messageFormat.format(objects);
|
||||
}
|
||||
|
||||
private final Pattern partSplit = Pattern.compile("[_\\.]");
|
||||
|
||||
public void updateLocale(final String loc)
|
||||
@@ -135,7 +136,7 @@ public class I18n implements II18n
|
||||
|
||||
private static class FileResClassLoader extends ClassLoader
|
||||
{
|
||||
private final File dataFolder;
|
||||
private final transient File dataFolder;
|
||||
|
||||
public FileResClassLoader(final ClassLoader classLoader, final IEssentials ess)
|
||||
{
|
||||
|
@@ -19,15 +19,16 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class ItemDb implements IItemDb
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public ItemDb(final IEssentials ess)
|
||||
{
|
||||
this.ess = ess;
|
||||
file = new ManagedFile("items.csv", ess);
|
||||
}
|
||||
private final Map<String, Long> items = new HashMap<String, Long>();
|
||||
private final ManagedFile file;
|
||||
|
||||
private final transient Map<String, Long> items = new HashMap<String, Long>();
|
||||
private final transient ManagedFile file;
|
||||
private static final Pattern SPLIT = Pattern.compile("[^a-zA-Z0-9]");
|
||||
|
||||
@Override
|
||||
@@ -94,6 +95,7 @@ public class ItemDb implements IItemDb
|
||||
retval.setAmount(quantity);
|
||||
return retval;
|
||||
}
|
||||
|
||||
private final Pattern idMatch = Pattern.compile("^\\d+[:+',;.]\\d+$");
|
||||
private final Pattern metaSplit = Pattern.compile("[:+',;.]");
|
||||
private final Pattern conjoined = Pattern.compile("^[^:+',;.]+[:+',;.]\\d+$");
|
||||
|
@@ -30,7 +30,7 @@ import org.bukkit.plugin.PluginManager;
|
||||
|
||||
public class Jails extends AsyncStorageObjectHolder<net.ess3.settings.Jails> implements IJails
|
||||
{
|
||||
private static final Logger LOGGER = Bukkit.getLogger();
|
||||
private static final transient Logger LOGGER = Bukkit.getLogger();
|
||||
|
||||
public Jails(final IEssentials ess)
|
||||
{
|
||||
@@ -110,9 +110,9 @@ public class Jails extends AsyncStorageObjectHolder<net.ess3.settings.Jails> imp
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
|
||||
private class JailBlockListener implements Listener
|
||||
{
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onBlockBreak(final BlockBreakEvent event)
|
||||
{
|
||||
|
@@ -25,8 +25,8 @@ import org.bukkit.material.Colorable;
|
||||
|
||||
public class SpawnMob
|
||||
{
|
||||
private static Pattern colon = Pattern.compile(":");
|
||||
private static Pattern comma = Pattern.compile(",");
|
||||
private static transient Pattern colon = Pattern.compile(":");
|
||||
private static transient Pattern comma = Pattern.compile(",");
|
||||
|
||||
public static String mobList(final IUser user) throws NotEnoughArgumentsException
|
||||
{
|
||||
|
@@ -21,6 +21,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
public class Teleport implements Runnable, ITeleport
|
||||
{
|
||||
private static final double MOVE_CONSTANT = 0.3;
|
||||
|
||||
private IUser user;
|
||||
private IUser teleportUser;
|
||||
private int teleTimer = -1;
|
||||
@@ -122,6 +123,7 @@ public class Teleport implements Runnable, ITeleport
|
||||
this.ess = ess;
|
||||
}
|
||||
|
||||
|
||||
public void cooldown(boolean check) throws Exception
|
||||
{
|
||||
try
|
||||
@@ -231,6 +233,7 @@ public class Teleport implements Runnable, ITeleport
|
||||
now(new Target(loc), cause);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
//The now function is used when you want to skip tp delay when teleporting someone to a location or player.
|
||||
public void now(Entity entity, boolean cooldown, TeleportCause cause) throws Exception
|
||||
|
@@ -4,13 +4,15 @@ import net.ess3.utils.FormatUtil;
|
||||
|
||||
|
||||
/**
|
||||
* Instead of using this api directly, we recommend to use the register plugin: http://bit.ly/RegisterMethod
|
||||
* Instead of using this api directly, we recommend to use the register plugin:
|
||||
* http://bit.ly/RegisterMethod
|
||||
*/
|
||||
public final class Economy
|
||||
{
|
||||
private Economy()
|
||||
{
|
||||
}
|
||||
|
||||
private static IEssentials ess;
|
||||
private static final String noCallBeforeLoad = "Essentials API is called before Essentials is loaded.";
|
||||
|
||||
@@ -165,7 +167,8 @@ public final class Economy
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the amount of money like all other Essentials functions. Example: $100000 or $12345.67
|
||||
* Formats the amount of money like all other Essentials functions.
|
||||
* Example: $100000 or $12345.67
|
||||
*
|
||||
* @param amount The amount of money
|
||||
* @return Formatted money
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package net.ess3.api;
|
||||
|
||||
|
||||
public interface IComponent extends IReload
|
||||
{
|
||||
/**
|
||||
|
@@ -66,4 +66,5 @@ public interface IEssentials extends IComponent
|
||||
SpawnsHolder getSpawns();
|
||||
|
||||
StorageQueue getStorageQueue();
|
||||
|
||||
}
|
||||
|
@@ -9,6 +9,7 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
public interface IPlugin extends Plugin
|
||||
{
|
||||
|
||||
/**
|
||||
* Get an instance of essentials
|
||||
*
|
||||
@@ -136,4 +137,5 @@ public interface IPlugin extends Plugin
|
||||
* @param module - Your plugin instance
|
||||
*/
|
||||
void registerModule(Plugin module);
|
||||
|
||||
}
|
||||
|
@@ -15,11 +15,11 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public class Backup implements Runnable, IBackup
|
||||
{
|
||||
private final Server server;
|
||||
private final IEssentials ess;
|
||||
private final AtomicBoolean running = new AtomicBoolean(false);
|
||||
private int taskId = -1;
|
||||
private final AtomicBoolean active = new AtomicBoolean(false);
|
||||
private transient final Server server;
|
||||
private transient final IEssentials ess;
|
||||
private transient final AtomicBoolean running = new AtomicBoolean(false);
|
||||
private transient int taskId = -1;
|
||||
private transient final AtomicBoolean active = new AtomicBoolean(false);
|
||||
|
||||
public Backup(final IEssentials ess)
|
||||
{
|
||||
@@ -82,7 +82,7 @@ public class Backup implements Runnable, IBackup
|
||||
|
||||
private class BackupRunner implements Runnable
|
||||
{
|
||||
private final String command;
|
||||
private final transient String command;
|
||||
|
||||
public BackupRunner(final String command)
|
||||
{
|
||||
|
@@ -11,9 +11,11 @@ import org.bukkit.enchantments.Enchantment;
|
||||
|
||||
public final class Enchantments
|
||||
{
|
||||
|
||||
private Enchantments()
|
||||
{
|
||||
}
|
||||
|
||||
private static final Map<String, Enchantment> ENCHANTMENTS = new HashMap<String, Enchantment>();
|
||||
|
||||
static
|
||||
|
@@ -8,6 +8,7 @@ import org.bukkit.entity.EntityType;
|
||||
public class LivingEntities
|
||||
{
|
||||
final private static Map<String, EntityType> entities = new HashMap<String, EntityType>();
|
||||
|
||||
final private static EnumMap<EntityType, String> entityI18n = new EnumMap<EntityType, String>(EntityType.class);
|
||||
final private static EnumMap<EntityType, String> entityI18nPlural = new EnumMap<EntityType, String>(EntityType.class);
|
||||
|
||||
@@ -40,9 +41,9 @@ public class LivingEntities
|
||||
return count == 1 ? _(entityI18n.get(type)) : _(entityI18nPlural.get(type));
|
||||
}
|
||||
|
||||
|
||||
public static class MobException extends Exception
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ public class Commandbalancetop extends EssentialsCommand
|
||||
|
||||
private class Calculator implements Runnable
|
||||
{
|
||||
private final Viewer viewer;
|
||||
private final transient Viewer viewer;
|
||||
private final boolean force;
|
||||
|
||||
public Calculator(final Viewer viewer, final boolean force)
|
||||
@@ -176,9 +176,9 @@ public class Commandbalancetop extends EssentialsCommand
|
||||
|
||||
private class Viewer implements Runnable
|
||||
{
|
||||
private final CommandSender sender;
|
||||
private final int page;
|
||||
private final boolean force;
|
||||
private final transient CommandSender sender;
|
||||
private final transient int page;
|
||||
private final transient boolean force;
|
||||
|
||||
public Viewer(final CommandSender sender, final int page, final boolean force)
|
||||
{
|
||||
|
@@ -10,11 +10,11 @@ import org.bukkit.TreeType;
|
||||
|
||||
public class Commandbigtree extends EssentialsCommand
|
||||
{
|
||||
private static enum BigTree
|
||||
{
|
||||
private static enum BigTree {
|
||||
REDWOOD(TreeType.TALL_REDWOOD),
|
||||
TREE(TreeType.BIG_TREE),
|
||||
JUNGLE(TreeType.JUNGLE);
|
||||
|
||||
private final TreeType bukkitType;
|
||||
|
||||
private BigTree(final TreeType bukkitType)
|
||||
@@ -27,6 +27,7 @@ public class Commandbigtree extends EssentialsCommand
|
||||
return bukkitType;
|
||||
}
|
||||
}
|
||||
|
||||
private final static EnumConverter<BigTree> BIGTREE_PARSER = EnumConverter.getInstance(BigTree.class);
|
||||
|
||||
@Override
|
||||
|
@@ -10,7 +10,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public class Commanddelhome extends EssentialsCommand
|
||||
{
|
||||
private final Pattern colon = Pattern.compile(":");
|
||||
private final transient Pattern colon = Pattern.compile(":");
|
||||
|
||||
@Override
|
||||
protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||
|
@@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class Commandenderchest extends EssentialsCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void run(final IUser user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
|
@@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public class Commandessentials extends EssentialsCommand
|
||||
{
|
||||
private int taskid; // TODO: Needed?
|
||||
private transient int taskid; // TODO: Needed?
|
||||
|
||||
@Override
|
||||
protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||
|
@@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public class Commandgamemode extends EssentialsSettingsCommand
|
||||
{
|
||||
|
||||
protected void setValue(final IUser player, GameMode value)
|
||||
{
|
||||
if (value == null)
|
||||
@@ -123,4 +124,5 @@ public class Commandgamemode extends EssentialsSettingsCommand
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Commandgive extends EssentialsCommand
|
||||
{
|
||||
private final Pattern data = Pattern.compile("[:+',;.]");
|
||||
private final transient Pattern data = Pattern.compile("[:+',;.]");
|
||||
|
||||
@Override
|
||||
protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||
|
@@ -15,7 +15,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
|
||||
public class Commandhome extends EssentialsCommand
|
||||
{
|
||||
private final Pattern colon = Pattern.compile(":");
|
||||
private final transient Pattern colon = Pattern.compile(":");
|
||||
|
||||
@Override
|
||||
public void run(final IUser user, final String commandLabel, final String[] args) throws Exception
|
||||
|
@@ -11,7 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Commanditem extends EssentialsCommand
|
||||
{
|
||||
private final Pattern data = Pattern.compile("[:+',;.]");
|
||||
private final transient Pattern data = Pattern.compile("[:+',;.]");
|
||||
|
||||
@Override
|
||||
public void run(final IUser user, final String commandLabel, final String[] args) throws Exception
|
||||
|
@@ -24,8 +24,7 @@ public class Commandmore extends EssentialsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
stacks = new ItemStack[]
|
||||
{
|
||||
stacks = new ItemStack[]{
|
||||
player.getItemInHand()
|
||||
};
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ import org.bukkit.inventory.*;
|
||||
|
||||
public class Commandrecipe extends EssentialsCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@ import net.ess3.permissions.Permissions;
|
||||
|
||||
public class Commandsethome extends EssentialsCommand
|
||||
{
|
||||
private final Pattern colon = Pattern.compile(":");
|
||||
private final transient Pattern colon = Pattern.compile(":");
|
||||
|
||||
@Override
|
||||
public void run(final IUser user, final String commandLabel, String[] args) throws Exception
|
||||
|
@@ -36,6 +36,7 @@ public class Commandsetwarp extends EssentialsCommand
|
||||
}
|
||||
|
||||
if (warpLoc == null || Permissions.WARP_OVERWRITE.isAuthorized(user, args[0]))
|
||||
|
||||
{
|
||||
warps.setWarp(args[0], loc);
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public class Commandsocialspy extends EssentialsToggleCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void setValue(final IUser player, final boolean value)
|
||||
{
|
||||
|
@@ -7,6 +7,7 @@ import net.ess3.api.IUser;
|
||||
|
||||
public class Commandspawnmob extends EssentialsCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public void run(final IUser user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
|
@@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class Commandspeed extends EssentialsCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
|
@@ -8,6 +8,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public class Commandtptoggle extends EssentialsToggleCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void setValue(final IUser player, final boolean value)
|
||||
{
|
||||
|
@@ -16,12 +16,12 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public abstract class EssentialsCommand extends AbstractSuperpermsPermission implements IEssentialsCommand
|
||||
{
|
||||
protected String commandName;
|
||||
protected IEssentials ess;
|
||||
protected IEssentialsModule module;
|
||||
protected Server server;
|
||||
protected Logger logger;
|
||||
private String permission;
|
||||
protected transient String commandName;
|
||||
protected transient IEssentials ess;
|
||||
protected transient IEssentialsModule module;
|
||||
protected transient Server server;
|
||||
protected transient Logger logger;
|
||||
private transient String permission;
|
||||
|
||||
@Override
|
||||
public void init(final IEssentials ess, final String commandName)
|
||||
|
@@ -14,15 +14,15 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class EssentialsCommandHandler implements ICommandHandler, TabExecutor
|
||||
{
|
||||
private final ClassLoader classLoader;
|
||||
private final String commandPath;
|
||||
private final String permissionPrefix; // TODO: Needed?
|
||||
private final IEssentialsModule module;
|
||||
private static final Logger LOGGER = Bukkit.getLogger();
|
||||
private final Map<String, List<PluginCommand>> altcommands = new HashMap<String, List<PluginCommand>>();
|
||||
private final Map<String, String> disabledList = new HashMap<String, String>();
|
||||
private final Map<String, IEssentialsCommand> commands = new HashMap<String, IEssentialsCommand>();
|
||||
private final IEssentials ess;
|
||||
private final transient ClassLoader classLoader;
|
||||
private final transient String commandPath;
|
||||
private final transient String permissionPrefix;// TODO: Needed?
|
||||
private final transient IEssentialsModule module;
|
||||
private static final transient Logger LOGGER = Bukkit.getLogger();
|
||||
private final transient Map<String, List<PluginCommand>> altcommands = new HashMap<String, List<PluginCommand>>();
|
||||
private final transient Map<String, String> disabledList = new HashMap<String, String>();
|
||||
private final transient Map<String, IEssentialsCommand> commands = new HashMap<String, IEssentialsCommand>();
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public EssentialsCommandHandler(ClassLoader classLoader, String commandPath, String permissionPrefix, IEssentials ess)
|
||||
{
|
||||
|
@@ -8,6 +8,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public abstract class EssentialsSettingsCommand extends EssentialsCommand
|
||||
{
|
||||
|
||||
abstract protected void informSender(final CommandSender sender, final boolean value, final IUser player);
|
||||
|
||||
abstract protected void informPlayer(final IUser player);
|
||||
@@ -81,4 +82,5 @@ public abstract class EssentialsSettingsCommand extends EssentialsCommand
|
||||
informSender(sender, true, matchPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@ import net.ess3.api.IUser;
|
||||
|
||||
public abstract class EssentialsToggleCommand extends EssentialsSettingsCommand
|
||||
{
|
||||
|
||||
abstract protected void setValue(final IUser player, final boolean value);
|
||||
|
||||
abstract protected boolean getValue(final IUser player);
|
||||
|
@@ -17,3 +17,5 @@ public class WarpNotFoundException extends Exception
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -11,6 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
* TODO: make sure this is up-to date
|
||||
*/
|
||||
|
||||
|
||||
public final class InventoryWorkaround
|
||||
{
|
||||
private InventoryWorkaround()
|
||||
|
@@ -35,4 +35,6 @@ public class Money implements StorageObject
|
||||
balanceMap.remove(name);
|
||||
balances = balanceMap;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -22,12 +22,12 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Trade
|
||||
{
|
||||
private final String command;
|
||||
private final String fallbackCommand;
|
||||
private final Double money;
|
||||
private final ItemStack itemStack;
|
||||
private final Integer exp;
|
||||
private final IEssentials ess;
|
||||
private final transient String command;
|
||||
private final transient String fallbackCommand;
|
||||
private final transient Double money;
|
||||
private final transient ItemStack itemStack;
|
||||
private final transient Integer exp;
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public Trade(final String command, final IEssentials ess)
|
||||
{
|
||||
@@ -211,6 +211,7 @@ public class Trade
|
||||
}
|
||||
return cost;
|
||||
}
|
||||
|
||||
private static FileWriter fw = null;
|
||||
|
||||
public static void log(String type, String subtype, String event, String sender, Trade charge, String receiver, Trade pay, Location loc, IEssentials ess)
|
||||
|
@@ -26,6 +26,7 @@ public class Worth implements StorageObject
|
||||
{
|
||||
return sell == null ? Collections.<MaterialData, Double>emptyMap() : Collections.unmodifiableMap(sell);
|
||||
}
|
||||
|
||||
@MapKeyType(MaterialData.class)
|
||||
@MapValueType(Double.class)
|
||||
@Getter(AccessLevel.NONE)
|
||||
@@ -36,6 +37,7 @@ public class Worth implements StorageObject
|
||||
{
|
||||
return buy == null ? Collections.<MaterialData, Double>emptyMap() : Collections.unmodifiableMap(buy);
|
||||
}
|
||||
|
||||
@MapKeyType(EnchantmentLevel.class)
|
||||
@MapValueType(Double.class)
|
||||
@Getter(AccessLevel.NONE)
|
||||
|
@@ -6,8 +6,7 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Interface to be implemented by a payment method.
|
||||
*
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (
|
||||
* @nijikokun)
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (@nijikokun)
|
||||
* @copyright Copyright (C) 2011
|
||||
* @license AOL license <http://aol.nexua.org>
|
||||
*/
|
||||
@@ -17,8 +16,7 @@ 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.
|
||||
* <p/>
|
||||
* <
|
||||
* pre>
|
||||
* <pre>
|
||||
* if(method.getName().equalsIgnoreCase("iConomy"))
|
||||
* iConomy plugin = ((iConomy)method.getPlugin());</pre>
|
||||
*
|
||||
@@ -50,7 +48,8 @@ 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 <code>int</code> for each decimal place
|
||||
*/
|
||||
@@ -89,9 +88,7 @@ public interface Method
|
||||
public boolean hasAccount(String name);
|
||||
|
||||
/**
|
||||
* Check to see if an account
|
||||
* <code>name</code> is tied to a
|
||||
* <code>bank</code>.
|
||||
* Check to see if an account <code>name</code> is tied to a <code>bank</code>.
|
||||
*
|
||||
* @param bank Bank name
|
||||
* @param name Account name
|
||||
@@ -117,9 +114,7 @@ public interface Method
|
||||
public boolean createAccount(String name, Double balance);
|
||||
|
||||
/**
|
||||
* Returns a
|
||||
* <code>MethodAccount</code> class for an account
|
||||
* <code>name</code>.
|
||||
* Returns a <code>MethodAccount</code> class for an account <code>name</code>.
|
||||
*
|
||||
* @param name Account name
|
||||
* @return <code>MethodAccount</code> <em>or</em> <code>Null</code>
|
||||
@@ -127,9 +122,7 @@ public interface Method
|
||||
public MethodAccount getAccount(String name);
|
||||
|
||||
/**
|
||||
* Returns a
|
||||
* <code>MethodBankAccount</code> class for an account
|
||||
* <code>name</code>.
|
||||
* Returns a <code>MethodBankAccount</code> class for an account <code>name</code>.
|
||||
*
|
||||
* @param bank Bank name
|
||||
* @param name Account name
|
||||
@@ -138,7 +131,8 @@ 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 <code>boolean</code>
|
||||
|
@@ -22,10 +22,8 @@ import org.bukkit.plugin.PluginManager;
|
||||
* preferred: "iConomy"
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* @author: Nijikokun <nijikokun@shortmail.com> (
|
||||
* @nijikokun)
|
||||
* @copyright: Copyright (C) 2011
|
||||
* @license: AOL license <http://aol.nexua.org>
|
||||
* @author: Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright: Copyright (C) 2011 @license: AOL license
|
||||
* <http://aol.nexua.org>
|
||||
*/
|
||||
public class Methods
|
||||
{
|
||||
@@ -257,7 +255,8 @@ public class Methods
|
||||
/**
|
||||
* Grab the existing and initialized (hopefully) Method Class.
|
||||
*
|
||||
* @return <code>Method</code> <em>or</em> <code>Null</code>
|
||||
* @return <code>Method</code> <em>or</em>
|
||||
* <code>Null</code>
|
||||
*/
|
||||
public static Method getMethod()
|
||||
{
|
||||
|
@@ -9,10 +9,8 @@ import org.bukkit.plugin.Plugin;
|
||||
* BOSEconomy 7 Implementation of Method
|
||||
*
|
||||
* @author Acrobot
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (
|
||||
* @nijikokun)
|
||||
* @copyright (c) 2011
|
||||
* @license AOL license <http://aol.nexua.org>
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license
|
||||
* <http://aol.nexua.org>
|
||||
*/
|
||||
public class BOSE7 implements Method
|
||||
{
|
||||
|
@@ -12,10 +12,8 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* iConomy 5 Implementation of Method
|
||||
*
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (
|
||||
* @nijikokun)
|
||||
* @copyright (c) 2011
|
||||
* @license AOL license <http://aol.nexua.org>
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license
|
||||
* <http://aol.nexua.org>
|
||||
*/
|
||||
public class iCo5 implements Method
|
||||
{
|
||||
|
@@ -11,10 +11,8 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* iConomy 6 Implementation of Method
|
||||
*
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (
|
||||
* @nijikokun)
|
||||
* @copyright (c) 2011
|
||||
* @license AOL license <http://aol.nexua.org>
|
||||
* @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license
|
||||
* <http://aol.nexua.org>
|
||||
*/
|
||||
public class iCo6 implements Method
|
||||
{
|
||||
|
@@ -15,7 +15,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class EssentialsBlockListener implements Listener
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public EssentialsBlockListener(final IEssentials ess)
|
||||
{
|
||||
|
@@ -19,7 +19,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class EssentialsEntityListener implements Listener
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public EssentialsEntityListener(final IEssentials ess)
|
||||
{
|
||||
|
@@ -40,9 +40,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
public class EssentialsPlayerListener implements Listener
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private final Server server;
|
||||
private final IEssentials ess;
|
||||
private final IUserMap userMap;
|
||||
private final transient Server server;
|
||||
private final transient IEssentials ess;
|
||||
private final transient IUserMap userMap;
|
||||
|
||||
public EssentialsPlayerListener(final IEssentials parent)
|
||||
{
|
||||
@@ -56,8 +56,7 @@ 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);
|
||||
@@ -352,6 +351,7 @@ public class EssentialsPlayerListener implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onPlayerLogin(final PlayerLoginEvent event)
|
||||
{
|
||||
@@ -449,6 +449,7 @@ public class EssentialsPlayerListener implements Listener
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private final Pattern spaceSplit = Pattern.compile(" ");
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
|
@@ -19,7 +19,7 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class EssentialsPluginListener implements Listener, IReload
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public EssentialsPluginListener(final IEssentials ess)
|
||||
{
|
||||
@@ -36,8 +36,7 @@ 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[]
|
||||
{
|
||||
Level.INFO, "Payment method found ({0} version: {1})", new Object[]{
|
||||
Methods.getMethod().getName(), Methods.getMethod().getVersion()
|
||||
});
|
||||
}
|
||||
|
@@ -14,8 +14,8 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
|
||||
public class MetricsListener implements Listener
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final MetricsStarter starter;
|
||||
private final transient IEssentials ess;
|
||||
private final transient MetricsStarter starter;
|
||||
|
||||
public MetricsListener(final IEssentials parent, final MetricsStarter starter)
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@ import net.ess3.metrics.Metrics.Plotter;
|
||||
public class MetricsStarter implements Runnable
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private Boolean start;
|
||||
private transient Boolean start;
|
||||
|
||||
|
||||
private enum Modules
|
||||
@@ -30,7 +30,10 @@ public class MetricsStarter implements Runnable
|
||||
EssentialsProtect,
|
||||
EssentialsGeoIP,
|
||||
EssentialsXMPP
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
;
|
||||
|
||||
public MetricsStarter(final IEssentials plugin)
|
||||
{
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package net.ess3.permissions;
|
||||
|
||||
|
||||
public class BasePermission extends AbstractSuperpermsPermission
|
||||
{
|
||||
protected String permission;
|
||||
|
@@ -121,7 +121,7 @@ public enum Permissions implements IPermission
|
||||
private static final String base = "essentials.";
|
||||
private final String permission;
|
||||
private final PermissionDefault defaultPerm;
|
||||
private String parent = null;
|
||||
private transient String parent = null;
|
||||
|
||||
private Permissions()
|
||||
{
|
||||
@@ -164,6 +164,7 @@ public enum Permissions implements IPermission
|
||||
{
|
||||
return PermissionFactory.checkPermission(sender, this);
|
||||
}
|
||||
|
||||
public static DotStarPermission ENCHANT = new DotStarPermission("essentials.enchant");
|
||||
public static MaterialDotStarPermission GIVE = new MaterialDotStarPermission("essentials.give", PermissionDefault.TRUE);
|
||||
public static DotStarPermission RANKS = new DotStarPermission("essentials.ranks");
|
||||
|
@@ -12,8 +12,8 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class GMGroups extends AbstractRanks implements IRanks
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final GroupManager groupManager;
|
||||
private final transient IEssentials ess;
|
||||
private final transient GroupManager groupManager;
|
||||
|
||||
public GMGroups(final IEssentials ess, final Plugin groupManager)
|
||||
{
|
||||
|
@@ -17,6 +17,7 @@ public class Ranks implements StorageObject
|
||||
final RankOptions defaultOptions = new RankOptions();
|
||||
ranks.put("default", defaultOptions);
|
||||
}
|
||||
|
||||
@Comment(
|
||||
{
|
||||
"The order of the ranks matters, the ranks are checked from top to bottom.", "All rank names have to be lower case.",
|
||||
|
@@ -23,6 +23,7 @@ public class Backup implements StorageObject
|
||||
"ex: say \"Hello World\" will make the server say Hello World"
|
||||
})
|
||||
private List<String> commandsBeforeBackup;
|
||||
|
||||
@Comment(
|
||||
{
|
||||
"Runs these commands after a backup.", "This will run every time time (in minutes) you specify in the interval setting.",
|
||||
@@ -48,4 +49,5 @@ public class Backup implements StorageObject
|
||||
{
|
||||
return commandsAfterBackup == null ? Collections.<String>emptyList() : Collections.unmodifiableList(commandsAfterBackup);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -26,7 +26,8 @@ public class Economy implements StorageObject
|
||||
{
|
||||
return currencySymbol == null || currencySymbol.isEmpty() ? "$" : currencySymbol.substring(0, 1);
|
||||
}
|
||||
private final static double MAXMONEY = 10000000000000.0;
|
||||
|
||||
private final transient static double MAXMONEY = 10000000000000.0;
|
||||
@Comment(
|
||||
{
|
||||
"Set the maximum amount of money a player can have",
|
||||
@@ -38,6 +39,7 @@ public class Economy implements StorageObject
|
||||
{
|
||||
return Math.abs(maxMoney) > MAXMONEY ? MAXMONEY : Math.abs(maxMoney);
|
||||
}
|
||||
|
||||
@Comment(
|
||||
{
|
||||
"Set the minimum amount of money a player can have (must be above the negative of max-money).",
|
||||
@@ -49,6 +51,7 @@ public class Economy implements StorageObject
|
||||
{
|
||||
return Math.abs(minMoney) > MAXMONEY ? -MAXMONEY : minMoney;
|
||||
}
|
||||
|
||||
@Comment("Enable this to log all interactions with trade/buy/sell signs and sell command")
|
||||
private boolean logEnabled = false;
|
||||
private Worth worth = new Worth();
|
||||
|
@@ -42,6 +42,8 @@ public class General implements StorageObject
|
||||
{
|
||||
FILE, GROUPMANAGER, VAULT
|
||||
}
|
||||
|
||||
|
||||
@Comment(
|
||||
{
|
||||
"Sets the place where group options should be stored:", " FILE: Options are stored inside groups.yml in the Essentials folder",
|
||||
@@ -69,6 +71,7 @@ public class General implements StorageObject
|
||||
{
|
||||
this.loginAttackDelay = loginAttackDelay / 1000;
|
||||
}
|
||||
|
||||
private Boolean metricsEnabled = null;
|
||||
@Comment("The join message when players join the server")
|
||||
private String joinMessage = "&e{PLAYER} has joined the game";
|
||||
|
@@ -25,6 +25,7 @@ public class Kits implements StorageObject
|
||||
kits = new HashMap<String, Kit>();
|
||||
kits.put("tools", kit);
|
||||
}
|
||||
|
||||
@MapValueType(Kit.class)
|
||||
@Getter(AccessLevel.NONE)
|
||||
@Setter(AccessLevel.NONE)
|
||||
|
@@ -8,7 +8,7 @@ import net.ess3.storage.AsyncStorageObjectHolder;
|
||||
|
||||
public class SettingsHolder extends AsyncStorageObjectHolder<Settings> implements ISettings
|
||||
{
|
||||
private volatile boolean debug = false;
|
||||
private transient volatile boolean debug = false;
|
||||
|
||||
public SettingsHolder(final IEssentials ess)
|
||||
{
|
||||
|
@@ -174,8 +174,8 @@ public class SpawnsHolder extends AsyncStorageObjectHolder<Spawns> implements IE
|
||||
|
||||
private class SpawnPlayerListener implements Listener // TODO: What is this for?
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final SpawnsHolder spawns;
|
||||
private final transient IEssentials ess;
|
||||
private final transient SpawnsHolder spawns;
|
||||
|
||||
public SpawnPlayerListener(final IEssentials ess, final SpawnsHolder spawns)
|
||||
{
|
||||
@@ -187,6 +187,8 @@ public class SpawnsHolder extends AsyncStorageObjectHolder<Spawns> implements IE
|
||||
public void onPlayerRespawn(final PlayerRespawnEvent event)
|
||||
{
|
||||
final IUser user = ess.getUserMap().getUser(event.getPlayer());
|
||||
|
||||
final ISettings settings = ess.getSettings();
|
||||
boolean respawnAtHome = ess.getSettings().getData().getCommands().getHome().isRespawnAtHome();
|
||||
if (respawnAtHome)
|
||||
{
|
||||
@@ -238,7 +240,7 @@ public class SpawnsHolder extends AsyncStorageObjectHolder<Spawns> implements IE
|
||||
|
||||
private class NewPlayerTeleport implements Runnable
|
||||
{
|
||||
private final IUser user;
|
||||
private final transient IUser user;
|
||||
|
||||
public NewPlayerTeleport(final IUser user)
|
||||
{
|
||||
|
@@ -26,6 +26,7 @@ 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")
|
||||
|
@@ -9,4 +9,5 @@ import net.ess3.storage.StorageObject;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class Worlds implements StorageObject
|
||||
{
|
||||
|
||||
}
|
@@ -32,8 +32,7 @@ public class Alert implements StorageObject
|
||||
|
||||
public void setupDefaults()
|
||||
{
|
||||
Material[] mat =
|
||||
{
|
||||
Material[] mat = {
|
||||
Material.LAVA, Material.STATIONARY_LAVA, Material.TNT, Material.LAVA_BUCKET
|
||||
};
|
||||
alertOnPlacement.addAll(Arrays.asList(mat));
|
||||
|
@@ -27,6 +27,8 @@ public class AntiBuild implements StorageObject
|
||||
"Should we tell people they are not allowed to build"
|
||||
})
|
||||
private boolean warnOnBuildDisallow = true;
|
||||
|
||||
private Alert alert = new Alert();
|
||||
private BlackList blacklist = new BlackList();
|
||||
|
||||
}
|
||||
|
@@ -49,8 +49,7 @@ public class BlackList implements StorageObject
|
||||
|
||||
public void setupDefaults()
|
||||
{
|
||||
Material[] mat =
|
||||
{
|
||||
Material[] mat = {
|
||||
Material.LAVA, Material.STATIONARY_LAVA, Material.TNT, Material.LAVA_BUCKET
|
||||
};
|
||||
placement.addAll(Arrays.asList(mat));
|
||||
|
@@ -27,5 +27,6 @@ public class Afk implements StorageObject
|
||||
"You have to add a message to your welcome message or help page,", "since the player will not get a message, if he tries to move."
|
||||
})
|
||||
private boolean freezeAFKPlayers = false;
|
||||
|
||||
private boolean disableItemPickupWhileAfk = true;
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package net.ess3.settings.commands;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.ess3.storage.Comment;
|
||||
|
@@ -21,6 +21,7 @@ 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<String> socialspyCommands = new ArrayList<String>();
|
||||
|
@@ -10,14 +10,9 @@ import net.ess3.storage.StorageObject;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class Speed implements StorageObject
|
||||
{
|
||||
@Comment(
|
||||
{
|
||||
"Set the max fly speed, values range from 0.2 to 1.0"
|
||||
})
|
||||
@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"
|
||||
})
|
||||
|
||||
@Comment({"Set the max walk speed, values range from 0.1 to 1.0"})
|
||||
private double maxWalkSpeed = 0.8f;
|
||||
}
|
||||
|
@@ -15,10 +15,7 @@ public class Teleport implements StorageObject
|
||||
"Set timeout in seconds for players to accept tpa before request is cancelled.", "Set to 0 for no timeout."
|
||||
})
|
||||
private int requestTimeout = 120;
|
||||
@Comment(
|
||||
{
|
||||
"Cancels a request made by tpa / tphere on world change to prevent cross world tp"
|
||||
})
|
||||
@Comment({"Cancels a request made by tpa / tphere on world change to prevent cross world tp"})
|
||||
private boolean cancelRequestsOnWorldChange = false;
|
||||
@Comment(
|
||||
{
|
||||
|
@@ -10,6 +10,7 @@ import net.ess3.storage.StorageObject;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class Prevent implements StorageObject
|
||||
{
|
||||
|
||||
private boolean lavaFlow = false;
|
||||
private boolean waterFlow = false;
|
||||
// private boolean waterbucketFlow = false; TODO: Test if this still works
|
||||
|
@@ -18,8 +18,10 @@ public class Protect implements StorageObject
|
||||
"Set prevent.creeper-explosion to true, if you want to disable creeper explosions."
|
||||
})
|
||||
private int creeperMaxHeight = -1;
|
||||
|
||||
@Comment("Disable weather options")
|
||||
private boolean disableStorm = false;
|
||||
private boolean disableThunder = false;
|
||||
private boolean disableLighting = false;
|
||||
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@ import org.bukkit.Bukkit;
|
||||
|
||||
public abstract class AbstractDelayedYamlFileReader<T extends StorageObject> implements Runnable
|
||||
{
|
||||
private final Class<T> clazz;
|
||||
private final IEssentials ess;
|
||||
private final transient Class<T> clazz;
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public AbstractDelayedYamlFileReader(final IEssentials ess, final Class<T> clazz)
|
||||
{
|
||||
|
@@ -11,8 +11,8 @@ import org.bukkit.Bukkit;
|
||||
|
||||
public abstract class AbstractDelayedYamlFileWriter implements Runnable
|
||||
{
|
||||
private final IEssentials ess;
|
||||
private final ReentrantLock lock = new ReentrantLock(); // TODO: Needed?
|
||||
private final transient IEssentials ess;
|
||||
private final transient ReentrantLock lock = new ReentrantLock(); // TODO: Needed?
|
||||
|
||||
public AbstractDelayedYamlFileWriter(final IEssentials ess)
|
||||
{
|
||||
|
@@ -10,14 +10,14 @@ import org.bukkit.Bukkit;
|
||||
|
||||
public abstract class AsyncStorageObjectHolder<T extends StorageObject> implements IStorageObjectHolder<T>
|
||||
{
|
||||
private T data;
|
||||
private final Class<T> clazz;
|
||||
protected final IEssentials ess;
|
||||
private final StorageObjectDataWriter writer;
|
||||
private final StorageObjectDataReader reader;
|
||||
private final AtomicBoolean loaded = new AtomicBoolean(false);
|
||||
private transient T data;
|
||||
private final transient Class<T> clazz;
|
||||
protected final transient IEssentials ess;
|
||||
private final transient StorageObjectDataWriter writer;
|
||||
private final transient StorageObjectDataReader reader;
|
||||
private final transient AtomicBoolean loaded = new AtomicBoolean(false);
|
||||
private volatile long savetime = 0;
|
||||
private final File file;
|
||||
private final transient File file;
|
||||
|
||||
public AsyncStorageObjectHolder(final IEssentials ess, final Class<T> clazz, final File file)
|
||||
{
|
||||
|
@@ -21,9 +21,9 @@ import org.yaml.snakeyaml.nodes.*;
|
||||
|
||||
public class BukkitConstructor extends Constructor
|
||||
{
|
||||
private final Pattern DATAPATTERN = Pattern.compile("[:+',;.]");
|
||||
private final Pattern WORD = Pattern.compile("\\W");
|
||||
private final IPlugin plugin;
|
||||
private final transient Pattern DATAPATTERN = Pattern.compile("[:+',;.]");
|
||||
private final transient Pattern WORD = Pattern.compile("\\W");
|
||||
private final transient IPlugin plugin;
|
||||
|
||||
public BukkitConstructor(final Class<?> clazz, final IPlugin plugin)
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@ import org.bukkit.Bukkit;
|
||||
public class ManagedFile
|
||||
{
|
||||
private final static int BUFFERSIZE = 1024 * 8;
|
||||
private final File file;
|
||||
private final transient File file;
|
||||
|
||||
public ManagedFile(final String filename, final IEssentials ess)
|
||||
{
|
||||
|
@@ -26,11 +26,11 @@ import org.apache.commons.io.IOUtils;
|
||||
|
||||
public abstract class StorageObjectMap<I> extends CacheLoader<String, I> implements IStorageObjectMap<I>
|
||||
{
|
||||
protected final IEssentials ess;
|
||||
private final File folder;
|
||||
protected final Cache<String, I> cache = CacheBuilder.newBuilder().softValues().build(this);
|
||||
protected final ConcurrentSkipListSet<String> keys = new ConcurrentSkipListSet<String>();
|
||||
protected final ConcurrentSkipListMap<String, File> zippedfiles = new ConcurrentSkipListMap<String, File>();
|
||||
protected final transient IEssentials ess;
|
||||
private final transient File folder;
|
||||
protected final transient Cache<String, I> cache = CacheBuilder.newBuilder().softValues().build(this);
|
||||
protected final transient ConcurrentSkipListSet<String> keys = new ConcurrentSkipListSet<String>();
|
||||
protected final transient ConcurrentSkipListMap<String, File> zippedfiles = new ConcurrentSkipListMap<String, File>();
|
||||
private final Pattern zipCheck = Pattern.compile("^[a-zA-Z0-9]*-?[a-zA-Z0-9]+\\.yml$");
|
||||
|
||||
public StorageObjectMap(final IEssentials ess, final String folderName)
|
||||
|
@@ -15,7 +15,7 @@ public class StorageQueue implements Runnable
|
||||
private DelayQueue<WriteRequest> queue = new DelayQueue<WriteRequest>();
|
||||
public final static long DELAY = TimeUnit.NANOSECONDS.convert(1, TimeUnit.SECONDS);
|
||||
private final AtomicBoolean enabled = new AtomicBoolean(false);
|
||||
private final Object lock = new Object();
|
||||
private final transient Object lock = new Object();
|
||||
private final IPlugin plugin;
|
||||
|
||||
public StorageQueue(IPlugin plugin)
|
||||
|
@@ -13,10 +13,10 @@ import org.yaml.snakeyaml.introspector.BeanAccess;
|
||||
|
||||
public class YamlStorageReader implements IStorageReader
|
||||
{
|
||||
private static final Map<Class<?>, Yaml> PREPARED_YAMLS = Collections.synchronizedMap(new HashMap<Class<?>, Yaml>());
|
||||
private static final Map<Class<?>, ReentrantLock> LOCKS = new HashMap<Class<?>, ReentrantLock>();
|
||||
private final Reader reader;
|
||||
private final IPlugin plugin;
|
||||
private transient static final Map<Class<?>, Yaml> PREPARED_YAMLS = Collections.synchronizedMap(new HashMap<Class<?>, Yaml>());
|
||||
private transient static final Map<Class<?>, ReentrantLock> LOCKS = new HashMap<Class<?>, ReentrantLock>();
|
||||
private transient final Reader reader;
|
||||
private transient final IPlugin plugin;
|
||||
|
||||
public YamlStorageReader(final Reader reader, final IPlugin plugin)
|
||||
{
|
||||
|
@@ -20,9 +20,9 @@ import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
public class YamlStorageWriter implements IStorageWriter
|
||||
{
|
||||
private static final Pattern NON_WORD_PATTERN = Pattern.compile("\\W");
|
||||
private final PrintWriter writer;
|
||||
private static final Yaml YAML = new Yaml();
|
||||
private transient static final Pattern NON_WORD_PATTERN = Pattern.compile("\\W");
|
||||
private transient final PrintWriter writer;
|
||||
private transient static final Yaml YAML = new Yaml();
|
||||
|
||||
public YamlStorageWriter(final PrintWriter writer)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ public class YamlStorageWriter implements IStorageWriter
|
||||
for (Field field : clazz.getDeclaredFields())
|
||||
{
|
||||
final int modifier = field.getModifiers();
|
||||
if (Modifier.isPrivate(modifier) && !Modifier.isStatic(modifier))
|
||||
if (Modifier.isPrivate(modifier) && !Modifier.isTransient(modifier) && !Modifier.isStatic(modifier))
|
||||
{
|
||||
field.setAccessible(true);
|
||||
|
||||
|
@@ -3,10 +3,12 @@ package net.ess3.user;
|
||||
|
||||
public class CooldownException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 913632836257457319L;
|
||||
|
||||
public CooldownException(String timeLeft)
|
||||
{
|
||||
super(timeLeft);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@ public interface IOfflinePlayer
|
||||
String getDisplayName();
|
||||
|
||||
//Location getBedSpawnLocation();
|
||||
|
||||
void setBanned(boolean bln);
|
||||
|
||||
boolean hasPermission(Permission perm);
|
||||
|
@@ -5,4 +5,5 @@ import net.ess3.storage.IStorageObjectHolder;
|
||||
|
||||
public interface IOfflineUser extends IStorageObjectHolder<UserData>//, IOfflinePlayer
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@ import static net.ess3.I18n._;
|
||||
|
||||
public class PlayerNotFoundException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -510752839980332640L;
|
||||
|
||||
public PlayerNotFoundException()
|
||||
|
@@ -31,22 +31,22 @@ public class User extends UserBase implements IUser
|
||||
{
|
||||
private CommandSender replyTo = null;
|
||||
@Getter
|
||||
private IUser teleportRequester;
|
||||
private transient IUser teleportRequester;
|
||||
@Getter
|
||||
private boolean tpRequestHere;
|
||||
private transient boolean tpRequestHere;
|
||||
@Getter
|
||||
private final ITeleport teleport;
|
||||
private transient final ITeleport teleport;
|
||||
@Getter
|
||||
private long teleportRequestTime;
|
||||
private transient long teleportRequestTime;
|
||||
@Getter
|
||||
@Setter
|
||||
private long lastOnlineActivity;
|
||||
private long lastActivity = System.currentTimeMillis();
|
||||
private transient long lastOnlineActivity;
|
||||
private transient long lastActivity = System.currentTimeMillis();
|
||||
/*@Getter
|
||||
@Setter
|
||||
private boolean hidden = false;*/
|
||||
@Getter
|
||||
private boolean vanished;
|
||||
private transient boolean vanished;
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean invSee = false;
|
||||
@@ -54,7 +54,7 @@ public class User extends UserBase implements IUser
|
||||
@Setter
|
||||
private boolean enderSee = false;
|
||||
private long lastThrottledAction;
|
||||
private Location afkPosition;
|
||||
private transient Location afkPosition;
|
||||
private AtomicBoolean gotMailInfo = new AtomicBoolean(false);
|
||||
private WeakReference<Player> playerCache;
|
||||
@Getter
|
||||
@@ -592,7 +592,8 @@ public class User extends UserBase implements IUser
|
||||
{
|
||||
return true;
|
||||
}
|
||||
private long teleportInvulnerabilityTimestamp = 0;
|
||||
|
||||
private transient long teleportInvulnerabilityTimestamp = 0;
|
||||
|
||||
public void enableInvulnerabilityAfterTeleport()
|
||||
{
|
||||
|
@@ -6,7 +6,6 @@ import net.ess3.storage.*;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class UserData implements StorageObject
|
||||
@@ -15,6 +14,8 @@ public class UserData implements StorageObject
|
||||
{
|
||||
JAIL, MUTE, LASTHEAL, LASTTELEPORT, LOGIN, LOGOUT, KIT, COMMAND
|
||||
}
|
||||
|
||||
|
||||
private String nickname;
|
||||
private Double money;
|
||||
@MapValueType(StoredLocation.class)
|
||||
@@ -26,6 +27,7 @@ public class UserData implements StorageObject
|
||||
{
|
||||
return homes == null ? Collections.<String, StoredLocation>emptyMap() : Collections.unmodifiableMap(homes);
|
||||
}
|
||||
|
||||
@ListType(Material.class)
|
||||
@Getter(AccessLevel.NONE)
|
||||
@Setter(AccessLevel.NONE)
|
||||
@@ -35,6 +37,7 @@ public class UserData implements StorageObject
|
||||
{
|
||||
return unlimited == null ? Collections.<Material>emptySet() : Collections.unmodifiableSet(unlimited);
|
||||
}
|
||||
|
||||
@MapValueType(List.class)
|
||||
@MapKeyType(Material.class)
|
||||
@Getter(AccessLevel.NONE)
|
||||
@@ -45,6 +48,7 @@ public class UserData implements StorageObject
|
||||
{
|
||||
return powerTools == null ? Collections.<Material, List<String>>emptyMap() : Collections.unmodifiableMap(powerTools);
|
||||
}
|
||||
|
||||
private StoredLocation lastLocation;
|
||||
@MapKeyType(String.class)
|
||||
@MapValueType(Long.class)
|
||||
@@ -56,6 +60,7 @@ public class UserData implements StorageObject
|
||||
{
|
||||
return timestamps == null ? Collections.<String, Long>emptyMap() : Collections.unmodifiableMap(timestamps);
|
||||
}
|
||||
|
||||
private String jail;
|
||||
@ListType
|
||||
@Getter(AccessLevel.NONE)
|
||||
@@ -66,6 +71,7 @@ public class UserData implements StorageObject
|
||||
{
|
||||
return mails == null ? Collections.<String>emptyList() : Collections.unmodifiableList(mails);
|
||||
}
|
||||
|
||||
private Inventory inventory;
|
||||
private boolean teleportEnabled;
|
||||
@ListType
|
||||
@@ -77,6 +83,7 @@ public class UserData implements StorageObject
|
||||
{
|
||||
return ignore == null ? Collections.<String>emptySet() : Collections.unmodifiableSet(ignore);
|
||||
}
|
||||
|
||||
private boolean godmode;
|
||||
private boolean muted;
|
||||
private boolean jailed;
|
||||
|
@@ -141,6 +141,7 @@ public class UserMap extends StorageObjectMap<IUser> implements IUserMap
|
||||
{
|
||||
return matchUsers(name, false, false, requester);
|
||||
}
|
||||
|
||||
private final Pattern comma = Pattern.compile(",");
|
||||
|
||||
public Set<IUser> matchUsers(final String name, final boolean includeHidden, final boolean includeOffline, final Player requester)
|
||||
|
@@ -30,12 +30,10 @@ public class DateUtil
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int[] types = new int[]
|
||||
{
|
||||
int[] types = new int[]{
|
||||
Calendar.YEAR, Calendar.MONTH, Calendar.DAY_OF_MONTH, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND
|
||||
};
|
||||
String[] names = new String[]
|
||||
{
|
||||
String[] names = new String[]{
|
||||
_("year"), _("years"), _("month"), _("months"), _("day"), _("days"), _("hour"), _("hours"), _("minute"), _("minutes"), _("second"), _("seconds")
|
||||
};
|
||||
for (int i = 0; i < types.length; i++)
|
||||
|
@@ -9,8 +9,9 @@ import java.util.Locale;
|
||||
|
||||
public class ExecuteTimer
|
||||
{
|
||||
private final List<ExecuteRecord> times;
|
||||
private final DecimalFormat decimalFormat = new DecimalFormat("#0.000", DecimalFormatSymbols.getInstance(Locale.US));
|
||||
private final transient List<ExecuteRecord> times;
|
||||
private final transient DecimalFormat decimalFormat = new DecimalFormat("#0.000", DecimalFormatSymbols.getInstance(Locale.US));
|
||||
|
||||
|
||||
public ExecuteTimer()
|
||||
{
|
||||
|
@@ -13,15 +13,15 @@ import net.ess3.permissions.DotStarPermission;
|
||||
|
||||
public class FormatUtil
|
||||
{
|
||||
static final Pattern REPLACE_COLOR_PATTERN = Pattern.compile("&([0-9a-f])");
|
||||
static final Pattern REPLACE_MAGIC_PATTERN = Pattern.compile("&(k)");
|
||||
static final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])");
|
||||
static final Pattern VANILLA_PATTERN = Pattern.compile("\u00a7+[0-9A-FK-ORa-fk-or]");
|
||||
static final Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00a7+[0-9A-Fa-f]");
|
||||
static final Pattern REPLACE_FORMAT_PATTERN = Pattern.compile("&([l-or])");
|
||||
static final Pattern VANILLA_FORMAT_PATTERN = Pattern.compile("\u00a7+[L-ORl-or]");
|
||||
static final Pattern VANILLA_MAGIC_PATTERN = Pattern.compile("\u00a7+[Kk]");
|
||||
static final Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)");
|
||||
static final transient Pattern REPLACE_COLOR_PATTERN = Pattern.compile("&([0-9a-f])");
|
||||
static final transient Pattern REPLACE_MAGIC_PATTERN = Pattern.compile("&(k)");
|
||||
static final transient Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])");
|
||||
static final transient Pattern VANILLA_PATTERN = Pattern.compile("\u00a7+[0-9A-FK-ORa-fk-or]");
|
||||
static final transient Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00a7+[0-9A-Fa-f]");
|
||||
static final transient Pattern REPLACE_FORMAT_PATTERN = Pattern.compile("&([l-or])");
|
||||
static final transient Pattern VANILLA_FORMAT_PATTERN = Pattern.compile("\u00a7+[L-ORl-or]");
|
||||
static final transient Pattern VANILLA_MAGIC_PATTERN = Pattern.compile("\u00a7+[Kk]");
|
||||
static final transient Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)");
|
||||
static DecimalFormat dFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US));
|
||||
|
||||
static String stripColor(final String input, final Pattern pattern)
|
||||
|
@@ -69,6 +69,7 @@ public class LocationUtil
|
||||
}
|
||||
return block.getLocation();
|
||||
}
|
||||
|
||||
public final static int RADIUS = 3;
|
||||
public final static Vector3D[] VOLUME;
|
||||
|
||||
@@ -81,11 +82,13 @@ public class LocationUtil
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public int x;
|
||||
public int y;
|
||||
public int z;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
{
|
||||
List<Vector3D> pos = new ArrayList<Vector3D>();
|
||||
|
@@ -30,3 +30,4 @@ public class Target
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -16,6 +16,7 @@ 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]");
|
||||
|
||||
@@ -214,4 +215,5 @@ public final class Util
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -2,26 +2,38 @@ 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. <ul> <li>RFC3492
|
||||
* Punycode </ul> Note that this implementation only supports 16-bit Unicode code points.
|
||||
* This class offers static methods for encoding/decoding strings
|
||||
* using the Punycode algorithm.
|
||||
* <ul>
|
||||
* <li>RFC3492 Punycode
|
||||
* </ul>
|
||||
* Note that this implementation only supports 16-bit Unicode code
|
||||
* points.
|
||||
*/
|
||||
/*
|
||||
* Changes by snowleo:
|
||||
|
@@ -2,23 +2,30 @@ 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.
|
||||
*/
|
||||
|
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
|
||||
public class ArrayListInput implements IText
|
||||
{
|
||||
private final List<String> lines = new ArrayList<String>();
|
||||
private final transient List<String> lines = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
public List<String> getLines()
|
||||
@@ -27,4 +27,5 @@ public class ArrayListInput implements IText
|
||||
{
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -18,9 +18,9 @@ public class HelpInput implements IText
|
||||
private static final String DESCRIPTION = "description";
|
||||
private static final String PERMISSION = "permission";
|
||||
private static final String PERMISSIONS = "permissions";
|
||||
private final List<String> lines = new ArrayList<String>();
|
||||
private final List<String> chapters = new ArrayList<String>();
|
||||
private final Map<String, Integer> bookmarks = new HashMap<String, Integer>();
|
||||
private final transient List<String> lines = new ArrayList<String>();
|
||||
private final transient List<String> chapters = new ArrayList<String>();
|
||||
private final transient Map<String, Integer> bookmarks = new HashMap<String, Integer>();
|
||||
private final static Logger logger = Logger.getLogger("Minecraft");
|
||||
|
||||
public HelpInput(final IUser user, final String match, final IEssentials ess) throws IOException
|
||||
|
@@ -17,9 +17,9 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class KeywordReplacer implements IText
|
||||
{
|
||||
private final IText input;
|
||||
private final List<String> replaced;
|
||||
private final IEssentials ess;
|
||||
private final transient IText input;
|
||||
private final transient List<String> replaced;
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public KeywordReplacer(final IText input, final CommandSender sender, final IEssentials ess)
|
||||
{
|
||||
@@ -34,15 +34,15 @@ public class KeywordReplacer implements IText
|
||||
String displayName, ipAddress, balance, mails, world;
|
||||
String worlds, online, unique, playerlist, date, time;
|
||||
String worldTime12, worldTime24, worldDate, plugins;
|
||||
String version;
|
||||
String userName, address, version; //TODO: unused?
|
||||
if (sender instanceof IUser)
|
||||
{
|
||||
final IUser user = (IUser)sender;
|
||||
final Player player = user.getPlayer();
|
||||
displayName = player.getDisplayName();
|
||||
String userName = player.getName(); //TODO: unused
|
||||
userName = player.getName();
|
||||
ipAddress = player.getAddress() == null || player.getAddress().getAddress() == null ? "" : player.getAddress().getAddress().toString();
|
||||
String address = player.getAddress() == null ? "" : player.getAddress().toString(); // TODO: unused
|
||||
address = player.getAddress() == null ? "" : player.getAddress().toString();
|
||||
balance = FormatUtil.displayCurrency(user.getMoney(), ess);
|
||||
mails = Integer.toString(user.getData().getMails() == null ? 0 : user.getData().getMails().size());
|
||||
world = player.getLocation() == null || player.getLocation().getWorld() == null ? "" : player.getLocation().getWorld().getName();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user