1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 02:59:06 +02:00

Change namespace from com.earth2me to org.mcess - net.ess3.api changes still required

This commit is contained in:
ementalo
2015-04-11 21:47:56 +01:00
parent ce8313bd68
commit 9e6c686c29
334 changed files with 1788 additions and 1816 deletions

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.ess3</groupId>
<groupId>org.mcess</groupId>
<artifactId>EssentialsParent</artifactId>
<version>2.x-SNAPSHOT</version>
</parent>
@@ -87,7 +87,7 @@
<systemPath>${project.basedir}/../lib/iCo6.jar</systemPath>
</dependency>
<dependency>
<groupId>net.ess3</groupId>
<groupId>org.mcess</groupId>
<artifactId>GroupManager</artifactId>
<version>${project.version}</version>
<scope>system</scope>

View File

@@ -1,12 +0,0 @@
package com.earth2me.essentials.api;
import static com.earth2me.essentials.I18n.tl;
public class UserDoesNotExistException extends Exception
{
public UserDoesNotExistException(String name)
{
super(tl("userDoesNotExist", name));
}
}

View File

@@ -1,65 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.craftbukkit.SetExpFix;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.Locale;
import org.bukkit.Server;
public class Commandwhois extends EssentialsCommand
{
public Commandwhois()
{
super("whois");
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User user = getPlayer(server, sender, args, 0);
sender.sendMessage(tl("whoisTop", user.getName()));
user.setDisplayNick();
sender.sendMessage(tl("whoisNick", user.getDisplayName()));
sender.sendMessage(tl("whoisHealth", user.getBase().getHealth()));
sender.sendMessage(tl("whoisHunger", user.getBase().getFoodLevel(), user.getBase().getSaturation()));
sender.sendMessage(tl("whoisExp", SetExpFix.getTotalExperience(user.getBase()), user.getBase().getLevel()));
sender.sendMessage(tl("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ()));
if (!ess.getSettings().isEcoDisabled())
{
sender.sendMessage(tl("whoisMoney", NumberUtil.displayCurrency(user.getMoney(), ess)));
}
sender.sendMessage(tl("whoisIPAddress", user.getBase().getAddress().getAddress().toString()));
final String location = user.getGeoLocation();
if (location != null
&& (sender.isPlayer() ? ess.getUser(sender.getPlayer()).isAuthorized("essentials.geoip.show") : true))
{
sender.sendMessage(tl("whoisGeoLocation", location));
}
sender.sendMessage(tl("whoisGamemode", tl(user.getBase().getGameMode().toString().toLowerCase(Locale.ENGLISH))));
sender.sendMessage(tl("whoisGod", (user.isGodModeEnabled() ? tl("true") : tl("false"))));
sender.sendMessage(tl("whoisOp", (user.getBase().isOp() ? tl("true") : tl("false"))));
sender.sendMessage(tl("whoisFly", user.getBase().getAllowFlight() ? tl("true") : tl("false"), user.getBase().isFlying() ? tl("flying") : tl("notFlying")));
sender.sendMessage(tl("whoisAFK", (user.isAfk() ? tl("true") : tl("false"))));
sender.sendMessage(tl("whoisJail", (user.isJailed()
? user.getJailTimeout() > 0
? DateUtil.formatDateDiff(user.getJailTimeout())
: tl("true")
: tl("false"))));
sender.sendMessage(tl("whoisMuted", (user.isMuted()
? user.getMuteTimeout() > 0
? DateUtil.formatDateDiff(user.getMuteTimeout())
: tl("true")
: tl("false"))));
}
}

View File

@@ -1,11 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
public class PlayerNotFoundException extends NoSuchFieldException
{
public PlayerNotFoundException()
{
super(tl("playerNotFound"));
}
}

View File

@@ -1,6 +0,0 @@
package com.earth2me.essentials.storage;
public interface StorageObject
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public class Economy extends com.earth2me.essentials.api.Economy
public class Economy extends org.mcess.essentials.api.Economy
{
}

View File

@@ -1,6 +1,6 @@
package net.ess3.api;
public interface IEssentials extends com.earth2me.essentials.IEssentials
public interface IEssentials extends org.mcess.essentials.IEssentials
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public interface II18n extends com.earth2me.essentials.api.II18n
public interface II18n extends org.mcess.essentials.api.II18n
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public interface IItemDb extends com.earth2me.essentials.api.IItemDb
public interface IItemDb extends org.mcess.essentials.api.IItemDb
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public interface IJails extends com.earth2me.essentials.api.IJails
public interface IJails extends org.mcess.essentials.api.IJails
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public interface IReload extends com.earth2me.essentials.api.IReload
public interface IReload extends org.mcess.essentials.api.IReload
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public interface ISettings extends com.earth2me.essentials.ISettings
public interface ISettings extends org.mcess.essentials.ISettings
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public interface ITeleport extends com.earth2me.essentials.api.ITeleport
public interface ITeleport extends org.mcess.essentials.api.ITeleport
{
}

View File

@@ -2,7 +2,7 @@ package net.ess3.api;
public interface IUser extends com.earth2me.essentials.IUser
public interface IUser extends org.mcess.essentials.IUser
{
}

View File

@@ -1,7 +1,7 @@
package net.ess3.api;
public interface IWarps extends com.earth2me.essentials.api.IWarps
public interface IWarps extends org.mcess.essentials.api.IWarps
{
}

View File

@@ -1,6 +1,6 @@
package net.ess3.api;
import static com.earth2me.essentials.I18n.tl;
import static org.mcess.essentials.I18n.tl;
public class InvalidWorldException extends Exception

View File

@@ -1,6 +1,6 @@
package net.ess3.api;
import static com.earth2me.essentials.I18n.tl;
import static org.mcess.essentials.I18n.tl;
public class MaxMoneyException extends Exception

View File

@@ -1,6 +1,6 @@
package net.ess3.api;
import static com.earth2me.essentials.I18n.tl;
import static org.mcess.essentials.I18n.tl;
public class NoLoanPermittedException extends Exception

View File

@@ -1,6 +1,6 @@
package net.ess3.api;
import static com.earth2me.essentials.I18n.tl;
import static org.mcess.essentials.I18n.tl;
public class UserDoesNotExistException extends Exception

View File

@@ -1,6 +1,6 @@
package net.ess3.api.events;
import static com.earth2me.essentials.I18n.tl;
import static org.mcess.essentials.I18n.tl;
import java.util.IllegalFormatException;
import java.util.Set;
import org.bukkit.entity.Player;

View File

@@ -1,6 +1,6 @@
package net.ess3.api.events;
import com.earth2me.essentials.signs.EssentialsSign;
import org.mcess.essentials.signs.EssentialsSign;
import net.ess3.api.IUser;

View File

@@ -1,6 +1,6 @@
package net.ess3.api.events;
import com.earth2me.essentials.signs.EssentialsSign;
import org.mcess.essentials.signs.EssentialsSign;
import net.ess3.api.IUser;

View File

@@ -1,7 +1,7 @@
package net.ess3.api.events;
import com.earth2me.essentials.signs.EssentialsSign;
import com.earth2me.essentials.signs.EssentialsSign.ISign;
import org.mcess.essentials.signs.EssentialsSign;
import org.mcess.essentials.signs.EssentialsSign.ISign;
import net.ess3.api.IUser;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;

View File

@@ -1,6 +1,6 @@
package net.ess3.api.events;
import com.earth2me.essentials.signs.EssentialsSign;
import org.mcess.essentials.signs.EssentialsSign;
import net.ess3.api.IUser;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import java.util.*;
import java.util.logging.Level;
@@ -31,7 +31,7 @@ public class AlternativeCommandsHandler
public final void addPlugin(final Plugin plugin)
{
if (plugin.getDescription().getMain().contains("com.earth2me.essentials"))
if (plugin.getDescription().getMain().contains("org.mcess.essentials"))
{
return;
}

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
public class ChargeException extends Exception

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;

View File

@@ -1,6 +1,6 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.utils.NumberUtil;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

View File

@@ -15,26 +15,26 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.EssentialsCommand;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import com.earth2me.essentials.commands.QuietAbortException;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.metrics.MetricsListener;
import com.earth2me.essentials.metrics.MetricsStarter;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import com.earth2me.essentials.signs.SignBlockListener;
import com.earth2me.essentials.signs.SignEntityListener;
import com.earth2me.essentials.signs.SignPlayerListener;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.SimpleTextInput;
import com.earth2me.essentials.utils.DateUtil;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.commands.EssentialsCommand;
import org.mcess.essentials.commands.IEssentialsCommand;
import org.mcess.essentials.commands.NoChargeException;
import org.mcess.essentials.commands.NotEnoughArgumentsException;
import org.mcess.essentials.commands.QuietAbortException;
import org.mcess.essentials.metrics.Metrics;
import org.mcess.essentials.metrics.MetricsListener;
import org.mcess.essentials.metrics.MetricsStarter;
import org.mcess.essentials.perm.PermissionsHandler;
import org.mcess.essentials.register.payment.Methods;
import org.mcess.essentials.signs.SignBlockListener;
import org.mcess.essentials.signs.SignEntityListener;
import org.mcess.essentials.signs.SignPlayerListener;
import org.mcess.essentials.textreader.IText;
import org.mcess.essentials.textreader.KeywordReplacer;
import org.mcess.essentials.textreader.SimpleTextInput;
import org.mcess.essentials.utils.DateUtil;
import com.google.common.base.Function;
import com.google.common.base.Throwables;
import com.google.common.collect.Iterables;
@@ -114,7 +114,7 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
public Essentials(final Server server)
{
super(new JavaPluginLoader(server), new PluginDescriptionFile("Essentials", "", "com.earth2me.essentials.Essentials"), null, null);
super(new JavaPluginLoader(server), new PluginDescriptionFile("Essentials", "", "Essentials"), null, null);
}
@Override
@@ -393,7 +393,7 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
@Override
public boolean onCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args)
{
return onCommandEssentials(sender, command, commandLabel, args, Essentials.class.getClassLoader(), "com.earth2me.essentials.commands.Command", "essentials.", null);
return onCommandEssentials(sender, command, commandLabel, args, Essentials.class.getClassLoader(), "org.mcess.essentials.commands.Command", "essentials.", null);
}
@Override

View File

@@ -1,9 +1,8 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.utils.LocationUtil;
import org.mcess.essentials.utils.LocationUtil;
import java.util.Locale;
import net.ess3.api.IEssentials;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import org.bukkit.block.CreatureSpawner;

View File

@@ -1,6 +1,5 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.google.common.io.Files;
import java.io.*;
import java.math.BigDecimal;
@@ -59,7 +58,7 @@ public class EssentialsConf extends YamlConfiguration
{
if (!configFile.getParentFile().mkdirs())
{
LOGGER.log(Level.SEVERE, tl("failedToCreateConfig", configFile.toString()));
LOGGER.log(Level.SEVERE, I18n.tl("failedToCreateConfig", configFile.toString()));
}
}
// This will delete files where the first character is 0. In most cases they are broken.
@@ -110,7 +109,7 @@ public class EssentialsConf extends YamlConfiguration
}
else if (templateName != null)
{
LOGGER.log(Level.INFO, tl("creatingConfigFromTemplate", configFile.toString()));
LOGGER.log(Level.INFO, I18n.tl("creatingConfigFromTemplate", configFile.toString()));
createFromTemplate();
}
else
@@ -219,7 +218,7 @@ public class EssentialsConf extends YamlConfiguration
istr = resourceClass.getResourceAsStream(templateName);
if (istr == null)
{
LOGGER.log(Level.SEVERE, tl("couldNotFindTemplate", templateName));
LOGGER.log(Level.SEVERE, I18n.tl("couldNotFindTemplate", templateName));
return;
}
ostr = new FileOutputStream(configFile);
@@ -234,7 +233,7 @@ public class EssentialsConf extends YamlConfiguration
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, tl("failedToWriteConfig", configFile.toString()), ex);
LOGGER.log(Level.SEVERE, I18n.tl("failedToWriteConfig", configFile.toString()), ex);
}
finally
{
@@ -258,7 +257,7 @@ public class EssentialsConf extends YamlConfiguration
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, tl("failedToCloseConfig", configFile.toString()), ex);
LOGGER.log(Level.SEVERE, I18n.tl("failedToCloseConfig", configFile.toString()), ex);
}
}
}
@@ -398,16 +397,16 @@ public class EssentialsConf extends YamlConfiguration
{
try
{
LOGGER.log(Level.INFO, tl("creatingEmptyConfig", configFile.toString()));
LOGGER.log(Level.INFO, I18n.tl("creatingEmptyConfig", configFile.toString()));
if (!configFile.createNewFile())
{
LOGGER.log(Level.SEVERE, tl("failedToCreateConfig", configFile.toString()));
LOGGER.log(Level.SEVERE, I18n.tl("failedToCreateConfig", configFile.toString()));
return;
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, tl("failedToCreateConfig", configFile.toString()), ex);
LOGGER.log(Level.SEVERE, I18n.tl("failedToCreateConfig", configFile.toString()), ex);
return;
}
}

