diff options
32 files changed, 61 insertions, 58 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandafk.java b/Essentials/src/net/ess3/commands/Commandafk.java index 9bd3662c7..551c216a8 100644 --- a/Essentials/src/net/ess3/commands/Commandafk.java +++ b/Essentials/src/net/ess3/commands/Commandafk.java @@ -14,7 +14,7 @@ public class Commandafk extends EssentialsCommand { if (args.length > 0 && Permissions.AFK_OTHERS.isAuthorized(user)) { - IUser afkUser = ess.getUser((Player)ess.getServer().matchPlayer(args[0])); + IUser afkUser = player.getUser((Player)ess.getServer().matchPlayer(args[0])); if (afkUser != null) { toggleAfk(afkUser); diff --git a/Essentials/src/net/ess3/commands/Commandban.java b/Essentials/src/net/ess3/commands/Commandban.java index 959904b4f..906b591ac 100644 --- a/Essentials/src/net/ess3/commands/Commandban.java +++ b/Essentials/src/net/ess3/commands/Commandban.java @@ -7,6 +7,7 @@ import net.ess3.permissions.Permissions; import net.ess3.user.Ban; import lombok.Cleanup; import net.ess3.api.server.CommandSender; +import net.ess3.api.server.Player; public class Commandban extends EssentialsCommand diff --git a/Essentials/src/net/ess3/commands/Commandbanip.java b/Essentials/src/net/ess3/commands/Commandbanip.java index 66ff37eb5..bda548c78 100644 --- a/Essentials/src/net/ess3/commands/Commandbanip.java +++ b/Essentials/src/net/ess3/commands/Commandbanip.java @@ -4,6 +4,7 @@ import static net.ess3.I18n._; import net.ess3.api.IUser; import lombok.Cleanup; import net.ess3.api.server.CommandSender; +import net.ess3.api.server.Player; public class Commandbanip extends EssentialsCommand @@ -17,7 +18,7 @@ public class Commandbanip extends EssentialsCommand } @Cleanup - final IUser player = ess.getUser(args[0]); + final IUser player = player.getUser(args[0]); player.acquireReadLock(); if (player == null) diff --git a/Essentials/src/net/ess3/commands/Commanddelhome.java b/Essentials/src/net/ess3/commands/Commanddelhome.java index 4856bd824..14aaf651f 100644 --- a/Essentials/src/net/ess3/commands/Commanddelhome.java +++ b/Essentials/src/net/ess3/commands/Commanddelhome.java @@ -20,7 +20,7 @@ public class Commanddelhome extends EssentialsCommand } @Cleanup - IUser user = sender instanceof Player ? ess.getUser((Player)sender) : null; + IUser user = sender instanceof Player ? player.getUser((Player)sender) : null; String name; String[] expandedArg; diff --git a/Essentials/src/net/ess3/commands/Commandeco.java b/Essentials/src/net/ess3/commands/Commandeco.java index 571f695df..46cb26319 100644 --- a/Essentials/src/net/ess3/commands/Commandeco.java +++ b/Essentials/src/net/ess3/commands/Commandeco.java @@ -33,9 +33,9 @@ public class Commandeco extends EssentialsCommand if (args[1].contentEquals("**")) { - for (String sUser : ess.getUserMap().getAllUniqueUsers()) + for (String sUser : userMap.matchUser().getAllUniqueUsers()) { - final IUser player = ess.getUser(sUser); + final IUser player = Player.getUser(sUser); switch (cmd) { case GIVE: diff --git a/Essentials/src/net/ess3/commands/Commandexp.java b/Essentials/src/net/ess3/commands/Commandexp.java index 4c0b0054c..870d8633b 100644 --- a/Essentials/src/net/ess3/commands/Commandexp.java +++ b/Essentials/src/net/ess3/commands/Commandexp.java @@ -91,7 +91,7 @@ public class Commandexp extends EssentialsCommand for (Player matchPlayer : server.matchPlayer(match)) { foundUser = true; - final IUser target = ess.getUser(matchPlayer); + final IUser target = player.getUser(matchPlayer); showExp(sender, target); } if (!foundUser) @@ -105,7 +105,7 @@ public class Commandexp extends EssentialsCommand boolean foundUser = false; for (Player matchPlayer : server.matchPlayer(match)) { - final IUser target = ess.getUser(matchPlayer); + final IUser target = player.getUser(matchPlayer); setExp(sender, target, amount, toggle); foundUser = true; } diff --git a/Essentials/src/net/ess3/commands/Commandfeed.java b/Essentials/src/net/ess3/commands/Commandfeed.java index b2340ef60..56184dbae 100644 --- a/Essentials/src/net/ess3/commands/Commandfeed.java +++ b/Essentials/src/net/ess3/commands/Commandfeed.java @@ -35,7 +35,7 @@ public class Commandfeed extends EssentialsCommand } for (Player player : players) { - if (ess.getUser(player).isHidden()) + if (player.getUser(player).isHidden()) { continue; } diff --git a/Essentials/src/net/ess3/commands/Commandfly.java b/Essentials/src/net/ess3/commands/Commandfly.java index 54e6dec42..6eab69962 100644 --- a/Essentials/src/net/ess3/commands/Commandfly.java +++ b/Essentials/src/net/ess3/commands/Commandfly.java @@ -4,7 +4,7 @@ import static net.ess3.I18n._; import net.ess3.api.IUser; import net.ess3.api.server.CommandSender; import net.ess3.api.server.Player; -import net.ess3.api.IServer +import net.ess3.api.server.IServer; import net.ess3.permissions.Permissions; @@ -43,7 +43,7 @@ public class Commandfly extends EssentialsCommand { for (Player matchPlayer : server.matchPlayer(args[0])) { - final IUser player = ess.getUser(matchPlayer); + final IUser player = player.getUser(matchPlayer); if (player.isHidden()) { continue; diff --git a/Essentials/src/net/ess3/commands/Commandgamemode.java b/Essentials/src/net/ess3/commands/Commandgamemode.java index 4a4cac437..909b19984 100644 --- a/Essentials/src/net/ess3/commands/Commandgamemode.java +++ b/Essentials/src/net/ess3/commands/Commandgamemode.java @@ -39,7 +39,7 @@ public class Commandgamemode extends EssentialsCommand { for (Player matchPlayer : server.matchPlayer(args[0])) { - final IUser player = ess.getUser(matchPlayer); + final IUser player = player.getUser(matchPlayer); if (player.isHidden()) { continue; diff --git a/Essentials/src/net/ess3/commands/Commandgive.java b/Essentials/src/net/ess3/commands/Commandgive.java index eb326748e..ddce34ea9 100644 --- a/Essentials/src/net/ess3/commands/Commandgive.java +++ b/Essentials/src/net/ess3/commands/Commandgive.java @@ -53,7 +53,7 @@ public class Commandgive extends EssentialsCommand { continue; } - final Enchantment enchantment = Commandenchant.getEnchantment(split[0], sender instanceof Player ? ess.getUser((Player)sender) : null); + final Enchantment enchantment = Commandenchant.getEnchantment(split[0], sender instanceof Player ? player.getUser((Player)sender) : null); int level; if (split.length > 1) { diff --git a/Essentials/src/net/ess3/commands/Commandgod.java b/Essentials/src/net/ess3/commands/Commandgod.java index 97c04ca23..d3363c523 100644 --- a/Essentials/src/net/ess3/commands/Commandgod.java +++ b/Essentials/src/net/ess3/commands/Commandgod.java @@ -38,7 +38,7 @@ public class Commandgod extends EssentialsCommand { for (Player matchPlayer : server.matchPlayer(args[0])) { - final IUser player = ess.getUser(matchPlayer); + final IUser player = player.getUser(matchPlayer); if (player.isHidden()) { continue; diff --git a/Essentials/src/net/ess3/commands/Commandheal.java b/Essentials/src/net/ess3/commands/Commandheal.java index d5c18149c..623657cf2 100644 --- a/Essentials/src/net/ess3/commands/Commandheal.java +++ b/Essentials/src/net/ess3/commands/Commandheal.java @@ -53,7 +53,7 @@ public class Commandheal extends EssentialsCommand } for (Player p : players) { - if (ess.getUser(p).isHidden()) + if (player.getUser(p).isHidden()) { continue; } diff --git a/Essentials/src/net/ess3/commands/Commandignore.java b/Essentials/src/net/ess3/commands/Commandignore.java index af9f2b710..a56c8ccfe 100644 --- a/Essentials/src/net/ess3/commands/Commandignore.java +++ b/Essentials/src/net/ess3/commands/Commandignore.java @@ -20,7 +20,7 @@ public class Commandignore extends EssentialsCommand } catch (NoSuchFieldException ex) { - player = ess.getUser(args[0]); + player = player.getUser(args[0]); } if (player == null) { diff --git a/Essentials/src/net/ess3/commands/Commandlightning.java b/Essentials/src/net/ess3/commands/Commandlightning.java index 646adadcd..0fa789a6c 100644 --- a/Essentials/src/net/ess3/commands/Commandlightning.java +++ b/Essentials/src/net/ess3/commands/Commandlightning.java @@ -20,7 +20,7 @@ public class Commandlightning extends EssentialsCommand IUser user = null; if (sender instanceof Player) { - user = ess.getUser(((Player)sender)); + user = player.getUser(((Player)sender)); } if ((args.length < 1 || !Permissions.LIGHTNING_OTHERS.isAuthorized(user)) && user != null) { @@ -49,7 +49,7 @@ public class Commandlightning extends EssentialsCommand { sender.sendMessage(_("lightningUse", matchPlayer.getDisplayName())); final LightningStrike strike = matchPlayer.getWorld().strikeLightningEffect(matchPlayer.getLocation()); - if (!ess.getUser(matchPlayer).isGodModeEnabled()) + if (!player.getUser(matchPlayer).isGodModeEnabled()) { matchPlayer.damage(power, strike); } diff --git a/Essentials/src/net/ess3/commands/Commandmail.java b/Essentials/src/net/ess3/commands/Commandmail.java index 25893cb4c..5f215f06d 100644 --- a/Essentials/src/net/ess3/commands/Commandmail.java +++ b/Essentials/src/net/ess3/commands/Commandmail.java @@ -42,11 +42,11 @@ public class Commandmail extends EssentialsCommand IUser u; if (player != null) { - u = ess.getUser(player); + u = player.getUser(player); } else { - u = ess.getUser(args[1]); + u = player.getUser(args[1]); } if (u == null) { @@ -97,11 +97,11 @@ public class Commandmail extends EssentialsCommand IUser u; if (player != null) { - u = ess.getUser(player); + u = player.getUser(player); } else { - u = ess.getUser(args[1]); + u = player.getUser(args[1]); } if (u == null) { @@ -122,11 +122,11 @@ public class Commandmail extends EssentialsCommand IUser u; if (player != null) { - u = ess.getUser(player); + u = player.getUser(player); } else { - u = ess.getUser(args[0]); + u = player.getUser(args[0]); } if (u == null) { diff --git a/Essentials/src/net/ess3/commands/Commandmsg.java b/Essentials/src/net/ess3/commands/Commandmsg.java index 3a2e8b297..182137758 100644 --- a/Essentials/src/net/ess3/commands/Commandmsg.java +++ b/Essentials/src/net/ess3/commands/Commandmsg.java @@ -27,7 +27,7 @@ public class Commandmsg extends EssentialsCommand if (sender instanceof Player) { @Cleanup - IUser user = ess.getUser((Player)sender); + IUser user = player.getUser((Player)sender); user.acquireReadLock(); if (user.getData().isMuted()) { @@ -49,7 +49,7 @@ public class Commandmsg extends EssentialsCommand final String translatedMe = _("me"); - final IReplyTo replyTo = sender instanceof Player ? ess.getUser((Player)sender) : Console.getConsoleReplyTo(); + final IReplyTo replyTo = sender instanceof Player ? player.getUser((Player)sender) : Console.getConsoleReplyTo(); final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; if (args[0].equalsIgnoreCase(Console.NAME)) @@ -72,7 +72,7 @@ public class Commandmsg extends EssentialsCommand int i = 0; for (Player matchedPlayer : matchedPlayers) { - final IUser u = ess.getUser(matchedPlayer); + final IUser u = player.getUser(matchedPlayer); if (u.isHidden()) { i++; @@ -86,14 +86,14 @@ public class Commandmsg extends EssentialsCommand for (Player matchedPlayer : matchedPlayers) { sender.sendMessage(_("msgFormat", translatedMe, matchedPlayer.getDisplayName(), message)); - final IUser matchedUser = ess.getUser(matchedPlayer); - if (sender instanceof Player && (matchedUser.isIgnoringPlayer(ess.getUser((Player)sender)) || matchedUser.isHidden())) + final IUser matchedUser = player.getUser(matchedPlayer); + if (sender instanceof Player && (matchedUser.isIgnoringPlayer(player.getUser((Player)sender)) || matchedUser.isHidden())) { continue; } matchedPlayer.sendMessage(_("msgFormat", senderName, translatedMe, message)); - replyTo.setReplyTo(ess.getUser(matchedPlayer)); - ess.getUser(matchedPlayer).setReplyTo(sender); + replyTo.setReplyTo(player.getUser(matchedPlayer)); + player.getUser(matchedPlayer).setReplyTo(sender); } } } diff --git a/Essentials/src/net/ess3/commands/Commandnear.java b/Essentials/src/net/ess3/commands/Commandnear.java index fd3db71f9..6e1a19e23 100644 --- a/Essentials/src/net/ess3/commands/Commandnear.java +++ b/Essentials/src/net/ess3/commands/Commandnear.java @@ -86,7 +86,7 @@ public class Commandnear extends EssentialsCommand for (Player onlinePlayer : server.getOnlinePlayers()) { - final IUser player = ess.getUser(onlinePlayer); + final IUser player = player.getUser(onlinePlayer); if (!player.equals(user) && !player.isHidden()) { final Location playerLoc = player.getLocation(); diff --git a/Essentials/src/net/ess3/commands/Commandnick.java b/Essentials/src/net/ess3/commands/Commandnick.java index 07a251f14..d682efa86 100644 --- a/Essentials/src/net/ess3/commands/Commandnick.java +++ b/Essentials/src/net/ess3/commands/Commandnick.java @@ -7,7 +7,7 @@ import net.ess3.api.ISettings; import net.ess3.api.IUser; import net.ess3.api.server.CommandSender; import net.ess3.api.server.Player; -import net.ess3.api.IServer +import net.ess3.api.server.IServer; import net.ess3.permissions.Permissions; import net.ess3.utils.Util; @@ -84,7 +84,7 @@ public class Commandnick extends EssentialsCommand { try { - setNickname(ess.getUser(player), "off"); + setNickname(player.getUser(player), "off"); } catch (Exception ex) { diff --git a/Essentials/src/net/ess3/commands/Commandpay.java b/Essentials/src/net/ess3/commands/Commandpay.java index c1f331fca..e2a008fb9 100644 --- a/Essentials/src/net/ess3/commands/Commandpay.java +++ b/Essentials/src/net/ess3/commands/Commandpay.java @@ -27,7 +27,7 @@ public class Commandpay extends EssentialsCommand boolean foundUser = false; for (Player p : server.matchPlayer(args[0])) { - IUser u = ess.getUser(p); + IUser u = player.getUser(p); if (u.isHidden()) { continue; diff --git a/Essentials/src/net/ess3/commands/Commandptime.java b/Essentials/src/net/ess3/commands/Commandptime.java index 7a0f27b1f..811fb4559 100644 --- a/Essentials/src/net/ess3/commands/Commandptime.java +++ b/Essentials/src/net/ess3/commands/Commandptime.java @@ -41,7 +41,7 @@ public class Commandptime extends EssentialsCommand return; } - IUser user = sender instanceof Player ? ess.getUser((Player)sender) : null; + IUser user = sender instanceof Player ? Player.getUser((Player)sender) : null; if ((!users.contains(user) || users.size() > 1) && user != null && !Permissions.PTIME_OTHERS.isAuthorized(user)) { user.sendMessage(_("pTimeOthersPermission")); @@ -183,12 +183,12 @@ public class Commandptime extends EssentialsCommand // If there is no selector we want the sender itself. Or all users if sender isn't a user. if (selector == null) { - final IUser user = sender instanceof Player ? ess.getUser((Player)sender) : null; + final IUser user = sender instanceof Player ? Player.getUser((Player)sender) : null; if (user == null) { for (Player player : server.getOnlinePlayers()) { - users.add(ess.getUser(player)); + users.add(Player.getUser(player)); } } else @@ -203,7 +203,7 @@ public class Commandptime extends EssentialsCommand final List<Player> matchedPlayers = server.matchPlayer(selector); if (!matchedPlayers.isEmpty()) { - user = ess.getUser(matchedPlayers.get(0)); + user = Player.getUser(matchedPlayers.get(0)); } if (user != null) @@ -215,7 +215,7 @@ public class Commandptime extends EssentialsCommand { for (Player player : server.getOnlinePlayers()) { - users.add(ess.getUser(player)); + users.add(player.getUser(player)); } } // We failed to understand the world target... diff --git a/Essentials/src/net/ess3/commands/Commandr.java b/Essentials/src/net/ess3/commands/Commandr.java index 1b2e42dcb..4b0101ff0 100644 --- a/Essentials/src/net/ess3/commands/Commandr.java +++ b/Essentials/src/net/ess3/commands/Commandr.java @@ -26,7 +26,7 @@ public class Commandr extends EssentialsCommand if (sender instanceof Player) { - IUser user = ess.getUser((Player)sender); + IUser user = Player.getUser((Player)sender); if (Permissions.MSG_COLOR.isAuthorized(user)) { message = Util.replaceFormat(message); @@ -56,8 +56,8 @@ public class Commandr extends EssentialsCommand sender.sendMessage(_("msgFormat", _("me"), targetName, message)); if (target instanceof Player) { - IUser player = ess.getUser((Player)target); - if (sender instanceof Player && player.isIgnoringPlayer(ess.getUser((Player)sender))) + IUser player = player.getUser((Player)target); + if (sender instanceof Player && player.isIgnoringPlayer(player.getUser((Player)sender))) { return; } @@ -68,7 +68,7 @@ public class Commandr extends EssentialsCommand { if (target instanceof Player) { - ess.getUser((Player)target).setReplyTo(sender); + player.getUser((Player)target).setReplyTo(sender); } else { diff --git a/Essentials/src/net/ess3/commands/Commandrealname.java b/Essentials/src/net/ess3/commands/Commandrealname.java index 85430b90d..8c385628d 100644 --- a/Essentials/src/net/ess3/commands/Commandrealname.java +++ b/Essentials/src/net/ess3/commands/Commandrealname.java @@ -24,7 +24,7 @@ public class Commandrealname extends EssentialsCommand final String whois = args[0].toLowerCase(Locale.ENGLISH); for (Player onlinePlayer : server.getOnlinePlayers()) { - final IUser u = ess.getUser(onlinePlayer); + final IUser u = player.getUser(onlinePlayer); if (u.isHidden()) { continue; diff --git a/Essentials/src/net/ess3/commands/Commandseen.java b/Essentials/src/net/ess3/commands/Commandseen.java index a508b16e3..34c15a48e 100644 --- a/Essentials/src/net/ess3/commands/Commandseen.java +++ b/Essentials/src/net/ess3/commands/Commandseen.java @@ -37,7 +37,7 @@ public class Commandseen extends EssentialsCommand catch (NoSuchFieldException e) { @Cleanup - IUser u = ess.getUser(args[0]); + IUser u = player.getUser(args[0]); u.acquireReadLock(); if (u == null) { diff --git a/Essentials/src/net/ess3/commands/Commandsethome.java b/Essentials/src/net/ess3/commands/Commandsethome.java index 00e3a0170..c01519c14 100644 --- a/Essentials/src/net/ess3/commands/Commandsethome.java +++ b/Essentials/src/net/ess3/commands/Commandsethome.java @@ -56,7 +56,7 @@ public class Commandsethome extends EssentialsCommand if (Permissions.SETHOME_OTHERS.isAuthorized(user)) { @Cleanup - IUser usersHome = ess.getUser(ess.getServer().getPlayer(args[0])); + IUser usersHome = player.getUser(ess.getServer().getPlayer(args[0])); if (usersHome == null) { throw new Exception(_("playerNotFound")); diff --git a/Essentials/src/net/ess3/commands/Commandtempban.java b/Essentials/src/net/ess3/commands/Commandtempban.java index d41dbac37..8bc34db9f 100644 --- a/Essentials/src/net/ess3/commands/Commandtempban.java +++ b/Essentials/src/net/ess3/commands/Commandtempban.java @@ -51,7 +51,7 @@ public class Commandtempban extends EssentialsCommand for (Player onlinePlayer : server.getOnlinePlayers()) { - final IUser player = ess.getUser(onlinePlayer); + final IUser player = player.getUser(onlinePlayer); if (Permissions.BAN_NOTIFY.isAuthorized(player)) { onlinePlayer.sendMessage(_("playerBanned", senderName, user.getName(), banReason)); diff --git a/Essentials/src/net/ess3/commands/Commandtime.java b/Essentials/src/net/ess3/commands/Commandtime.java index f48b31cd7..686b1c200 100644 --- a/Essentials/src/net/ess3/commands/Commandtime.java +++ b/Essentials/src/net/ess3/commands/Commandtime.java @@ -122,7 +122,7 @@ public class Commandtime extends EssentialsCommand // If there is no selector we want the world the user is currently in. Or all worlds if it isn't a user. if (selector == null) { - final IUser user = sender instanceof Player ? ess.getUser((Player)sender) : null; + final IUser user = sender instanceof Player ? player.getUser((Player)sender) : null; if (user == null) { worlds.addAll(server.getWorlds()); diff --git a/Essentials/src/net/ess3/commands/Commandtpaall.java b/Essentials/src/net/ess3/commands/Commandtpaall.java index 717a55cc1..e6755848b 100644 --- a/Essentials/src/net/ess3/commands/Commandtpaall.java +++ b/Essentials/src/net/ess3/commands/Commandtpaall.java @@ -18,7 +18,7 @@ public class Commandtpaall extends EssentialsCommand { if (sender instanceof Player) { - teleportAAllPlayers(sender, ess.getUser((Player)sender)); + teleportAAllPlayers(sender, player.getUser((Player)sender)); return; } throw new NotEnoughArgumentsException(); @@ -34,7 +34,7 @@ public class Commandtpaall extends EssentialsCommand for (Player onlinePlayer : server.getOnlinePlayers()) { @Cleanup - final IUser player = ess.getUser(onlinePlayer); + final IUser player = player.getUser(onlinePlayer); player.acquireReadLock(); if (user == player) { diff --git a/Essentials/src/net/ess3/commands/Commandtpall.java b/Essentials/src/net/ess3/commands/Commandtpall.java index 0a08f88b7..ec7306bdb 100644 --- a/Essentials/src/net/ess3/commands/Commandtpall.java +++ b/Essentials/src/net/ess3/commands/Commandtpall.java @@ -20,7 +20,7 @@ public class Commandtpall extends EssentialsCommand { if (sender instanceof Player) { - teleportAllPlayers(sender, ess.getUser((Player)sender)); + teleportAllPlayers(sender, player.getUser((Player)sender)); return; } throw new NotEnoughArgumentsException(); @@ -35,7 +35,7 @@ public class Commandtpall extends EssentialsCommand sender.sendMessage(_("teleportAll")); for (Player onlinePlayer : server.getOnlinePlayers()) { - final IUser player = ess.getUser(onlinePlayer); + final IUser player = player.getUser(onlinePlayer); if (user == player) { continue; diff --git a/Essentials/src/net/ess3/commands/Commandtppos.java b/Essentials/src/net/ess3/commands/Commandtppos.java index 29350cc60..4f60cc1a4 100644 --- a/Essentials/src/net/ess3/commands/Commandtppos.java +++ b/Essentials/src/net/ess3/commands/Commandtppos.java @@ -2,9 +2,9 @@ package net.ess3.commands; import static net.ess3.I18n._; import net.ess3.api.IUser; +import net.ess3.api.server.CommandSender; import net.ess3.api.server.Location; import net.ess3.economy.Trade; -//TODO: remove bukkit import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -45,7 +45,7 @@ public class Commandtppos extends EssentialsCommand throw new NotEnoughArgumentsException(); } - IUser user = ess.getUser(server.getPlayer(args[0])); + IUser user = player.getUser(server.getPlayer(args[0])); final int x = Integer.parseInt(args[1]); final int y = Integer.parseInt(args[2]); final int z = Integer.parseInt(args[3]); diff --git a/Essentials/src/net/ess3/commands/Commandwarp.java b/Essentials/src/net/ess3/commands/Commandwarp.java index 2d56a0cb9..3a33d5cf2 100644 --- a/Essentials/src/net/ess3/commands/Commandwarp.java +++ b/Essentials/src/net/ess3/commands/Commandwarp.java @@ -12,6 +12,7 @@ import java.util.Iterator; import java.util.List; import java.util.Locale; //TODO: remove bukkit +import net.ess3.api.server.CommandSender; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -36,7 +37,7 @@ public class Commandwarp extends EssentialsCommand IUser otherUser = null; if (args.length == 2 && Permissions.WARP_OTHERS.isAuthorized(user)) { - otherUser = ess.getUser(server.getPlayer(args[1])); + otherUser = player.getUser(server.getPlayer(args[1])); if (otherUser == null) { throw new Exception(_("playerNotFound")); @@ -57,7 +58,7 @@ public class Commandwarp extends EssentialsCommand warpList(sender, args); throw new NoChargeException(); } - IUser otherUser = ess.getUser(server.getPlayer(args[1])); + IUser otherUser = player.getUser(server.getPlayer(args[1])); if (otherUser == null) { throw new Exception(_("playerNotFound")); diff --git a/Essentials/src/net/ess3/commands/EssentialsCommand.java b/Essentials/src/net/ess3/commands/EssentialsCommand.java index d54e3d309..0828c9a63 100644 --- a/Essentials/src/net/ess3/commands/EssentialsCommand.java +++ b/Essentials/src/net/ess3/commands/EssentialsCommand.java @@ -53,7 +53,7 @@ public abstract class EssentialsCommand extends AbstractSuperpermsPermission imp { throw new NoSuchFieldException(_("playerNotFound")); } - final IUser user = ess.getUser(args[pos]); + final IUser user = player.getUser(args[pos]); if (user != null) { if (!getOffline && (!user.isOnline() || user.isHidden())) diff --git a/Essentials/src/net/ess3/commands/EssentialsCommandHandler.java b/Essentials/src/net/ess3/commands/EssentialsCommandHandler.java index db2b63c3e..3edbed214 100644 --- a/Essentials/src/net/ess3/commands/EssentialsCommandHandler.java +++ b/Essentials/src/net/ess3/commands/EssentialsCommandHandler.java @@ -102,7 +102,7 @@ public class EssentialsCommandHandler implements ICommandHandler IUser user = null; if (sender instanceof Player) { - user = ess.getUser((Player)sender); + user = player.getUser((Player)sender); LOGGER.log(Level.INFO, String.format("[PLAYER_COMMAND] %s: /%s %s ", ((Player)sender).getName(), commandLabel, EssentialsCommand.getFinalArg(args, 0))); } |