Code cleanup continues...

This commit is contained in:
KHobbits 2011-11-18 18:07:28 +00:00
parent e5a8cd88f0
commit 11f02fb947
33 changed files with 406 additions and 13 deletions

View File

@ -47,6 +47,7 @@ public class Backup implements Runnable
}
}
@Override
public void run()
{
if (active)
@ -67,6 +68,7 @@ public class Backup implements Runnable
ess.scheduleAsyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
try
@ -108,6 +110,7 @@ public class Backup implements Runnable
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
server.dispatchCommand(cs, "save-on");

View File

@ -19,11 +19,13 @@ public final class Console implements IReplyTo
return server.getConsoleSender();
}
@Override
public void setReplyTo(CommandSender user)
{
replyTo = user;
}
@Override
public CommandSender getReplyTo()
{
return replyTo;

View File

@ -99,6 +99,7 @@ public class EssentialsBlockListener extends BlockListener
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
user.getInventory().addItem(is);

View File

@ -142,7 +142,6 @@ public class EssentialsConf extends Configuration
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, Util.format("failedToWriteConfig", configFile.toString()), ex);
return;
}
finally
{

View File

@ -124,6 +124,7 @@ public class EssentialsPlayerListener extends PlayerListener
}
final Thread thread = new Thread(new Runnable()
{
@Override
public void run()
{
try
@ -139,7 +140,6 @@ public class EssentialsPlayerListener extends PlayerListener
}
catch (InterruptedException ex)
{
return;
}
}
});
@ -300,6 +300,7 @@ public class EssentialsPlayerListener extends PlayerListener
event.getItemStack().setType(event.getBucket());
ess.scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
user.updateInventory();

View File