View File

@@ -1,6 +1,5 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -152,7 +151,7 @@ public class EssentialsEntityListener implements Listener
if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back"))
{
user.setLastLocation();
user.sendMessage(tl("backAfterDeath"));
user.sendMessage(I18n.tl("backAfterDeath"));
}
if (!ess.getSettings().areDeathMessagesEnabled())
{

View File

@@ -1,11 +1,10 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.TextInput;
import com.earth2me.essentials.textreader.TextPager;
import com.earth2me.essentials.utils.LocationUtil;
import org.mcess.essentials.textreader.IText;
import org.mcess.essentials.textreader.KeywordReplacer;
import org.mcess.essentials.textreader.TextInput;
import org.mcess.essentials.textreader.TextPager;
import org.mcess.essentials.utils.LocationUtil;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
@@ -29,7 +28,6 @@ import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
public class EssentialsPlayerListener implements Listener
@@ -62,8 +60,8 @@ public class EssentialsPlayerListener implements Listener
if (user.isMuted())
{
event.setCancelled(true);
user.sendMessage(tl("voiceSilenced"));
LOGGER.info(tl("mutedUserSpeaks", user.getName()));
user.sendMessage(I18n.tl("voiceSilenced"));
LOGGER.info(I18n.tl("mutedUserSpeaks", user.getName()));
}
try
{
@@ -324,11 +322,11 @@ public class EssentialsPlayerListener implements Listener
final List<String> mail = user.getMails();
if (mail.isEmpty())
{
user.sendMessage(tl("noNewMail"));
user.sendMessage(I18n.tl("noNewMail"));
}
else
{
user.sendMessage(tl("youHaveNewMail", mail.size()));
user.sendMessage(I18n.tl("youHaveNewMail", mail.size()));
}
}
@@ -339,7 +337,7 @@ public class EssentialsPlayerListener implements Listener
{
user.getBase().setAllowFlight(true);
user.getBase().setFlying(true);
user.getBase().sendMessage(tl("flyMode", tl("enabled"), user.getDisplayName()));
user.getBase().sendMessage(I18n.tl("flyMode", I18n.tl("enabled"), user.getDisplayName()));
}
}
@@ -383,7 +381,7 @@ public class EssentialsPlayerListener implements Listener
event.allow();
return;
}
event.disallow(Result.KICK_FULL, tl("serverFull"));
event.disallow(Result.KICK_FULL, I18n.tl("serverFull"));
break;
default:
break;
@@ -477,12 +475,12 @@ public class EssentialsPlayerListener implements Listener
updateCompass(user);
if (ess.getSettings().getNoGodWorlds().contains(newWorld) && user.isGodModeEnabledRaw())
{
user.sendMessage(tl("noGodWorldWarning"));
user.sendMessage(I18n.tl("noGodWorldWarning"));
}
if (!user.getWorld().getName().equals(newWorld))
{
user.sendMessage(tl("currentWorld", newWorld));
user.sendMessage(I18n.tl("currentWorld", newWorld));
}
if (user.isVanished())
{
@@ -502,7 +500,7 @@ public class EssentialsPlayerListener implements Listener
if (player.isAuthorized("essentials.sethome.bed"))
{
player.getBase().setBedSpawnLocation(event.getClickedBlock().getLocation());
player.sendMessage(tl("bedSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()));
player.sendMessage(I18n.tl("bedSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()));
}
}
break;

View File

@@ -1,7 +1,7 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import org.mcess.essentials.perm.PermissionsHandler;
import org.mcess.essentials.register.payment.Methods;
import java.util.logging.Level;
import net.ess3.api.IEssentials;
import org.bukkit.event.EventHandler;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import java.util.HashSet;
import java.util.Iterator;

View File

@@ -1,11 +1,10 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.craftbukkit.BanLookup;
import com.earth2me.essentials.craftbukkit.FakeWorld;
import com.earth2me.essentials.settings.Spawns;
import com.earth2me.essentials.storage.YamlStorageWriter;
import com.earth2me.essentials.utils.StringUtil;
import org.mcess.essentials.craftbukkit.BanLookup;
import org.mcess.essentials.craftbukkit.FakeWorld;
import org.mcess.essentials.settings.Spawns;
import org.mcess.essentials.storage.YamlStorageWriter;
import org.mcess.essentials.utils.StringUtil;
import com.google.common.base.Charsets;
import java.io.*;
import java.math.BigInteger;
@@ -19,6 +18,7 @@ import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.mcess.essentials.settings.Jails;
public class EssentialsUpgrade
@@ -78,7 +78,7 @@ public class EssentialsUpgrade
}
catch (IOException e)
{
LOGGER.log(Level.SEVERE, tl("upgradingFilesError"), e);
LOGGER.log(Level.SEVERE, I18n.tl("upgradingFilesError"), e);
}
}
@@ -128,11 +128,11 @@ public class EssentialsUpgrade
{
if (!file.renameTo(new File(file.getParentFile(), file.getName().concat("." + System.currentTimeMillis() + ".upgradebackup"))))
{
throw new Exception(tl("configFileMoveError"));
throw new Exception(I18n.tl("configFileMoveError"));
}
if (!tempFile.renameTo(file))
{
throw new Exception(tl("configFileRenameError"));
throw new Exception(I18n.tl("configFileRenameError"));
}
}
else
@@ -296,17 +296,17 @@ public class EssentialsUpgrade
final File newFile = new File(listOfFile.getParentFile(), sanitizedFilename);
if (!listOfFile.renameTo(tmpFile))
{
LOGGER.log(Level.WARNING, tl("userdataMoveError", filename, sanitizedFilename));
LOGGER.log(Level.WARNING, I18n.tl("userdataMoveError", filename, sanitizedFilename));
continue;
}
if (newFile.exists())
{
LOGGER.log(Level.WARNING, tl("duplicatedUserdata", filename, sanitizedFilename));
LOGGER.log(Level.WARNING, I18n.tl("duplicatedUserdata", filename, sanitizedFilename));
continue;
}
if (!tmpFile.renameTo(newFile))
{
LOGGER.log(Level.WARNING, tl("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
LOGGER.log(Level.WARNING, I18n.tl("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
}
}
doneFile.setProperty("sanitizeAllUserFilenames", true);
@@ -416,7 +416,7 @@ public class EssentialsUpgrade
}
if (!configFile.renameTo(new File(ess.getDataFolder(), "spawn.yml.old")))
{
throw new Exception(tl("fileRenameError", "spawn.yml"));
throw new Exception(I18n.tl("fileRenameError", "spawn.yml"));
}
PrintWriter writer = new PrintWriter(configFile);
try
@@ -454,7 +454,7 @@ public class EssentialsUpgrade
config.load();
if (!config.hasProperty("jails"))
{
final com.earth2me.essentials.settings.Jails jails = new com.earth2me.essentials.settings.Jails();
final org.mcess.essentials.settings.Jails jails = new Jails();
Set<String> keys = config.getKeys(false);
for (String jailName : keys)
{
@@ -463,7 +463,7 @@ public class EssentialsUpgrade
}
if (!configFile.renameTo(new File(ess.getDataFolder(), "jail.yml.old")))
{
throw new Exception(tl("fileRenameError", "jail.yml"));
throw new Exception(I18n.tl("fileRenameError", "jail.yml"));
}
PrintWriter writer = new PrintWriter(configFile);
try

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.google.common.base.Charsets;
import com.google.common.io.Files;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import java.io.File;
import java.io.FileInputStream;
@@ -12,7 +12,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import net.ess3.api.IEssentials;
import org.bukkit.Bukkit;
public class I18n implements net.ess3.api.II18n

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
public interface IConf
{

View File

@@ -1,11 +1,11 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.api.IItemDb;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.api.IWarps;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import org.mcess.essentials.api.IItemDb;
import org.mcess.essentials.api.IJails;
import org.mcess.essentials.api.IWarps;
import org.mcess.essentials.metrics.Metrics;
import org.mcess.essentials.perm.PermissionsHandler;
import org.mcess.essentials.register.payment.Methods;
import java.util.Collection;
import java.util.List;
import java.util.UUID;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
public interface IEssentialsModule

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
public interface IReplyTo
{

View File

@@ -1,8 +1,8 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.signs.EssentialsSign;
import com.earth2me.essentials.textreader.IText;
import org.mcess.essentials.commands.IEssentialsCommand;
import org.mcess.essentials.signs.EssentialsSign;
import org.mcess.essentials.textreader.IText;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import org.bukkit.Location;

View File

@@ -1,6 +1,6 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import org.mcess.essentials.commands.IEssentialsCommand;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

View File

@@ -1,8 +1,7 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.NumberUtil;
import com.earth2me.essentials.utils.StringUtil;
import org.mcess.essentials.utils.NumberUtil;
import org.mcess.essentials.utils.StringUtil;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -143,20 +142,20 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb
}
catch (Throwable throwable)
{
throw new Exception(tl("unknownItemName", itemname), throwable);
throw new Exception(I18n.tl("unknownItemName", itemname), throwable);
}
}
}
if (itemid < 1)
{
throw new Exception(tl("unknownItemName", itemname));
throw new Exception(I18n.tl("unknownItemName", itemname));
}
final Material mat = Material.getMaterial(itemid);
if (mat == null)
{
throw new Exception(tl("unknownItemId", itemid));
throw new Exception(I18n.tl("unknownItemId", itemid));
}
final ItemStack retval = new ItemStack(mat);
retval.setAmount(mat.getMaxStackSize());
@@ -206,7 +205,7 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb
if (is.isEmpty() || is.get(0).getType() == Material.AIR)
{
throw new Exception(tl("itemSellAir"));
throw new Exception(I18n.tl("itemSellAir"));
}
return is;

View File

@@ -1,7 +1,6 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.storage.AsyncStorageObjectHolder;
import org.mcess.essentials.storage.AsyncStorageObjectHolder;
import java.io.File;
import java.util.*;
import java.util.logging.Level;
@@ -29,14 +28,14 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.plugin.PluginManager;
public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.settings.Jails> implements net.ess3.api.IJails
public class Jails extends AsyncStorageObjectHolder<org.mcess.essentials.settings.Jails> implements net.ess3.api.IJails
{
private static final transient Logger LOGGER = Bukkit.getLogger();
private static transient boolean enabled = false;
public Jails(final IEssentials ess)
{
super(ess, com.earth2me.essentials.settings.Jails.class);
super(ess, org.mcess.essentials.settings.Jails.class);
reloadConfig();
}
@@ -93,12 +92,12 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
if (getData().getJails() == null || jailName == null
|| !getData().getJails().containsKey(jailName.toLowerCase(Locale.ENGLISH)))
{
throw new Exception(tl("jailNotExist"));
throw new Exception(I18n.tl("jailNotExist"));
}
Location loc = getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
if (loc == null || loc.getWorld() == null)
{
throw new Exception(tl("jailNotExist"));
throw new Exception(I18n.tl("jailNotExist"));
}
return loc;
}
@@ -272,11 +271,11 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
LOGGER.log(Level.INFO, I18n.tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
LOGGER.log(Level.INFO, I18n.tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
}
@@ -298,14 +297,14 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
LOGGER.log(Level.INFO, I18n.tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
LOGGER.log(Level.INFO, I18n.tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(tl("jailMessage"));
user.sendMessage(I18n.tl("jailMessage"));
}
@EventHandler(priority = EventPriority.HIGHEST)
@@ -327,14 +326,14 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
LOGGER.log(Level.INFO, I18n.tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
LOGGER.log(Level.INFO, I18n.tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(tl("jailMessage"));
user.sendMessage(I18n.tl("jailMessage"));
}
}
}

View File

@@ -1,15 +1,12 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import static com.earth2me.essentials.I18n.capitalCase;
import com.earth2me.essentials.Trade.OverflowType;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.SimpleTextInput;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.commands.NoChargeException;
import org.mcess.essentials.craftbukkit.InventoryWorkaround;
import org.mcess.essentials.textreader.IText;
import org.mcess.essentials.textreader.KeywordReplacer;
import org.mcess.essentials.textreader.SimpleTextInput;
import org.mcess.essentials.utils.DateUtil;
import org.mcess.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import java.util.*;
import java.util.logging.Level;
@@ -35,7 +32,7 @@ public class Kit
if (kit == null)
{
throw new Exception(tl("kitNotFound"));
throw new Exception(I18n.tl("kitNotFound"));
}
}
@@ -50,22 +47,22 @@ public class Kit
{
if (user == null)
{
list.append(" ").append(capitalCase(kitItem));
list.append(" ").append(I18n.capitalCase(kitItem));
}
else if (user.isAuthorized("essentials.kits." + kitItem.toLowerCase(Locale.ENGLISH)))
{
String cost = "";
String name = capitalCase(kitItem);
String name = I18n.capitalCase(kitItem);
BigDecimal costPrice = new Trade("kit-" + kitItem.toLowerCase(Locale.ENGLISH), ess).getCommandCost(user);
if (costPrice.signum() > 0)
{
cost = tl("kitCost", NumberUtil.displayCurrency(costPrice, ess));
cost = I18n.tl("kitCost", NumberUtil.displayCurrency(costPrice, ess));
}
Kit kit = new Kit(kitItem, ess);
if (kit.getNextUse(user) != 0)
{
name = tl("kitDelay", name);
name = I18n.tl("kitDelay", name);
}
list.append(" ").append(name).append(cost);
@@ -75,7 +72,7 @@ public class Kit
}
catch (Exception ex)
{
throw new Exception(tl("kitError"), ex);
throw new Exception(I18n.tl("kitError"), ex);
}
}
@@ -89,7 +86,7 @@ public class Kit
{
if (!user.isAuthorized("essentials.kits." + kitName))
{
throw new Exception(tl("noKitPermission", "essentials.kits." + kitName));
throw new Exception(I18n.tl("noKitPermission", "essentials.kits." + kitName));
}
}
@@ -103,12 +100,12 @@ public class Kit
}
else if (nextUse < 0L)
{
user.sendMessage(tl("kitOnce"));
user.sendMessage(I18n.tl("kitOnce"));
throw new NoChargeException();
}
else
{
user.sendMessage(tl("kitTimed", DateUtil.formatDateDiff(nextUse)));
user.sendMessage(I18n.tl("kitTimed", DateUtil.formatDateDiff(nextUse)));
throw new NoChargeException();
}
}
@@ -146,7 +143,7 @@ public class Kit
}
catch (Exception e)
{
throw new Exception(tl("kitError2"));
throw new Exception(I18n.tl("kitError2"));
}
// When was the last kit used?
@@ -184,7 +181,7 @@ public class Kit
{
if (kit == null)
{
throw new Exception(tl("kitNotFound"));
throw new Exception(I18n.tl("kitNotFound"));
}
try
{
@@ -208,7 +205,7 @@ public class Kit
catch (Exception e)
{
ess.getLogger().log(Level.WARNING, "Error parsing kit " + kitName + ": " + e.getMessage());
throw new Exception(tl("kitError2"), e);
throw new Exception(I18n.tl("kitError2"), e);
}
}
@@ -232,7 +229,7 @@ public class Kit
{
BigDecimal value = new BigDecimal(kitItem.substring(ess.getSettings().getCurrencySymbol().length()).trim());
Trade t = new Trade(value, ess);
t.pay(user, OverflowType.DROP);
t.pay(user, Trade.OverflowType.DROP);
continue;
}
@@ -280,14 +277,14 @@ public class Kit
user.getBase().updateInventory();
if (spew)
{
user.sendMessage(tl("kitInvFull"));
user.sendMessage(I18n.tl("kitInvFull"));
}
}
catch (Exception e)
{
user.getBase().updateInventory();
ess.getLogger().log(Level.WARNING, e.getMessage());
throw new Exception(tl("kitError2"), e);
throw new Exception(I18n.tl("kitError2"), e);
}
}
}

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import org.bukkit.Location;

View File

@@ -1,6 +1,5 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.io.*;
import java.math.BigInteger;
import java.security.DigestInputStream;
@@ -47,7 +46,7 @@ public class ManagedFile
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.SEVERE, tl("itemsCsvNotLoaded"), ex);
Bukkit.getLogger().log(Level.SEVERE, I18n.tl("itemsCsvNotLoaded"), ex);
}
}
}

View File

@@ -1,11 +1,10 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.textreader.BookInput;
import com.earth2me.essentials.textreader.BookPager;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.utils.FormatUtil;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.textreader.BookInput;
import org.mcess.essentials.textreader.BookPager;
import org.mcess.essentials.textreader.IText;
import org.mcess.essentials.utils.FormatUtil;
import org.mcess.essentials.utils.NumberUtil;
import java.util.*;
import java.util.regex.Pattern;
@@ -143,7 +142,7 @@ public class MetaItemStack
}
catch (NoSuchMethodError nsme)
{
throw new Exception(tl("noMetaJson"), nsme);
throw new Exception(I18n.tl("noMetaJson"), nsme);
}
catch (Throwable throwable)
{
@@ -160,14 +159,14 @@ public class MetaItemStack
{
if (!hasMetaPermission(sender, "firework", true, true, ess))
{
throw new Exception(tl("noMetaFirework"));
throw new Exception(I18n.tl("noMetaFirework"));
}
FireworkEffect effect = builder.build();
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
fmeta.addEffect(effect);
if (fmeta.getEffects().size() > 1 && !hasMetaPermission(sender, "firework-multiple", true, true, ess))
{
throw new Exception(tl("multipleCharges"));
throw new Exception(I18n.tl("multipleCharges"));
}
stack.setItemMeta(fmeta);
}
@@ -211,7 +210,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("onlyPlayerSkulls"));
throw new Exception(I18n.tl("onlyPlayerSkulls"));
}
}
else if (split.length > 1 && split[0].equalsIgnoreCase("book") && stack.getType() == Material.WRITTEN_BOOK
@@ -272,7 +271,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("leatherSyntax"));
throw new Exception(I18n.tl("leatherSyntax"));
}
}
else
@@ -298,14 +297,14 @@ public class MetaItemStack
{
if (!hasMetaPermission(sender, "firework", true, true, ess))
{
throw new Exception(tl("noMetaFirework"));
throw new Exception(I18n.tl("noMetaFirework"));
}
FireworkEffect effect = builder.build();
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
fmeta.addEffect(effect);
if (fmeta.getEffects().size() > 1 && !hasMetaPermission(sender, "firework-multiple", true, true, ess))
{
throw new Exception(tl("multipleCharges"));
throw new Exception(I18n.tl("multipleCharges"));
}
stack.setItemMeta(fmeta);
builder = FireworkEffect.builder();
@@ -322,7 +321,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
throw new Exception(I18n.tl("invalidFireworkFormat", split[1], split[0]));
}
}
builder.withColor(primaryColors);
@@ -337,7 +336,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
throw new Exception(I18n.tl("invalidFireworkFormat", split[1], split[0]));
}
if (finalEffect != null)
{
@@ -356,7 +355,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
throw new Exception(I18n.tl("invalidFireworkFormat", split[1], split[0]));
}
}
if (!fadeColors.isEmpty())
@@ -379,7 +378,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
throw new Exception(I18n.tl("invalidFireworkFormat", split[1], split[0]));
}
}
}
@@ -408,12 +407,12 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("noPotionEffectPerm", pEffectType.getName().toLowerCase(Locale.ENGLISH)));
throw new Exception(I18n.tl("noPotionEffectPerm", pEffectType.getName().toLowerCase(Locale.ENGLISH)));
}
}
else
{
throw new Exception(tl("invalidPotionMeta", split[1]));
throw new Exception(I18n.tl("invalidPotionMeta", split[1]));
}
}
else if (split[0].equalsIgnoreCase("power") || (allowShortName && split[0].equalsIgnoreCase("p")))
@@ -429,7 +428,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("invalidPotionMeta", split[1]));
throw new Exception(I18n.tl("invalidPotionMeta", split[1]));
}
}
else if (split[0].equalsIgnoreCase("duration") || (allowShortName && split[0].equalsIgnoreCase("d")))
@@ -441,7 +440,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("invalidPotionMeta", split[1]));
throw new Exception(I18n.tl("invalidPotionMeta", split[1]));
}
}
@@ -451,7 +450,7 @@ public class MetaItemStack
pEffect = pEffectType.createEffect(duration, power);
if (pmeta.getCustomEffects().size() > 1 && !hasMetaPermission(sender, "potions.multiple", true, false, ess))
{
throw new Exception(tl("multiplePotionEffects"));
throw new Exception(I18n.tl("multiplePotionEffects"));
}
pmeta.addCustomEffect(pEffect, true);
stack.setItemMeta(pmeta);
@@ -492,7 +491,7 @@ public class MetaItemStack
{
if (enchantment == null)
{
throw new Exception(tl("enchantmentNotFound"));
throw new Exception(I18n.tl("enchantmentNotFound"));
}
try
{
@@ -546,7 +545,7 @@ public class MetaItemStack
if (!hasMetaPermission(user, "enchantments." + enchantmentName, true, false))
{
throw new Exception(tl("enchantmentPerm", enchantmentName));
throw new Exception(I18n.tl("enchantmentPerm", enchantmentName));
}
return enchantment;
}
@@ -571,7 +570,7 @@ public class MetaItemStack
}
else
{
throw new Exception(tl("noMetaPerm", metaPerm));
throw new Exception(I18n.tl("noMetaPerm", metaPerm));
}
}
}