@ -23,367 +23,440 @@ public class FakeWorld implements World
this.env = environment;
}
@Override
public Block getBlockAt(int i, int i1, int i2)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Block getBlockAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getBlockTypeIdAt(int i, int i1, int i2)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getBlockTypeIdAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getHighestBlockYAt(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getHighestBlockYAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Chunk getChunkAt(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Chunk getChunkAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Chunk getChunkAt(Block block)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isChunkLoaded(Chunk chunk)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Chunk[] getLoadedChunks()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void loadChunk(Chunk chunk)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isChunkLoaded(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void loadChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean loadChunk(int i, int i1, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean unloadChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean unloadChunk(int i, int i1, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean unloadChunk(int i, int i1, boolean bln, boolean bln1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean unloadChunkRequest(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean unloadChunkRequest(int i, int i1, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean regenerateChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean refreshChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Item dropItem(Location lctn, ItemStack is)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Item dropItemNaturally(Location lctn, ItemStack is)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Arrow spawnArrow(Location lctn, Vector vector, float f, float f1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean generateTree(Location lctn, TreeType tt)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean generateTree(Location lctn, TreeType tt, BlockChangeDelegate bcd)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public LivingEntity spawnCreature(Location lctn, CreatureType ct)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public LightningStrike strikeLightning(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public LightningStrike strikeLightningEffect(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<Entity> getEntities()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<LivingEntity> getLivingEntities()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<Player> getPlayers()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public String getName()
{
return name;
}
@Override
public long getId()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Location getSpawnLocation()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean setSpawnLocation(int i, int i1, int i2)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public long getTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setTime(long l)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public long getFullTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setFullTime(long l)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean hasStorm()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setStorm(boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getWeatherDuration()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setWeatherDuration(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isThundering()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setThundering(boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getThunderDuration()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setThunderDuration(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Environment getEnvironment()
{
return env;
}
@Override
public long getSeed()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean getPVP()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setPVP(boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void save()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean createExplosion(double d, double d1, double d2, float f)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean createExplosion(Location lctn, float f)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ChunkGenerator getGenerator()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<BlockPopulator> getPopulators()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void playEffect(Location lctn, Effect effect, int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void playEffect(Location lctn, Effect effect, int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean createExplosion(double d, double d1, double d2, float f, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean createExplosion(Location lctn, float f, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T extends Entity> T spawn(Location lctn, Class<T> type) throws IllegalArgumentException
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ChunkSnapshot getEmptyChunkSnapshot(int i, int i1, boolean bln, boolean bln1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setSpawnFlags(boolean bln, boolean bln1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean getAllowAnimals()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean getAllowMonsters()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public UUID getUID()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Block getHighestBlockAt(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Block getHighestBlockAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Biome getBiome(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public double getTemperature(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public double getHumidity(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");

View File

@ -60,6 +60,7 @@ public class Jail extends BlockListener implements IConf
return config.getKeys(null);
}
@Override
public void reloadConfig()
{
config.load();

View File

@ -52,77 +52,93 @@ public class OfflinePlayer implements Player
{
}
@Override
public void setCompassTarget(Location lctn)
{
}
@Override
public InetSocketAddress getAddress()
{
return null;
}
@Override
public void kickPlayer(String string)
{
}
@Override
public PlayerInventory getInventory()
{
return null;
}
@Override
public ItemStack getItemInHand()
{
return null;
}
@Override
public void setItemInHand(ItemStack is)
{
}
@Override
public int getHealth()
{
return 0;
}
@Override
public void setHealth(int i)
{
}
@Override
public Egg throwEgg()
{
return null;
}
@Override
public Snowball throwSnowball()
{
return null;
}
@Override
public Arrow shootArrow()
{
return null;
}
@Override
public boolean isInsideVehicle()
{
return false;
}
@Override
public boolean leaveVehicle()
{
return false;
}
@Override
public Vehicle getVehicle()
{
return null;
}
@Override
public Location getLocation()
{
return location;
}
@Override
public World getWorld()
{
return world;
@ -142,11 +158,13 @@ public class OfflinePlayer implements Player
{
}
@Override
public int getEntityId()
{
return -1;
}
@Override
public boolean performCommand(String string)
{
return false;
@ -157,91 +175,109 @@ public class OfflinePlayer implements Player
return false;
}
@Override
public int getRemainingAir()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setRemainingAir(int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public int getMaximumAir()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setMaximumAir(int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean isSneaking()
{
return false;
}
@Override
public void setSneaking(boolean bln)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void updateInventory()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void chat(String string)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public double getEyeHeight()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public double getEyeHeight(boolean bln)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public List<Block> getLineOfSight(HashSet<Byte> hs, int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public Block getTargetBlock(HashSet<Byte> hs, int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public List<Block> getLastTwoTargetBlocks(HashSet<Byte> hs, int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public int getFireTicks()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public int getMaxFireTicks()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setFireTicks(int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void remove()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public Server getServer()
{
return ess == null ? null : ess.getServer();
@ -257,295 +293,354 @@ public class OfflinePlayer implements Player
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setVelocity(Vector vector)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public Vector getVelocity()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void damage(int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void damage(int i, Entity entity)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public Location getEyeLocation()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void sendRawMessage(String string)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public Location getCompassTarget()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public int getMaximumNoDamageTicks()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setMaximumNoDamageTicks(int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public int getLastDamage()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setLastDamage(int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public int getNoDamageTicks()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setNoDamageTicks(int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean teleport(Location lctn)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean teleport(Entity entity)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public Entity getPassenger()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean setPassenger(Entity entity)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean isEmpty()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean eject()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void saveData()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void loadData()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean isSleeping()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public int getSleepTicks()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public List<Entity> getNearbyEntities(double d, double d1, double d2)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean isDead()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public float getFallDistance()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setFallDistance(float f)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setSleepingIgnored(boolean bln)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean isSleepingIgnored()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void awardAchievement(Achievement a)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc, int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc, Material mtrl)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc, Material mtrl, int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void playNote(Location lctn, byte b, byte b1)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void sendBlockChange(Location lctn, Material mtrl, byte b)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void sendBlockChange(Location lctn, int i, byte b)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void setLastDamageCause(EntityDamageEvent ede)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public EntityDamageEvent getLastDamageCause()
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public void playEffect(Location lctn, Effect effect, int i)
{
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
@Override
public boolean sendChunkChange(Location lctn, int i, int i1, int i2, byte[] bytes)
{
return true;
}
@Override
public UUID getUniqueId()
{
return uniqueId;
}
@Override
public void playNote(Location lctn, Instrument i, Note note)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setPlayerTime(long l, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public long getPlayerTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public long getPlayerTimeOffset()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isPlayerTimeRelative()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void resetPlayerTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isPermissionSet(String string)
{
return false;
}
@Override
public boolean isPermissionSet(Permission prmsn)
{
return false;
}
@Override
public boolean hasPermission(String string)
{
return false;
}
@Override
public boolean hasPermission(Permission prmsn)
{
return false;
}
@Override
public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public PermissionAttachment addAttachment(Plugin plugin)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln, int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public PermissionAttachment addAttachment(Plugin plugin, int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void removeAttachment(PermissionAttachment pa)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void recalculatePermissions()
{
}
@Override
public Set<PermissionAttachmentInfo> getEffectivePermissions()
{
throw new UnsupportedOperationException("Not supported yet.");

View File

@ -466,6 +466,7 @@ public class Settings implements ISettings
}
private final static double MAXMONEY = 10000000000000.0;
@Override
public double getMaxMoney()
{
double max = config.getDouble("max-money", MAXMONEY);
@ -476,36 +477,43 @@ public class Settings implements ISettings
return max;
}
@Override
public boolean isEcoLogEnabled()
{
return config.getBoolean("economy-log-enabled", false);
}
@Override
public boolean removeGodOnDisconnect()
{
return config.getBoolean("remove-god-on-disconnect", false);
}
@Override
public boolean changeDisplayName()
{
return config.getBoolean("change-displayname", true);
}
@Override
public boolean useBukkitPermissions()
{
return config.getBoolean("use-bukkit-permissions", false);
}
@Override
public boolean addPrefixSuffix()
{
return config.getBoolean("add-prefix-suffix", ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat"));
}
@Override
public boolean disablePrefix()
{
return config.getBoolean("disablePrefix", false);
}
@Override
public boolean disableSuffix()
{
return config.getBoolean("disableSuffix", false);

View File

@ -95,6 +95,7 @@ public class Spawn implements IConf
return retval;
}
@Override
public void reloadConfig()
{
config.load();

View File

@ -85,6 +85,7 @@ public class TNTExplodeListener extends EntityListener implements Runnable
event.setCancelled(true);
}
@Override
public void run()
{
enabled = false;

View File

@ -67,6 +67,7 @@ public class Teleport implements Runnable
this.chargeFor = chargeFor;
}
@Override
public void run()
{
@ -106,7 +107,6 @@ public class Teleport implements Runnable
{
ess.showError(user.getBase(), ex, "teleport");
}
return;
}
catch (Exception ex)
{

View File

@ -375,6 +375,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return now;
}
@Override
public boolean isHidden()
{
return hidden;

View File

@ -29,6 +29,7 @@ public abstract class UserData extends PlayerExtension implements IConf
reloadConfig();
}
@Override
public final void reloadConfig()
{
config.load();

View File

@ -85,6 +85,7 @@ public class Warps implements IConf
warpPoints.remove(new StringIgnoreCase(name));
}
@Override
public final void reloadConfig()
{
warpPoints.clear();

View File

@ -52,6 +52,7 @@ public class Worth implements IConf
config.save();
}
@Override
public void reloadConfig()
{
config.load();

View File

@ -29,7 +29,7 @@ public class Commandafk extends EssentialsCommand
}
}
private final void toggleAfk(User user)
private void toggleAfk(User user)
{
if (!user.toggleAfk())
{

View File

@ -42,6 +42,7 @@ public class Commandbalancetop extends EssentialsCommand
final List<Map.Entry<User, Double>> sortedEntries = new ArrayList<Map.Entry<User, Double>>(balances.entrySet());
Collections.sort(sortedEntries, new Comparator<Map.Entry<User, Double>>()
{
@Override
public int compare(final Entry<User, Double> entry1, final Entry<User, Double> entry2)
{
return -entry1.getValue().compareTo(entry2.getValue());

View File

@ -80,6 +80,7 @@ public class Commandessentials extends EssentialsCommand
{
int i = 0;
@Override
public void run()
{
final String note = tune[i];

View File

@ -115,8 +115,6 @@ public class Commandptime extends EssentialsCommand
}
}
}
return;
}
/**
@ -237,6 +235,7 @@ public class Commandptime extends EssentialsCommand
class UserNameComparator implements Comparator<User>
{
@Override
public int compare(User a, User b)
{
return a.getName().compareTo(b.getName());

View File

@ -71,7 +71,6 @@ public class Commandtime extends EssentialsCommand
{
sender.sendMessage(Util.format("timeCurrentWorld", world.getName(), DescParseTickFormat.format(world.getTime())));
}
return;
}
/**
@ -151,6 +150,7 @@ public class Commandtime extends EssentialsCommand
class WorldNameComparator implements Comparator<World>
{
@Override
public int compare(World a, World b)
{
return a.getName().compareTo(b.getName());

View File

@ -62,6 +62,5 @@ public class Commandtp extends EssentialsCommand
User toPlayer = getPlayer(server, args, 1);
target.getTeleport().now(toPlayer, false);
target.sendMessage(Util.format("teleportAtoB", Console.NAME, toPlayer.getDisplayName()));
return;
}
}

View File

@ -50,6 +50,7 @@ public class Commandwarp extends EssentialsCommand
}
}
@Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 2 || args[0].matches("[0-9]+"))

View File

@ -32,7 +32,6 @@ public class Commandweather extends EssentialsCommand
user.sendMessage(isStorm
? Util.format("weatherStormFor", world.getName(), args[1])
: Util.format("weatherSunFor", world.getName(), args[1]));
return;
}
else
{
@ -40,7 +39,6 @@ public class Commandweather extends EssentialsCommand
user.sendMessage(isStorm
? Util.format("weatherStorm", world.getName())
: Util.format("weatherSun", world.getName()));
return;
}
}
@ -66,7 +64,6 @@ public class Commandweather extends EssentialsCommand
sender.sendMessage(isStorm
? Util.format("weatherStormFor", world.getName(), args[2])
: Util.format("weatherSunFor", world.getName(), args[2]));
return;
}
else
{
@ -74,7 +71,6 @@ public class Commandweather extends EssentialsCommand
sender.sendMessage(isStorm
? Util.format("weatherStorm", world.getName())
: Util.format("weatherSun", world.getName()));
return;
}
}
}

View File

@ -20,11 +20,13 @@ public abstract class EssentialsCommand implements IEssentialsCommand
this.name = name;
}
@Override
public void setEssentials(final IEssentials ess)
{
this.ess = ess;
}
@Override
public String getName()
{
return name;

View File

@ -18,26 +18,31 @@ public class BOSE6 implements Method
{
private BOSEconomy BOSEconomy;
@Override
public BOSEconomy getPlugin()
{
return this.BOSEconomy;
}
@Override
public String getName()
{
return "BOSEconomy";
}
@Override
public String getVersion()
{
return "0.6.2";
}
@Override
public int fractionalDigits()
{
return 0;
}
@Override
public String format(double amount)
{
String currency = this.BOSEconomy.getMoneyNamePlural();
@ -50,27 +55,32 @@ public class BOSE6 implements Method
return amount + " " + currency;
}
@Override
public boolean hasBanks()
{
return true;
}
@Override
public boolean hasBank(String bank)
{
return this.BOSEconomy.bankExists(bank);
}
@Override
public boolean hasAccount(String name)
{
return this.BOSEconomy.playerRegistered(name, false);
}
@Override
public boolean hasBankAccount(String bank, String name)
{
return this.BOSEconomy.isBankOwner(bank, name)
|| this.BOSEconomy.isBankMember(bank, name);
}
@Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@ -82,6 +92,7 @@ public class BOSE6 implements Method
return true;
}
@Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@ -94,6 +105,7 @@ public class BOSE6 implements Method
return true;
}
@Override
public MethodAccount getAccount(String name)
{
if (!hasAccount(name))
@ -104,6 +116,7 @@ public class BOSE6 implements Method
return new BOSEAccount(name, this.BOSEconomy);
}
@Override
public MethodBankAccount getBankAccount(String bank, String name)
{
if (!hasBankAccount(bank, name))
@ -114,6 +127,7 @@ public class BOSE6 implements Method
return new BOSEBankAccount(bank, BOSEconomy);
}
@Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy")
@ -121,6 +135,7 @@ public class BOSE6 implements Method
&& plugin.getDescription().getVersion().equals("0.6.2");
}
@Override
public void setPlugin(Plugin plugin)
{
BOSEconomy = (BOSEconomy)plugin;
@ -138,23 +153,27 @@ public class BOSE6 implements Method
this.BOSEconomy = bOSEconomy;
}
@Override
public double balance()
{
return (double)this.BOSEconomy.getPlayerMoney(this.name);
}
@Override
public boolean set(double amount)
{
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.setPlayerMoney(this.name, IntAmount, false);
}
@Override
public boolean add(double amount)
{
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.addPlayerMoney(this.name, IntAmount, false);
}
@Override
public boolean subtract(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@ -162,6 +181,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setPlayerMoney(this.name, (balance - IntAmount), false);
}
@Override
public boolean multiply(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@ -169,6 +189,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setPlayerMoney(this.name, (balance * IntAmount), false);
}
@Override
public boolean divide(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@ -176,26 +197,31 @@ public class BOSE6 implements Method
return this.BOSEconomy.setPlayerMoney(this.name, (balance / IntAmount), false);
}
@Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
@Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
@Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
@Override
public boolean isNegative()
{
return (this.balance() < 0);
}
@Override
public boolean remove()
{
return false;
@ -214,27 +240,32 @@ public class BOSE6 implements Method
this.BOSEconomy = bOSEconomy;
}
@Override
public String getBankName()
{
return this.bank;
}
@Override
public int getBankId()
{
return -1;
}
@Override
public double balance()
{
return (double)this.BOSEconomy.getBankMoney(bank);
}
@Override
public boolean set(double amount)
{
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.setBankMoney(bank, IntAmount, true);
}
@Override
public boolean add(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@ -242,6 +273,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance + IntAmount), false);
}
@Override
public boolean subtract(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@ -249,6 +281,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance - IntAmount), false);
}
@Override
public boolean multiply(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@ -256,6 +289,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance * IntAmount), false);
}
@Override
public boolean divide(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@ -263,26 +297,31 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance / IntAmount), false);
}
@Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
@Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
@Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
@Override
public boolean isNegative()
{
return (this.balance() < 0);
}
@Override
public boolean remove()
{
return this.BOSEconomy.removeBank(bank);

View File

@ -18,26 +18,31 @@ public class BOSE7 implements Method
{
private BOSEconomy BOSEconomy;
@Override
public BOSEconomy getPlugin()
{
return this.BOSEconomy;
}
@Override
public String getName()
{
return "BOSEconomy";
}
@Override
public String getVersion()
{
return "0.7.0";
}
@Override
public int fractionalDigits()
{
return this.BOSEconomy.getFractionalDigits();
}
@Override
public String format(double amount)
{
String currency = this.BOSEconomy.getMoneyNamePlural();
@ -50,26 +55,31 @@ public class BOSE7 implements Method
return amount + " " + currency;
}
@Override
public boolean hasBanks()
{
return true;
}
@Override
public boolean hasBank(String bank)
{
return this.BOSEconomy.bankExists(bank);
}
@Override
public boolean hasAccount(String name)
{
return this.BOSEconomy.playerRegistered(name, false);
}
@Override
public boolean hasBankAccount(String bank, String name)
{
return this.BOSEconomy.isBankOwner(bank, name) || this.BOSEconomy.isBankMember(bank, name);
}
@Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@ -81,6 +91,7 @@ public class BOSE7 implements Method
return true;
}
@Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@ -93,6 +104,7 @@ public class BOSE7 implements Method
return true;
}
@Override
public MethodAccount getAccount(String name)
{
if (!hasAccount(name))
@ -103,6 +115,7 @@ public class BOSE7 implements Method
return new BOSEAccount(name, this.BOSEconomy);
}
@Override
public MethodBankAccount getBankAccount(String bank, String name)
{
if (!hasBankAccount(bank, name))
@ -113,6 +126,7 @@ public class BOSE7 implements Method
return new BOSEBankAccount(bank, BOSEconomy);
}
@Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy")
@ -120,6 +134,7 @@ public class BOSE7 implements Method
&& !plugin.getDescription().getVersion().equals("0.6.2");
}
@Override
public void setPlugin(Plugin plugin)
{
BOSEconomy = (BOSEconomy)plugin;
@ -137,59 +152,70 @@ public class BOSE7 implements Method
this.BOSEconomy = bOSEconomy;
}
@Override
public double balance()
{
return this.BOSEconomy.getPlayerMoneyDouble(this.name);
}
@Override
public boolean set(double amount)
{
return this.BOSEconomy.setPlayerMoney(this.name, amount, false);
}
@Override
public boolean add(double amount)
{
return this.BOSEconomy.addPlayerMoney(this.name, amount, false);
}
@Override
public boolean subtract(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance - amount), false);
}
@Override
public boolean multiply(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance * amount), false);
}
@Override
public boolean divide(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance / amount), false);
}
@Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
@Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
@Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
@Override
public boolean isNegative()
{
return (this.balance() < 0);
}
@Override
public boolean remove()
{
return false;
@ -208,70 +234,83 @@ public class BOSE7 implements Method
this.BOSEconomy = bOSEconomy;
}
@Override
public String getBankName()
{
return this.bank;
}
@Override
public int getBankId()
{
return -1;
}
@Override
public double balance()
{
return this.BOSEconomy.getBankMoneyDouble(bank);
}
@Override
public boolean set(double amount)
{
return this.BOSEconomy.setBankMoney(bank, amount, true);
}
@Override
public boolean add(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance + amount), false);
}
@Override
public boolean subtract(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance - amount), false);
}
@Override
public boolean multiply(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance * amount), false);
}
@Override
public boolean divide(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance / amount), false);
}
@Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
@Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
@Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
@Override
public boolean isNegative()
{
return (this.balance() < 0);
}
@Override
public boolean remove()
{
return this.BOSEconomy.removeBank(bank);

View File

@ -19,73 +19,87 @@ public class MCUR implements Method
{
private Currency currencyList;
@Override
public Object getPlugin()
{
return this.currencyList;
}
@Override
public String getName()
{
return "MultiCurrency";
}
@Override
public String getVersion()
{
return "0.09";
}
@Override
public int fractionalDigits()
{
return -1;
}
@Override
public String format(double amount)
{
return amount + " Currency";
}
@Override
public boolean hasBanks()
{
return false;
}
@Override
public boolean hasBank(String bank)
{
return false;
}
@Override
public boolean hasAccount(String name)
{
return true;
}
@Override
public boolean hasBankAccount(String bank, String name)
{
return false;
}
@Override
public boolean createAccount(String name)
{
CurrencyList.setValue((String)CurrencyList.maxCurrency(name)[0], name, 0);
return true;
}
@Override
public boolean createAccount(String name, Double balance)
{
CurrencyList.setValue((String)CurrencyList.maxCurrency(name)[0], name, balance);
return true;
}
@Override
public MethodAccount getAccount(String name)
{
return new MCurrencyAccount(name);
}
@Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return null;
}
@Override
public boolean isCompatible(Plugin plugin)
{
return (plugin.getDescription().getName().equalsIgnoreCase("Currency")
@ -93,6 +107,7 @@ public class MCUR implements Method
&& plugin instanceof Currency;
}
@Override
public void setPlugin(Plugin plugin)
{
currencyList = (Currency)plugin;
@ -108,57 +123,68 @@ public class MCUR implements Method
this.name = name;
}
@Override
public double balance()
{
return CurrencyList.getValue((String)CurrencyList.maxCurrency(name)[0], name);
}
@Override
public boolean set(double amount)
{
CurrencyList.setValue((String)CurrencyList.maxCurrency(name)[0], name, amount);
return true;
}
@Override
public boolean add(double amount)
{
return CurrencyList.add(name, amount);
}
@Override
public boolean subtract(double amount)
{
return CurrencyList.subtract(name, amount);
}
@Override
public boolean multiply(double amount)
{
return CurrencyList.multiply(name, amount);
}
@Override
public boolean divide(double amount)
{
return CurrencyList.divide(name, amount);
}
@Override
public boolean hasEnough(double amount)
{
return CurrencyList.hasEnough(name, amount);
}
@Override
public boolean hasOver(double amount)
{
return CurrencyList.hasOver(name, amount);
}
@Override
public boolean hasUnder(double amount)
{
return CurrencyList.hasUnder(name, amount);
}
@Override
public boolean isNegative()
{
return CurrencyList.isNegative(name);
}
@Override
public boolean remove()
{
return CurrencyList.remove(name);

View File

@ -19,51 +19,61 @@ public class iCo4 implements Method
{
private iConomy iConomy;
@Override
public iConomy getPlugin()
{
return this.iConomy;
}
@Override
public String getName()
{
return "iConomy";
}
@Override
public String getVersion()
{
return "4";
}
@Override
public int fractionalDigits()
{
return 2;
}
@Override
public String format(double amount)
{
return com.nijiko.coelho.iConomy.iConomy.getBank().format(amount);
}
@Override
public boolean hasBanks()
{
return false;
}
@Override
public boolean hasBank(String bank)
{
return false;
}
@Override
public boolean hasAccount(String name)
{
return com.nijiko.coelho.iConomy.iConomy.getBank().hasAccount(name);
}
@Override
public boolean hasBankAccount(String bank, String name)
{
return false;
}
@Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@ -83,6 +93,7 @@ public class iCo4 implements Method
return true;
}
@Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@ -102,16 +113,19 @@ public class iCo4 implements Method
return true;
}
@Override
public MethodAccount getAccount(String name)
{
return new iCoAccount(com.nijiko.coelho.iConomy.iConomy.getBank().getAccount(name));
}
@Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return null;
}
@Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
@ -119,6 +133,7 @@ public class iCo4 implements Method
&& plugin instanceof iConomy;
}
@Override
public void setPlugin(Plugin plugin)
{
iConomy = (iConomy)plugin;
@ -139,11 +154,13 @@ public class iCo4 implements Method
return account;
}
@Override
public double balance()
{
return this.account.getBalance();
}
@Override
public boolean set(double amount)
{
if (this.account == null)
@ -154,6 +171,7 @@ public class iCo4 implements Method
return true;
}
@Override
public boolean add(double amount)
{
if (this.account == null)
@ -164,6 +182,7 @@ public class iCo4 implements Method
return true;
}
@Override
public boolean subtract(double amount)
{
if (this.account == null)
@ -174,6 +193,7 @@ public class iCo4 implements Method
return true;
}
@Override
public boolean multiply(double amount)
{
if (this.account == null)
@ -184,6 +204,7 @@ public class iCo4 implements Method
return true;
}
@Override
public boolean divide(double amount)
{
if (this.account == null)
@ -194,26 +215,31 @@ public class iCo4 implements Method
return true;
}
@Override
public boolean hasEnough(double amount)
{
return this.account.hasEnough(amount);
}
@Override
public boolean hasOver(double amount)
{
return this.account.hasOver(amount);
}
@Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
@Override
public boolean isNegative()
{
return this.account.isNegative();
}
@Override
public boolean remove()
{
if (this.account == null)

View File

@ -22,51 +22,61 @@ public class iCo5 implements Method
{
private iConomy iConomy;
@Override
public iConomy getPlugin()
{
return this.iConomy;
}
@Override
public String getName()
{
return "iConomy";
}
@Override
public String getVersion()
{
return "5";
}
@Override
public int fractionalDigits()
{
return 2;
}
@Override
public String format(double amount)
{
return com.iConomy.iConomy.format(amount);
}
@Override
public boolean hasBanks()
{
return Constants.Banking;
}
@Override
public boolean hasBank(String bank)
{
return (hasBanks()) && com.iConomy.iConomy.Banks.exists(bank);
}
@Override
public boolean hasAccount(String name)
{
return com.iConomy.iConomy.hasAccount(name);
}
@Override
public boolean hasBankAccount(String bank, String name)
{
return (hasBank(bank)) && com.iConomy.iConomy.getBank(bank).hasAccount(name);
}
@Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@ -77,6 +87,7 @@ public class iCo5 implements Method
return com.iConomy.iConomy.Accounts.create(name);
}
@Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@ -94,16 +105,19 @@ public class iCo5 implements Method
return true;
}
@Override
public MethodAccount getAccount(String name)
{
return new iCoAccount(com.iConomy.iConomy.getAccount(name));
}
@Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return new iCoBankAccount(com.iConomy.iConomy.getBank(bank).getAccount(name));
}
@Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
@ -111,6 +125,7 @@ public class iCo5 implements Method
&& plugin instanceof iConomy;
}
@Override
public void setPlugin(Plugin plugin)
{
iConomy = (iConomy)plugin;
@ -133,11 +148,13 @@ public class iCo5 implements Method
return account;
}
@Override
public double balance()
{
return this.holdings.balance();
}
@Override
public boolean set(double amount)
{
if (this.holdings == null)
@ -148,6 +165,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean add(double amount)
{
if (this.holdings == null)
@ -158,6 +176,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean subtract(double amount)
{
if (this.holdings == null)
@ -168,6 +187,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean multiply(double amount)
{
if (this.holdings == null)
@ -178,6 +198,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean divide(double amount)
{
if (this.holdings == null)
@ -188,26 +209,31 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
@Override
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
@Override
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
@Override
public boolean isNegative()
{
return this.holdings.isNegative();
}
@Override
public boolean remove()
{
if (this.account == null)
@ -236,21 +262,25 @@ public class iCo5 implements Method
return account;
}
@Override
public String getBankName()
{
return this.account.getBankName();
}
@Override
public int getBankId()
{
return this.account.getBankId();
}
@Override
public double balance()
{
return this.holdings.balance();
}
@Override
public boolean set(double amount)
{
if (this.holdings == null)
@ -261,6 +291,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean add(double amount)
{
if (this.holdings == null)
@ -271,6 +302,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean subtract(double amount)
{
if (this.holdings == null)
@ -281,6 +313,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean multiply(double amount)
{
if (this.holdings == null)
@ -291,6 +324,7 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean divide(double amount)
{
if (this.holdings == null)
@ -301,26 +335,31 @@ public class iCo5 implements Method
return true;
}
@Override
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
@Override
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
@Override
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
@Override
public boolean isNegative()
{
return this.holdings.isNegative();
}
@Override
public boolean remove()
{
if (this.account == null)

View File

@ -21,51 +21,61 @@ public class iCo6 implements Method
{
private iConomy iConomy;
@Override
public iConomy getPlugin()
{
return this.iConomy;
}
@Override
public String getName()
{
return "iConomy";
}
@Override
public String getVersion()
{
return "6";
}
@Override
public int fractionalDigits()
{
return 2;
}
@Override
public String format(double amount)
{
return com.iCo6.iConomy.format(amount);
}
@Override
public boolean hasBanks()
{
return false;
}
@Override
public boolean hasBank(String bank)
{
return false;
}
@Override
public boolean hasAccount(String name)
{
return (new Accounts()).exists(name);
}
@Override
public boolean hasBankAccount(String bank, String name)
{
return false;
}
@Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@ -76,6 +86,7 @@ public class iCo6 implements Method
return (new Accounts()).create(name);
}
@Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@ -86,16 +97,19 @@ public class iCo6 implements Method
return (new Accounts()).create(name, balance);
}
@Override
public MethodAccount getAccount(String name)
{
return new iCoAccount((new Accounts()).get(name));
}
@Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return null;
}
@Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
@ -103,6 +117,7 @@ public class iCo6 implements Method
&& plugin instanceof iConomy;
}
@Override
public void setPlugin(Plugin plugin)
{
iConomy = (iConomy)plugin;
@ -125,11 +140,13 @@ public class iCo6 implements Method
return account;
}
@Override
public double balance()
{
return this.holdings.getBalance();
}
@Override
public boolean set(double amount)
{
if (this.holdings == null)
@ -140,6 +157,7 @@ public class iCo6 implements Method
return true;
}
@Override
public boolean add(double amount)
{
if (this.holdings == null)
@ -150,6 +168,7 @@ public class iCo6 implements Method
return true;
}
@Override
public boolean subtract(double amount)
{
if (this.holdings == null)
@ -160,6 +179,7 @@ public class iCo6 implements Method
return true;
}
@Override
public boolean multiply(double amount)
{
if (this.holdings == null)
@ -170,6 +190,7 @@ public class iCo6 implements Method
return true;
}
@Override
public boolean divide(double amount)
{
if (this.holdings == null)
@ -180,26 +201,31 @@ public class iCo6 implements Method
return true;
}
@Override
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
@Override
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
@Override
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
@Override
public boolean isNegative()
{
return this.holdings.isNegative();
}
@Override
public boolean remove()
{
if (this.account == null)

View File

@ -422,24 +422,27 @@ public class EssentialsSign
this.block = event.getBlock();
}
@Override
public final String getLine(final int index)
{
return event.getLine(index);
}
@Override
public final void setLine(final int index, final String text)
{
event.setLine(index, text);
}
@Override
public Block getBlock()
{
return block;
}
@Override
public void updateSign()
{
return;
}
}
@ -455,21 +458,25 @@ public class EssentialsSign
this.sign = (Sign)block.getState();
}
@Override
public final String getLine(final int index)
{
return sign.getLine(index);
}
@Override
public final void setLine(final int index, final String text)
{
sign.setLine(index, text);
}
@Override
public final Block getBlock()
{
return block;
}
@Override
public final void updateSign()
{
sign.update();

View File

@ -89,16 +89,19 @@ public class TextInput implements IText
}
}
@Override
public List<String> getLines()
{
return lines;
}
@Override
public List<String> getChapters()
{
return chapters;
}
@Override
public Map<String, Integer> getBookmarks()
{
return bookmarks;