View File

@@ -1,6 +1,6 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import static org.mcess.essentials.I18n.tl;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;

View File

@@ -1,7 +1,6 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.StringUtil;
import org.mcess.essentials.utils.StringUtil;
import java.util.*;
import java.util.logging.Logger;
import org.bukkit.DyeColor;
@@ -286,7 +285,7 @@ public enum MobData
}
catch (Exception e)
{
throw new Exception(tl("sheepMalformedColor"), e);
throw new Exception(I18n.tl("sheepMalformedColor"), e);
}
}
else if (this.value.equals(Data.EXP))
@@ -298,7 +297,7 @@ public enum MobData
}
catch (NumberFormatException e)
{
throw new Exception(tl("invalidNumber"), e);
throw new Exception(I18n.tl("invalidNumber"), e);
}
}
else if (this.value.equals(Data.SIZE))
@@ -310,7 +309,7 @@ public enum MobData
}
catch (NumberFormatException e)
{
throw new Exception(tl("slimeMalformedSize"), e);
throw new Exception(I18n.tl("slimeMalformedSize"), e);
}
}
else if (this.value instanceof Horse.Color)

View File

@@ -1,6 +1,5 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.net.InetSocketAddress;
import java.util.*;
import org.bukkit.*;
@@ -187,25 +186,25 @@ public class OfflinePlayer implements Player
@Override
public int getRemainingAir()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setRemainingAir(int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getMaximumAir()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setMaximumAir(int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
@@ -217,73 +216,73 @@ public class OfflinePlayer implements Player
@Override
public void setSneaking(boolean bln)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void updateInventory()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void chat(String string)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public double getEyeHeight()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public double getEyeHeight(boolean bln)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public List<Block> getLineOfSight(HashSet<Byte> hs, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public Block getTargetBlock(HashSet<Byte> hs, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public List<Block> getLastTwoTargetBlocks(HashSet<Byte> hs, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getFireTicks()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getMaxFireTicks()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setFireTicks(int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void remove()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
@@ -294,168 +293,168 @@ public class OfflinePlayer implements Player
public Vector getMomentum()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
public void setMomentum(Vector vector)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setVelocity(Vector vector)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public Vector getVelocity()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void damage(double d)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void damage(double d, Entity entity)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public Location getEyeLocation()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void sendRawMessage(String string)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public Location getCompassTarget()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getMaximumNoDamageTicks()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setMaximumNoDamageTicks(int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public double getLastDamage()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setLastDamage(double d)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getNoDamageTicks()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setNoDamageTicks(int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean teleport(Location lctn)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean teleport(Entity entity)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public Entity getPassenger()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean setPassenger(Entity entity)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean isEmpty()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean eject()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void saveData()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void loadData()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean isSleeping()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getSleepTicks()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public List<Entity> getNearbyEntities(double d, double d1, double d2)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean isDead()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public float getFallDistance()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
@@ -466,175 +465,175 @@ public class OfflinePlayer implements Player
@Override
public void setSleepingIgnored(boolean bln)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean isSleepingIgnored()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void awardAchievement(Achievement a)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void removeAchievement(Achievement achievement)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public boolean hasAchievement(Achievement achievement)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void decrementStatistic(Statistic statistic) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void decrementStatistic(Statistic statistic, int i) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setStatistic(Statistic statistic, int i) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getStatistic(Statistic statistic) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc, Material mtrl)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void decrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getStatistic(Statistic statistic, Material material) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic ststc, Material mtrl, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void decrementStatistic(Statistic statistic, Material material, int i) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setStatistic(Statistic statistic, Material material, int i) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void decrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public int getStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void incrementStatistic(Statistic statistic, EntityType entityType, int i) throws IllegalArgumentException
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void decrementStatistic(Statistic statistic, EntityType entityType, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setStatistic(Statistic statistic, EntityType entityType, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void playNote(Location lctn, byte b, byte b1)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void sendBlockChange(Location lctn, Material mtrl, byte b)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void sendBlockChange(Location lctn, int i, byte b)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void setLastDamageCause(EntityDamageEvent ede)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public EntityDamageEvent getLastDamageCause()
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override
public void playEffect(Location lctn, Effect effect, int i)
{
throw new UnsupportedOperationException(tl("notSupportedYet"));
throw new UnsupportedOperationException(I18n.tl("notSupportedYet"));
}
@Override

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import org.bukkit.Location;
import org.bukkit.Server;

View File

@@ -1,7 +1,6 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.FormatUtil;
import org.mcess.essentials.utils.FormatUtil;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -10,7 +9,6 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class PlayerList
@@ -30,11 +28,11 @@ public class PlayerList
needComma = true;
if (user.isAfk())
{
groupString.append(tl("listAfkTag"));
groupString.append(I18n.tl("listAfkTag"));
}
if (user.isHidden())
{
groupString.append(tl("listHiddenTag"));
groupString.append(I18n.tl("listHiddenTag"));
}
user.setDisplayNick();
groupString.append(user.getDisplayName());
@@ -63,11 +61,11 @@ public class PlayerList
String online;
if (hiddenCount > 0)
{
online = tl("listAmountHidden", ess.getOnlinePlayers().size() - playerHidden, hiddenCount, server.getMaxPlayers());
online = I18n.tl("listAmountHidden", ess.getOnlinePlayers().size() - playerHidden, hiddenCount, server.getMaxPlayers());
}
else
{
online = tl("listAmount", ess.getOnlinePlayers().size() - playerHidden, server.getMaxPlayers());
online = I18n.tl("listAmount", ess.getOnlinePlayers().size() - playerHidden, server.getMaxPlayers());
}
return online;
}
@@ -137,7 +135,7 @@ public class PlayerList
}
if (users == null || users.isEmpty())
{
throw new Exception(tl("groupDoesNotExist"));
throw new Exception(I18n.tl("groupDoesNotExist"));
}
final StringBuilder displayGroupName = new StringBuilder();
displayGroupName.append(Character.toTitleCase(groupName.charAt(0)));
@@ -149,7 +147,7 @@ public class PlayerList
public static String outputFormat(final String group, final String message)
{
final StringBuilder outputString = new StringBuilder();
outputString.append(tl("listGroupTag", FormatUtil.replaceFormat(group)));
outputString.append(I18n.tl("listGroupTag", FormatUtil.replaceFormat(group)));
outputString.append(message);
return outputString.toString();
}

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import org.bukkit.Bukkit;
import org.bukkit.Location;

View File

@@ -1,6 +1,6 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.utils.NumberUtil;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

View File

@@ -1,12 +1,12 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.signs.EssentialsSign;
import com.earth2me.essentials.signs.Signs;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.SimpleTextInput;
import com.earth2me.essentials.utils.FormatUtil;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.commands.IEssentialsCommand;
import org.mcess.essentials.signs.EssentialsSign;
import org.mcess.essentials.signs.Signs;
import org.mcess.essentials.textreader.IText;
import org.mcess.essentials.textreader.SimpleTextInput;
import org.mcess.essentials.utils.FormatUtil;
import java.io.File;
import java.math.BigDecimal;
import java.util.*;
@@ -14,7 +14,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
import org.bukkit.ChatColor;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.MemoryConfiguration;
import org.bukkit.event.EventPriority;

View File

@@ -1,9 +1,7 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.Mob.MobException;
import com.earth2me.essentials.utils.LocationUtil;
import com.earth2me.essentials.utils.StringUtil;
import org.mcess.essentials.utils.LocationUtil;
import org.mcess.essentials.utils.StringUtil;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -34,7 +32,7 @@ public class SpawnMob
}
if (availableList.isEmpty())
{
availableList.add(tl("none"));
availableList.add(I18n.tl("none"));
}
return StringUtil.joinList(availableList);
}
@@ -88,7 +86,7 @@ public class SpawnMob
final Block block = LocationUtil.getTarget(user.getBase()).getBlock();
if (block == null)
{
throw new Exception(tl("unableToSpawnMob"));
throw new Exception(I18n.tl("unableToSpawnMob"));
}
spawnmob(ess, server, user.getSource(), user, block.getLocation(), parts, data, mobCount);
}
@@ -125,7 +123,7 @@ public class SpawnMob
if (mobCount > effectiveLimit)
{
mobCount = effectiveLimit;
sender.sendMessage(tl("mobSpawnLimit"));
sender.sendMessage(I18n.tl("mobSpawnLimit"));
}
Mob mob = Mob.fromName(parts.get(0)); // Get the first mob
@@ -135,19 +133,19 @@ public class SpawnMob
{
spawnMob(ess, server, sender, target, sloc, parts, data);
}
sender.sendMessage(mobCount * parts.size() + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + tl("spawned"));
sender.sendMessage(mobCount * parts.size() + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + I18n.tl("spawned"));
}
catch (MobException e1)
catch (Mob.MobException e1)
{
throw new Exception(tl("unableToSpawnMob"), e1);
throw new Exception(I18n.tl("unableToSpawnMob"), e1);
}
catch (NumberFormatException e2)
{
throw new Exception(tl("numberRequired"), e2);
throw new Exception(I18n.tl("numberRequired"), e2);
}
catch (NullPointerException np)
{
throw new Exception(tl("soloMob"), np);
throw new Exception(I18n.tl("soloMob"), np);
}
}
@@ -194,17 +192,17 @@ public class SpawnMob
{
if (mob == null)
{
throw new Exception(tl("invalidMob"));
throw new Exception(I18n.tl("invalidMob"));
}
if (ess.getSettings().getProtectPreventSpawn(mob.getType().toString().toLowerCase(Locale.ENGLISH)))
{
throw new Exception(tl("disabledToSpawnMob"));
throw new Exception(I18n.tl("disabledToSpawnMob"));
}
if (sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.spawnmob." + mob.name.toLowerCase(Locale.ENGLISH)))
{
throw new Exception(tl("noPermToSpawnMob"));
throw new Exception(I18n.tl("noPermToSpawnMob"));
}
}
@@ -214,7 +212,7 @@ public class SpawnMob
if (data.isEmpty())
{
sender.sendMessage(tl("mobDataList", StringUtil.joinList(MobData.getValidHelp(spawned))));
sender.sendMessage(I18n.tl("mobDataList", StringUtil.joinList(MobData.getValidHelp(spawned))));
}
if (spawned instanceof Zombie)

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import net.ess3.api.IEssentials;
import org.bukkit.entity.LivingEntity;

View File

@@ -1,8 +1,7 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.LocationUtil;
import org.mcess.essentials.utils.DateUtil;
import org.mcess.essentials.utils.LocationUtil;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.GregorianCalendar;
@@ -54,7 +53,7 @@ public class Teleport implements net.ess3.api.ITeleport
time.setTimeInMillis(lastTime);
time.add(Calendar.SECOND, (int)cooldown);
time.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
throw new Exception(tl("timeBeforeTeleport", DateUtil.formatDateDiff(time.getTimeInMillis())));
throw new Exception(I18n.tl("timeBeforeTeleport", DateUtil.formatDateDiff(time.getTimeInMillis())));
}
}
// if justCheck is set, don't update lastTeleport; we're just checking
@@ -69,7 +68,7 @@ public class Teleport implements net.ess3.api.ITeleport
Calendar c = new GregorianCalendar();
c.add(Calendar.SECOND, (int)delay);
c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
user.sendMessage(tl("dontMoveMessage", DateUtil.formatDateDiff(c.getTimeInMillis())));
user.sendMessage(I18n.tl("dontMoveMessage", DateUtil.formatDateDiff(c.getTimeInMillis())));
}
//The now function is used when you want to skip tp delay when teleporting someone to a location or player.
@@ -93,7 +92,7 @@ public class Teleport implements net.ess3.api.ITeleport
}
final ITarget target = new PlayerTarget(entity);
now(teleportOwner, target, cause);
teleportOwner.sendMessage(tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
teleportOwner.sendMessage(I18n.tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
}
protected void now(IUser teleportee, ITarget target, TeleportCause cause) throws Exception
@@ -114,7 +113,7 @@ public class Teleport implements net.ess3.api.ITeleport
}
else
{
throw new Exception(tl("unsafeTeleportDestination", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
throw new Exception(I18n.tl("unsafeTeleportDestination", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
}
else
@@ -147,7 +146,7 @@ public class Teleport implements net.ess3.api.ITeleport
public void teleport(Player entity, Trade chargeFor, TeleportCause cause) throws Exception
{
ITarget target = new PlayerTarget(entity);
teleportOwner.sendMessage(tl("teleportToPlayer", entity.getDisplayName()));
teleportOwner.sendMessage(I18n.tl("teleportToPlayer", entity.getDisplayName()));
teleport(teleportOwner, target, chargeFor, cause);
}
@@ -164,8 +163,8 @@ public class Teleport implements net.ess3.api.ITeleport
{
ITarget target = new PlayerTarget(entity);
teleport(teleportee, target, chargeFor, cause);
teleportee.sendMessage(tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
teleportOwner.sendMessage(tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
teleportee.sendMessage(I18n.tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
teleportOwner.sendMessage(I18n.tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
}
private void teleport(IUser teleportee, ITarget target, Trade chargeFor, TeleportCause cause) throws Exception
@@ -255,10 +254,10 @@ public class Teleport implements net.ess3.api.ITeleport
public void warp(IUser teleportee, String warp, Trade chargeFor, TeleportCause cause) throws Exception
{
Location loc = ess.getWarps().getWarp(warp);
teleportee.sendMessage(tl("warpingTo", warp, loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
teleportee.sendMessage(I18n.tl("warpingTo", warp, loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
if (!teleportee.equals(teleportOwner))
{
teleportOwner.sendMessage(tl("warpingTo", warp, loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
teleportOwner.sendMessage(I18n.tl("warpingTo", warp, loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
teleport(teleportee, new LocationTarget(loc), chargeFor, cause);
}
@@ -268,7 +267,7 @@ public class Teleport implements net.ess3.api.ITeleport
public void back(Trade chargeFor) throws Exception
{
final Location loc = teleportOwner.getLastLocation();
teleportOwner.sendMessage(tl("backUsageMsg", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
teleportOwner.sendMessage(I18n.tl("backUsageMsg", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
teleport(teleportOwner, new LocationTarget(loc), chargeFor, TeleportCause.COMMAND);
}

View File

@@ -1,6 +1,5 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.util.UUID;
import net.ess3.api.IEssentials;
import net.ess3.api.IUser;
@@ -105,16 +104,16 @@ public class TimedTeleport implements Runnable
}
catch (Exception ex)
{
teleportOwner.sendMessage(tl("cooldownWithMessage", ex.getMessage()));
teleportOwner.sendMessage(I18n.tl("cooldownWithMessage", ex.getMessage()));
if (teleportOwner != teleportUser)
{
teleportUser.sendMessage(tl("cooldownWithMessage", ex.getMessage()));
teleportUser.sendMessage(I18n.tl("cooldownWithMessage", ex.getMessage()));
}
}
try
{
cancelTimer(false);
teleportUser.sendMessage(tl("teleportationCommencing"));
teleportUser.sendMessage(I18n.tl("teleportationCommencing"));
try
{
@@ -162,10 +161,10 @@ public class TimedTeleport implements Runnable
ess.getServer().getScheduler().cancelTask(timer_task);
if (notifyUser)
{
teleportOwner.sendMessage(tl("pendingTeleportCancelled"));
teleportOwner.sendMessage(I18n.tl("pendingTeleportCancelled"));
if (timer_teleportee != null && !timer_teleportee.equals(teleportOwner.getBase().getUniqueId()))
{
ess.getUser(timer_teleportee).sendMessage(tl("pendingTeleportCancelled"));
ess.getUser(timer_teleportee).sendMessage(I18n.tl("pendingTeleportCancelled"));
}
}
}

View File

@@ -1,9 +1,9 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import com.earth2me.essentials.craftbukkit.SetExpFix;
import com.earth2me.essentials.utils.NumberUtil;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.craftbukkit.InventoryWorkaround;
import org.mcess.essentials.craftbukkit.SetExpFix;
import org.mcess.essentials.utils.NumberUtil;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@@ -58,7 +58,7 @@ public class Trade
}
@Deprecated
public Trade(final double money, final com.earth2me.essentials.IEssentials ess)
public Trade(final double money, final org.mcess.essentials.IEssentials ess)
{
this(null, null, BigDecimal.valueOf(money), null, null, (IEssentials)ess);
}

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.google.common.io.Files;
import java.io.BufferedReader;

View File

@@ -1,12 +1,11 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.register.payment.Method;
import com.earth2me.essentials.register.payment.Methods;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.FormatUtil;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.commands.IEssentialsCommand;
import org.mcess.essentials.register.payment.Method;
import org.mcess.essentials.register.payment.Methods;
import org.mcess.essentials.utils.DateUtil;
import org.mcess.essentials.utils.FormatUtil;
import org.mcess.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.GregorianCalendar;
@@ -129,7 +128,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
cooldownTime.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
if (cooldownTime.after(now) && !isAuthorized("essentials.heal.cooldown.bypass"))
{
throw new Exception(tl("timeBeforeHeal", DateUtil.formatDateDiff(cooldownTime.getTimeInMillis())));
throw new Exception(I18n.tl("timeBeforeHeal", DateUtil.formatDateDiff(cooldownTime.getTimeInMillis())));
}
}
setLastHealTimestamp(now.getTimeInMillis());
@@ -149,10 +148,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
return;
}
setMoney(getMoney().add(value));
sendMessage(tl("addedToAccount", NumberUtil.displayCurrency(value, ess)));
sendMessage(I18n.tl("addedToAccount", NumberUtil.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(tl("addedToOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
initiator.sendMessage(I18n.tl("addedToOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
}
}
@@ -167,12 +166,12 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
{
setMoney(getMoney().subtract(value));
reciever.setMoney(reciever.getMoney().add(value));
sendMessage(tl("moneySentTo", NumberUtil.displayCurrency(value, ess), reciever.getDisplayName()));
reciever.sendMessage(tl("moneyRecievedFrom", NumberUtil.displayCurrency(value, ess), getDisplayName()));
sendMessage(I18n.tl("moneySentTo", NumberUtil.displayCurrency(value, ess), reciever.getDisplayName()));
reciever.sendMessage(I18n.tl("moneyRecievedFrom", NumberUtil.displayCurrency(value, ess), getDisplayName()));
}
else
{
throw new ChargeException(tl("notEnoughMoney", NumberUtil.displayCurrency(value, ess)));
throw new ChargeException(I18n.tl("notEnoughMoney", NumberUtil.displayCurrency(value, ess)));
}
}
@@ -197,10 +196,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
{
ess.getLogger().log(Level.WARNING, "Invalid call to takeMoney, total balance can't be more than the max-money limit.", ex);
}
sendMessage(tl("takenFromAccount", NumberUtil.displayCurrency(value, ess)));
sendMessage(I18n.tl("takenFromAccount", NumberUtil.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(tl("takenFromOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
initiator.sendMessage(I18n.tl("takenFromOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
}
}
@@ -560,7 +559,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
{
setJailTimeout(0);
setJailed(false);
sendMessage(tl("haveBeenReleased"));
sendMessage(I18n.tl("haveBeenReleased"));
setJail(null);
try
{
@@ -587,7 +586,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted())
{
setMuteTimeout(0);
sendMessage(tl("canTalkAgain"));
sendMessage(I18n.tl("canTalkAgain"));
setMuted(false);
return true;
}
@@ -602,7 +601,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
if (broadcast && !isHidden())
{
setDisplayNick();
final String msg = tl("userIsNotAway", getDisplayName());
final String msg = I18n.tl("userIsNotAway", getDisplayName());
if (!msg.isEmpty())
{
ess.broadcastMessage(this, msg);
@@ -618,7 +617,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
if (autoafkkick > 0 && lastActivity > 0 && (lastActivity + (autoafkkick * 1000)) < System.currentTimeMillis()
&& !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt"))
{
final String kickReason = tl("autoAfkKickReason", autoafkkick / 60.0);
final String kickReason = I18n.tl("autoAfkKickReason", autoafkkick / 60.0);
lastActivity = 0;
this.getBase().kickPlayer(kickReason);
@@ -627,7 +626,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
{
if (user.isAuthorized("essentials.kick.notify"))
{
user.sendMessage(tl("playerKicked", Console.NAME, getName(), kickReason));
user.sendMessage(I18n.tl("playerKicked", Console.NAME, getName(), kickReason));
}
}
}
@@ -638,7 +637,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
if (!isHidden())
{
setDisplayNick();
final String msg = tl("userIsAway", getDisplayName());
final String msg = I18n.tl("userIsAway", getDisplayName());
if (!msg.isEmpty())
{
ess.broadcastMessage(this, msg);

View File

@@ -1,8 +1,8 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.NumberUtil;
import com.earth2me.essentials.utils.StringUtil;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.utils.NumberUtil;
import org.mcess.essentials.utils.StringUtil;
import java.io.File;
import java.math.BigDecimal;
import java.util.*;

View File

@@ -1,12 +1,9 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import com.earth2me.essentials.utils.StringUtil;
import org.mcess.essentials.utils.StringUtil;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.RemovalCause;
import com.google.common.cache.RemovalListener;
import com.google.common.cache.RemovalNotification;
import com.google.common.util.concurrent.UncheckedExecutionException;
import java.io.File;
import java.util.ArrayList;

View File

@@ -1,8 +1,7 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.WarpNotFoundException;
import com.earth2me.essentials.utils.StringUtil;
import org.mcess.essentials.commands.WarpNotFoundException;
import org.mcess.essentials.utils.StringUtil;
import java.io.File;
import java.io.IOException;
import java.util.*;
@@ -71,7 +70,7 @@ public class Warps implements IConf, net.ess3.api.IWarps
File confFile = new File(warpsFolder, filename + ".yml");
if (confFile.exists())
{
throw new Exception(tl("similarWarpExist"));
throw new Exception(I18n.tl("similarWarpExist"));
}
conf = new EssentialsConf(confFile);
warpPoints.put(new StringIgnoreCase(name), conf);
@@ -84,7 +83,7 @@ public class Warps implements IConf, net.ess3.api.IWarps
}
catch (IOException ex)
{
throw new IOException(tl("invalidWarpName"));
throw new IOException(I18n.tl("invalidWarpName"));
}
}
@@ -94,11 +93,11 @@ public class Warps implements IConf, net.ess3.api.IWarps
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
if (conf == null)
{
throw new Exception(tl("warpNotExist"));
throw new Exception(I18n.tl("warpNotExist"));
}
if (!conf.getFile().delete())
{
throw new Exception(tl("warpDeleteError"));
throw new Exception(I18n.tl("warpDeleteError"));
}
warpPoints.remove(new StringIgnoreCase(name));
}
@@ -127,7 +126,7 @@ public class Warps implements IConf, net.ess3.api.IWarps
}
catch (Exception ex)
{
logger.log(Level.WARNING, tl("loadWarpError", filename), ex);
logger.log(Level.WARNING, I18n.tl("loadWarpError", filename), ex);
}
}
}

View File

@@ -1,11 +1,11 @@
package com.earth2me.essentials;
package org.mcess.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.commands.NotEnoughArgumentsException;
import java.io.File;
import java.math.BigDecimal;
import java.util.Locale;
import java.util.logging.Logger;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.inventory.ItemStack;

View File

@@ -1,22 +1,19 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
import com.earth2me.essentials.EssentialsConf;
import com.earth2me.essentials.EssentialsUserConf;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import static com.earth2me.essentials.api.Economy.add;
import static com.earth2me.essentials.api.Economy.divide;
import static com.earth2me.essentials.api.Economy.format;
import static com.earth2me.essentials.api.Economy.getMoneyExact;
import static com.earth2me.essentials.api.Economy.hasEnough;
import static com.earth2me.essentials.api.Economy.hasLess;
import static com.earth2me.essentials.api.Economy.hasMore;
import static com.earth2me.essentials.api.Economy.multiply;
import static com.earth2me.essentials.api.Economy.setMoney;
import static com.earth2me.essentials.api.Economy.substract;
import com.earth2me.essentials.utils.NumberUtil;
import com.earth2me.essentials.utils.StringUtil;
import org.mcess.essentials.EssentialsUserConf;
import org.mcess.essentials.Trade;
import org.mcess.essentials.User;
import static org.mcess.essentials.api.Economy.add;
import static org.mcess.essentials.api.Economy.divide;
import static org.mcess.essentials.api.Economy.format;
import static org.mcess.essentials.api.Economy.hasEnough;
import static org.mcess.essentials.api.Economy.hasLess;
import static org.mcess.essentials.api.Economy.hasMore;
import static org.mcess.essentials.api.Economy.multiply;
import static org.mcess.essentials.api.Economy.setMoney;
import org.mcess.essentials.utils.NumberUtil;
import org.mcess.essentials.utils.StringUtil;
import com.google.common.base.Charsets;
import java.io.File;
import java.math.BigDecimal;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
import java.util.Locale;

View File

@@ -1,7 +1,7 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
import com.earth2me.essentials.User;
import org.mcess.essentials.User;
import java.util.List;
import org.bukkit.inventory.ItemStack;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
import java.util.Collection;
import net.ess3.api.IUser;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
public interface IReload

View File

@@ -1,6 +1,6 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
import com.earth2me.essentials.Trade;
import org.mcess.essentials.Trade;
import net.ess3.api.IUser;
import org.bukkit.Location;
import org.bukkit.entity.Player;

View File

@@ -1,7 +1,7 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.commands.WarpNotFoundException;
import org.mcess.essentials.IConf;
import org.mcess.essentials.commands.WarpNotFoundException;
import java.io.File;
import java.util.Collection;
import org.bukkit.Location;

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
public class InvalidNameException extends Exception

View File

@@ -1,6 +1,6 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
import static com.earth2me.essentials.I18n.tl;
import static org.mcess.essentials.I18n.tl;
public class InvalidWorldException extends Exception

View File

@@ -1,4 +1,4 @@
package com.earth2me.essentials.api;
package org.mcess.essentials.api;
public class NoLoanPermittedException extends net.ess3.api.NoLoanPermittedException

View File

@@ -0,0 +1,12 @@
package org.mcess.essentials.api;
import org.mcess.essentials.I18n;
public class UserDoesNotExistException extends Exception
{
public UserDoesNotExistException(String name)
{
super(I18n.tl("userDoesNotExist", name));
}
}

View File

@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.User;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandafk extends EssentialsCommand
@@ -50,7 +50,7 @@ public class Commandafk extends EssentialsCommand
//user.sendMessage(_("markedAsNotAway"));
if (!user.isHidden())
{
msg = tl("userIsNotAway", user.getDisplayName());
msg = I18n.tl("userIsNotAway", user.getDisplayName());
}
user.updateActivity(false);
}
@@ -59,7 +59,7 @@ public class Commandafk extends EssentialsCommand
//user.sendMessage(_("markedAsAway"));
if (!user.isHidden())
{
msg = tl("userIsAway", user.getDisplayName());
msg = I18n.tl("userIsAway", user.getDisplayName());
}
}
if (!msg.isEmpty())

View File

@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.LocationUtil;
import org.mcess.essentials.User;
import org.mcess.essentials.utils.LocationUtil;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.TNTPrimed;

View File

@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import org.mcess.essentials.Trade;
import org.mcess.essentials.User;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandback extends EssentialsCommand
@@ -18,12 +18,12 @@ public class Commandback extends EssentialsCommand
{
if (user.getLastLocation() == null)
{
throw new Exception(tl("noLocationFound"));
throw new Exception(I18n.tl("noLocationFound"));
}
if (user.getWorld() != user.getLastLocation().getWorld() && ess.getSettings().isWorldTeleportPermissions()
&& !user.isAuthorized("essentials.worlds." + user.getLastLocation().getWorld().getName()))
{
throw new Exception(tl("noPerm", "essentials.worlds." + user.getLastLocation().getWorld().getName()));
throw new Exception(I18n.tl("noPerm", "essentials.worlds." + user.getLastLocation().getWorld().getName()));
}
final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);

View File

@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.User;
import org.mcess.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandbalance extends EssentialsCommand
@@ -24,7 +24,7 @@ public class Commandbalance extends EssentialsCommand
}
User target = getPlayer(server, args, 0, true, true);
sender.sendMessage(tl("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(target.getMoney(), ess)));
sender.sendMessage(I18n.tl("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(target.getMoney(), ess)));
}
@Override
@@ -34,12 +34,12 @@ public class Commandbalance extends EssentialsCommand
{
final User target = getPlayer(server, args, 0, true, true);
final BigDecimal bal = target.getMoney();
user.sendMessage(tl("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(bal, ess)));
user.sendMessage(I18n.tl("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(bal, ess)));
}
else if (args.length < 2)
{
final BigDecimal bal = user.getMoney();
user.sendMessage(tl("balance", NumberUtil.displayCurrency(bal, ess)));
user.sendMessage(I18n.tl("balance", NumberUtil.displayCurrency(bal, ess)));
}
else
{

View File

@@ -1,17 +1,17 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.textreader.SimpleTextInput;
import com.earth2me.essentials.textreader.TextPager;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.User;
import org.mcess.essentials.textreader.SimpleTextInput;
import org.mcess.essentials.textreader.TextPager;
import org.mcess.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandbalancetop extends EssentialsCommand
@@ -58,7 +58,7 @@ public class Commandbalancetop extends EssentialsCommand
}
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
{
sender.sendMessage(tl("orderBalances", ess.getUserMap().getUniqueUsers()));
sender.sendMessage(I18n.tl("orderBalances", ess.getUserMap().getUniqueUsers()));
}
}
finally
@@ -71,7 +71,7 @@ public class Commandbalancetop extends EssentialsCommand
{
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
{
sender.sendMessage(tl("orderBalances", ess.getUserMap().getUniqueUsers()));
sender.sendMessage(I18n.tl("orderBalances", ess.getUserMap().getUniqueUsers()));
}
ess.runTaskAsynchronously(new Viewer(sender, commandLabel, page, force));
}
@@ -83,7 +83,7 @@ public class Commandbalancetop extends EssentialsCommand
final Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(cacheage);
final DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
sender.sendMessage(tl("balanceTop", format.format(cal.getTime())));
sender.sendMessage(I18n.tl("balanceTop", format.format(cal.getTime())));
new TextPager(cache).showPage(Integer.toString(page), null, "balancetop", sender);
}
@@ -143,7 +143,7 @@ public class Commandbalancetop extends EssentialsCommand
}
});
cache.getLines().add(tl("serverTotal", NumberUtil.displayCurrency(totalMoney, ess)));
cache.getLines().add(I18n.tl("serverTotal", NumberUtil.displayCurrency(totalMoney, ess)));
int pos = 1;
for (Map.Entry<String, BigDecimal> entry : sortedEntries)
{

View File

@@ -1,15 +1,14 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.OfflinePlayer;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.FormatUtil;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.Console;
import org.mcess.essentials.OfflinePlayer;
import org.mcess.essentials.User;
import org.mcess.essentials.utils.FormatUtil;
import java.util.logging.Level;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandban extends EssentialsCommand
@@ -41,14 +40,14 @@ public class Commandban extends EssentialsCommand
{
if (sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.ban.offline"))
{
throw new Exception(tl("banExemptOffline"));
throw new Exception(I18n.tl("banExemptOffline"));
}
}
else
{
if (user.isAuthorized("essentials.ban.exempt") && sender.isPlayer())
{
throw new Exception(tl("banExempt"));
throw new Exception(I18n.tl("banExempt"));
}
}
@@ -60,21 +59,21 @@ public class Commandban extends EssentialsCommand
}
else
{
banReason = tl("defaultBanReason");
banReason = I18n.tl("defaultBanReason");
}
ess.getServer().getBanList(BanList.Type.NAME).addBan(user.getName(), banReason, null, senderName);
String banDisplay = tl("banFormat", banReason, senderName);
String banDisplay = I18n.tl("banFormat", banReason, senderName);
user.getBase().kickPlayer(banDisplay);
server.getLogger().log(Level.INFO, tl("playerBanned", senderName, user.getName(), banDisplay));
server.getLogger().log(Level.INFO, I18n.tl("playerBanned", senderName, user.getName(), banDisplay));
if (nomatch)
{
sender.sendMessage(tl("userUnknown", user.getName()));
sender.sendMessage(I18n.tl("userUnknown", user.getName()));
}
ess.broadcastMessage("essentials.ban.notify", tl("playerBanned", senderName, user.getName(), banReason));
ess.broadcastMessage("essentials.ban.notify", I18n.tl("playerBanned", senderName, user.getName(), banReason));
}
}

View File

@@ -1,13 +1,12 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.FormatUtil;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.Console;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.User;
import org.mcess.essentials.utils.FormatUtil;
import java.util.logging.Level;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.Server;

View File

@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.mcess.essentials.User;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BookMeta;
import org.mcess.essentials.I18n;
public class Commandbook extends EssentialsCommand
@@ -31,11 +31,11 @@ public class Commandbook extends EssentialsCommand
{
bmeta.setAuthor(args[1]);
item.setItemMeta(bmeta);
user.sendMessage(tl("bookAuthorSet", getFinalArg(args, 1)));
user.sendMessage(I18n.tl("bookAuthorSet", getFinalArg(args, 1)));
}
else
{
throw new Exception(tl("denyChangeAuthor"));
throw new Exception(I18n.tl("denyChangeAuthor"));
}
}
else if (args.length > 1 && args[0].equalsIgnoreCase("title"))
@@ -44,11 +44,11 @@ public class Commandbook extends EssentialsCommand
{
bmeta.setTitle(args[1]);
item.setItemMeta(bmeta);
user.sendMessage(tl("bookTitleSet", getFinalArg(args, 1)));
user.sendMessage(I18n.tl("bookTitleSet", getFinalArg(args, 1)));
}
else
{
throw new Exception(tl("denyChangeTitle"));
throw new Exception(I18n.tl("denyChangeTitle"));
}
}
else
@@ -58,11 +58,11 @@ public class Commandbook extends EssentialsCommand
ItemStack newItem = new ItemStack(Material.BOOK_AND_QUILL, item.getAmount());
newItem.setItemMeta(bmeta);
user.getBase().setItemInHand(newItem);
user.sendMessage(tl("editBookContents"));
user.sendMessage(I18n.tl("editBookContents"));
}
else
{
throw new Exception(tl("denyBookEdit"));
throw new Exception(I18n.tl("denyBookEdit"));
}
}
}
@@ -76,11 +76,11 @@ public class Commandbook extends EssentialsCommand
ItemStack newItem = new ItemStack(Material.WRITTEN_BOOK, item.getAmount());
newItem.setItemMeta(bmeta);
user.getBase().setItemInHand(newItem);
user.sendMessage(tl("bookLocked"));
user.sendMessage(I18n.tl("bookLocked"));
}
else
{
throw new Exception(tl("holdBook"));
throw new Exception(I18n.tl("holdBook"));
}
}

View File

@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.User;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;

View File

@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.FormatUtil;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.User;
import org.mcess.essentials.utils.FormatUtil;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandbroadcast extends EssentialsCommand
@@ -33,6 +33,6 @@ public class Commandbroadcast extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
ess.broadcastMessage(tl("broadcast", FormatUtil.replaceFormat(getFinalArg(args, 0)).replace("\\n", "\n"), name));
ess.broadcastMessage(I18n.tl("broadcast", FormatUtil.replaceFormat(getFinalArg(args, 0)).replace("\\n", "\n"), name));
}
}

View File

@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.User;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandburn extends EssentialsCommand
@@ -28,6 +28,6 @@ public class Commandburn extends EssentialsCommand
User user = getPlayer(server, sender, args, 0);
user.getBase().setFireTicks(Integer.parseInt(args[1]) * 20);
sender.sendMessage(tl("burnMsg", user.getDisplayName(), Integer.parseInt(args[1])));
sender.sendMessage(I18n.tl("burnMsg", user.getDisplayName(), Integer.parseInt(args[1])));
}
}

View File

@@ -1,15 +1,15 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.User;
import org.mcess.essentials.utils.NumberUtil;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Locale;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.mcess.essentials.I18n;
public class Commandclearinventory extends EssentialsCommand
@@ -45,7 +45,7 @@ public class Commandclearinventory extends EssentialsCommand
if (allowAll && args.length > 0 && args[0].contentEquals("*"))
{
sender.sendMessage(tl("inventoryClearingFromAll"));
sender.sendMessage(I18n.tl("inventoryClearingFromAll"));
offset = 1;
players = ess.getOnlinePlayers();
}
@@ -102,7 +102,7 @@ public class Commandclearinventory extends EssentialsCommand
{
if (showExtended)
{
sender.sendMessage(tl("inventoryClearingAllItems", player.getDisplayName()));
sender.sendMessage(I18n.tl("inventoryClearingAllItems", player.getDisplayName()));
}
player.getInventory().clear();
}
@@ -110,7 +110,7 @@ public class Commandclearinventory extends EssentialsCommand
{
if (showExtended)
{
sender.sendMessage(tl("inventoryClearingAllArmor", player.getDisplayName()));
sender.sendMessage(I18n.tl("inventoryClearingAllArmor", player.getDisplayName()));
}
player.getInventory().clear();
player.getInventory().setArmorContents(null);
@@ -122,7 +122,7 @@ public class Commandclearinventory extends EssentialsCommand
ItemStack stack = new ItemStack(type);
if (showExtended)
{
sender.sendMessage(tl("inventoryClearingAllStack", stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
sender.sendMessage(I18n.tl("inventoryClearingAllStack", stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
}
player.getInventory().clear(type, data);
}
@@ -133,7 +133,7 @@ public class Commandclearinventory extends EssentialsCommand
final int removedAmount = (BASE_AMOUNT - removedStack.getAmount());
if (removedAmount > 0 || showExtended)
{
sender.sendMessage(tl("inventoryClearingStack", removedAmount, stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
sender.sendMessage(I18n.tl("inventoryClearingStack", removedAmount, stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
}
}
else
@@ -145,14 +145,14 @@ public class Commandclearinventory extends EssentialsCommand
ItemStack stack = new ItemStack(type, amount, data);
if (player.getInventory().containsAtLeast(stack, amount))
{
sender.sendMessage(tl("inventoryClearingStack", amount, stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
sender.sendMessage(I18n.tl("inventoryClearingStack", amount, stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
player.getInventory().removeItem(stack);
}
else
{
if (showExtended)
{
sender.sendMessage(tl("inventoryClearFail", player.getDisplayName(), amount, stack.getType().toString().toLowerCase(Locale.ENGLISH)));
sender.sendMessage(I18n.tl("inventoryClearFail", player.getDisplayName(), amount, stack.getType().toString().toLowerCase(Locale.ENGLISH)));
}
}
}

View File

@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.mcess.essentials.User;
import org.bukkit.Server;
import org.mcess.essentials.I18n;
public class Commandcompass extends EssentialsCommand
@@ -53,6 +53,6 @@ public class Commandcompass extends EssentialsCommand
{
dir = "N";
}
user.sendMessage(tl("compassBearing", dir, bearing));
user.sendMessage(I18n.tl("compassBearing", dir, bearing));
}
}

View File

@@ -1,19 +1,17 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import java.util.*;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.Trade.OverflowType;
import com.earth2me.essentials.User;
import org.mcess.essentials.ChargeException;
import org.mcess.essentials.Trade;
import org.mcess.essentials.User;
import net.ess3.api.MaxMoneyException;
import org.mcess.essentials.I18n;
public class Commandcondense extends EssentialsCommand
@@ -59,11 +57,11 @@ public class Commandcondense extends EssentialsCommand
if (didConvert)
{
user.sendMessage(tl("itemsConverted"));
user.sendMessage(I18n.tl("itemsConverted"));
}
else
{
user.sendMessage(tl("itemsNotConverted"));
user.sendMessage(I18n.tl("itemsNotConverted"));
throw new NoChargeException();
}
}
@@ -113,7 +111,7 @@ public class Commandcondense extends EssentialsCommand
final Trade remove = new Trade(input, ess);
final Trade add = new Trade(result, ess);
remove.charge(user);
add.pay(user, OverflowType.DROP);
add.pay(user, Trade.OverflowType.DROP);
return true;
}
}

View File

@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.TextInput;
import com.earth2me.essentials.textreader.TextPager;
import com.earth2me.essentials.utils.NumberUtil;
import org.mcess.essentials.CommandSource;
import org.mcess.essentials.textreader.IText;
import org.mcess.essentials.textreader.KeywordReplacer;
import org.mcess.essentials.textreader.TextInput;
import org.mcess.essentials.textreader.TextPager;
import org.mcess.essentials.utils.NumberUtil;
import org.bukkit.Server;

View File

@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.mcess.essentials.CommandSource;
import static org.mcess.essentials.I18n.tl;
import org.mcess.essentials.User;
import java.util.Locale;
import org.bukkit.Server;

View File

@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
package org.mcess.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import org.mcess.essentials.CommandSource;
import static org.mcess.essentials.I18n.tl;
import org.bukkit.Server;

Some files were not shown because too many files have changed in this diff Show More