summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/IUser.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/Jails.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/PlayerExtension.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/SpawnMob.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/Teleport.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/TimedTeleport.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/Trade.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandantioch.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandexp.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandjump.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmsg.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnuke.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandpotion.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandremove.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawner.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtp.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpall.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpo.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtree.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandwhois.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignDisposal.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignFree.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignGameMode.java2
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java2
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java2
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java2
36 files changed, 68 insertions, 67 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 3d60046cb..cf0a7a5b0 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -502,13 +502,13 @@ public class Essentials extends JavaPlugin implements IEssentials
User user = getUser(player);
if (user.isRecipeSee())
{
- user.getPlayer().getOpenInventory().getTopInventory().clear();
- user.getPlayer().getOpenInventory().close();
+ user.getBase().getOpenInventory().getTopInventory().clear();
+ user.getBase().getOpenInventory().close();
user.setRecipeSee(false);
}
if (user.isInvSee() || user.isEnderSee())
{
- user.getPlayer().getOpenInventory().close();
+ user.getBase().getOpenInventory().close();
user.setInvSee(false);
user.setEnderSee(false);
}
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
index 19258c55b..a10015b79 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
@@ -61,8 +61,8 @@ public class EssentialsBlockListener implements Listener
@Override
public void run()
{
- user.getInventory().addItem(is);
- user.updateInventory();
+ user.getBase().getInventory().addItem(is);
+ user.getBase().updateInventory();
}
});
}
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index 631e9ec2b..c8b00cdc3 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -149,7 +149,7 @@ public class EssentialsPlayerListener implements Listener
user.setLogoutLocation();
if (user.isRecipeSee())
{
- user.getPlayer().getOpenInventory().getTopInventory().clear();
+ user.getBase().getOpenInventory().getTopInventory().clear();
}
user.updateActivity(false);
user.dispose();
@@ -493,7 +493,7 @@ public class EssentialsPlayerListener implements Listener
{
try
{
- final Location otarget = LocationUtil.getTarget(user);
+ final Location otarget = LocationUtil.getTarget(user.getBase());
ess.scheduleSyncDelayedTask(
new Runnable()
diff --git a/Essentials/src/com/earth2me/essentials/IUser.java b/Essentials/src/com/earth2me/essentials/IUser.java
index 7f46032f8..380ab35f0 100644
--- a/Essentials/src/com/earth2me/essentials/IUser.java
+++ b/Essentials/src/com/earth2me/essentials/IUser.java
@@ -6,10 +6,11 @@ import java.math.BigDecimal;
import java.util.Map;
import java.util.Set;
import org.bukkit.Location;
+import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-public interface IUser extends Player
+public interface IUser extends CommandSender
{
long getLastTeleportTimestamp();
diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java
index 4cffb125b..531b420e3 100644
--- a/Essentials/src/com/earth2me/essentials/Jails.java
+++ b/Essentials/src/com/earth2me/essentials/Jails.java
@@ -148,7 +148,7 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
acquireReadLock();
try
{
- if (user.isOnline())
+ if (user.getBase().isOnline())
{
Location loc = getJail(jail);
user.getTeleport().now(loc, false, TeleportCause.COMMAND);
diff --git a/Essentials/src/com/earth2me/essentials/PlayerExtension.java b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
index 7c52e40d1..0038a3e0f 100644
--- a/Essentials/src/com/earth2me/essentials/PlayerExtension.java
+++ b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
@@ -11,7 +11,7 @@ import org.bukkit.permissions.Permissible;
import org.bukkit.permissions.ServerOperator;
-public class PlayerExtension implements Player
+public class PlayerExtension
{
@Delegate(types =
{
diff --git a/Essentials/src/com/earth2me/essentials/SpawnMob.java b/Essentials/src/com/earth2me/essentials/SpawnMob.java
index 34cfe85cf..acdd25a9f 100644
--- a/Essentials/src/com/earth2me/essentials/SpawnMob.java
+++ b/Essentials/src/com/earth2me/essentials/SpawnMob.java
@@ -83,7 +83,7 @@ public class SpawnMob
// This method spawns a mob where the user is looking, owned by user
public static void spawnmob(final IEssentials ess, final Server server, final User user, final List<String> parts, final List<String> data, int mobCount) throws Exception
{
- final Block block = LocationUtil.getTarget(user).getBlock();
+ final Block block = LocationUtil.getTarget(user.getBase()).getBlock();
if (block == null)
{
throw new Exception(_("unableToSpawnMob"));
diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java
index 2c8ef96e3..869c2d13d 100644
--- a/Essentials/src/com/earth2me/essentials/Teleport.java
+++ b/Essentials/src/com/earth2me/essentials/Teleport.java
@@ -160,7 +160,7 @@ public class Teleport implements ITeleport
@Override
public void teleportToMe(IUser otherUser, Trade chargeFor, TeleportCause cause) throws Exception
{
- ITarget target = new PlayerTarget(teleportOwner);
+ ITarget target = new PlayerTarget(teleportOwner.getBase());
teleport(otherUser, target, chargeFor, cause);
}
diff --git a/Essentials/src/com/earth2me/essentials/TimedTeleport.java b/Essentials/src/com/earth2me/essentials/TimedTeleport.java
index 66867ea14..7d346cf71 100644
--- a/Essentials/src/com/earth2me/essentials/TimedTeleport.java
+++ b/Essentials/src/com/earth2me/essentials/TimedTeleport.java
@@ -36,10 +36,10 @@ public class TimedTeleport implements Runnable
this.teleport = teleport;
this.timer_started = System.currentTimeMillis();
this.timer_delay = delay;
- this.timer_health = teleportUser.getHealth();
- this.timer_initX = Math.round(teleportUser.getLocation().getX() * MOVE_CONSTANT);
- this.timer_initY = Math.round(teleportUser.getLocation().getY() * MOVE_CONSTANT);
- this.timer_initZ = Math.round(teleportUser.getLocation().getZ() * MOVE_CONSTANT);
+ this.timer_health = teleportUser.getBase().getHealth();
+ this.timer_initX = Math.round(teleportUser.getBase().getLocation().getX() * MOVE_CONSTANT);
+ this.timer_initY = Math.round(teleportUser.getBase().getLocation().getY() * MOVE_CONSTANT);
+ this.timer_initZ = Math.round(teleportUser.getBase().getLocation().getZ() * MOVE_CONSTANT);
this.timer_teleportee = teleportUser.getName();
this.timer_teleportTarget = target;
this.timer_chargeFor = chargeFor;
@@ -54,7 +54,7 @@ public class TimedTeleport implements Runnable
public void run()
{
- if (teleportOwner == null || !teleportOwner.isOnline() || teleportOwner.getLocation() == null)
+ if (teleportOwner == null || !teleportOwner.getBase().isOnline() || teleportOwner.getBase().getLocation() == null)
{
cancelTimer(false);
return;
@@ -62,13 +62,13 @@ public class TimedTeleport implements Runnable
IUser teleportUser = ess.getUser(this.timer_teleportee);
- if (teleportUser == null || !teleportUser.isOnline())
+ if (teleportUser == null || !teleportUser.getBase().isOnline())
{
cancelTimer(false);
return;
}
- final Location currLocation = teleportUser.getLocation();
+ final Location currLocation = teleportUser.getBase().getLocation();
if (currLocation == null)
{
cancelTimer(false);
@@ -79,14 +79,14 @@ public class TimedTeleport implements Runnable
&& (Math.round(currLocation.getX() * MOVE_CONSTANT) != timer_initX
|| Math.round(currLocation.getY() * MOVE_CONSTANT) != timer_initY
|| Math.round(currLocation.getZ() * MOVE_CONSTANT) != timer_initZ
- || teleportUser.getHealth() < timer_health))
+ || teleportUser.getBase().getHealth() < timer_health))
{
// user moved, cancelTimer teleportPlayer
cancelTimer(true);
return;
}
- timer_health = teleportUser.getHealth(); // in case user healed, then later gets injured
+ timer_health = teleportUser.getBase().getHealth(); // in case user healed, then later gets injured
final long now = System.currentTimeMillis();
if (now > timer_started + timer_delay)
{
diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java
index 8830df9a1..d987c95e8 100644
--- a/Essentials/src/com/earth2me/essentials/Trade.java
+++ b/Essentials/src/com/earth2me/essentials/Trade.java
@@ -100,7 +100,7 @@ public class Trade
}
if (getItemStack() != null
- && !user.getInventory().containsAtLeast(itemStack, itemStack.getAmount()))
+ && !user.getBase().getInventory().containsAtLeast(itemStack, itemStack.getAmount()))
{
throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
@@ -114,7 +114,7 @@ public class Trade
}
if (exp != null && exp > 0
- && SetExpFix.getTotalExperience(user) < exp)
+ && SetExpFix.getTotalExperience(user.getBase()) < exp)
{
throw new ChargeException(_("notEnoughExperience"));
}
@@ -138,7 +138,7 @@ public class Trade
if (getItemStack() != null)
{
// This stores the would be overflow
- Map<Integer, ItemStack> overFlow = InventoryWorkaround.addAllItems(user.getInventory(), getItemStack());
+ Map<Integer, ItemStack> overFlow = InventoryWorkaround.addAllItems(user.getBase().getInventory(), getItemStack());
if (overFlow != null)
{
@@ -154,8 +154,8 @@ public class Trade
case RETURN:
// Pay the user the items, and return overflow
- final Map<Integer, ItemStack> returnStack = InventoryWorkaround.addItems(user.getInventory(), getItemStack());
- user.updateInventory();
+ final Map<Integer, ItemStack> returnStack = InventoryWorkaround.addItems(user.getBase().getInventory(), getItemStack());
+ user.getBase().updateInventory();
if (ess.getSettings().isDebug())
{
@@ -166,8 +166,8 @@ public class Trade
case DROP:
// Pay the users the items directly, and drop the rest, will always return no overflow.
- final Map<Integer, ItemStack> leftOver = InventoryWorkaround.addItems(user.getInventory(), getItemStack());
- final Location loc = user.getLocation();
+ final Map<Integer, ItemStack> leftOver = InventoryWorkaround.addItems(user.getBase().getInventory(), getItemStack());
+ final Location loc = user.getBase().getLocation();
for (ItemStack loStack : leftOver.values())
{
final int maxStackSize = loStack.getType().getMaxStackSize();
@@ -197,11 +197,11 @@ public class Trade
{
ess.getLogger().log(Level.INFO, "paying " + user.getName() + " itemstack " + getItemStack().toString());
}
- user.updateInventory();
+ user.getBase().updateInventory();
}
if (getExperience() != null)
{
- SetExpFix.setTotalExperience(user, SetExpFix.getTotalExperience(user) + getExperience());
+ SetExpFix.setTotalExperience(user.getBase(), SetExpFix.getTotalExperience(user.getBase()) + getExperience());
}
return null;
}
@@ -230,12 +230,12 @@ public class Trade
{
ess.getLogger().log(Level.INFO, "charging user " + user.getName() + " itemstack " + getItemStack().toString());
}
- if (!user.getInventory().containsAtLeast(getItemStack(), getItemStack().getAmount()))
+ if (!user.getBase().getInventory().containsAtLeast(getItemStack(), getItemStack().getAmount()))
{
throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
- user.getInventory().removeItem(getItemStack());
- user.updateInventory();
+ user.getBase().getInventory().removeItem(getItemStack());
+ user.getBase().updateInventory();
}
if (command != null)
{
@@ -252,12 +252,12 @@ public class Trade
{
ess.getLogger().log(Level.INFO, "charging user " + user.getName() + " exp " + getExperience());
}
- final int experience = SetExpFix.getTotalExperience(user);
+ final int experience = SetExpFix.getTotalExperience(user.getBase());
if (experience < getExperience() && getExperience() > 0)
{
throw new ChargeException(_("notEnoughExperience"));
}
- SetExpFix.setTotalExperience(user, experience - getExperience());
+ SetExpFix.setTotalExperience(user.getBase(), experience - getExperience());
}
if (ess.getSettings().isDebug())
{
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java
index a6474b084..2aa2db6aa 100644
--- a/Essentials/src/com/earth2me/essentials/UserData.java
+++ b/Essentials/src/com/earth2me/essentials/UserData.java
@@ -502,7 +502,7 @@ public abstract class UserData extends PlayerExtension implements IConf
public boolean isIgnoredPlayer(final String userName)
{
final IUser user = ess.getUser(userName);
- if (user == null || !user.isOnline())
+ if (user == null || !user.getBase().isOnline())
{
return false;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
index 30c062be9..c9b7e54ed 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
@@ -23,7 +23,7 @@ public class Commandantioch extends EssentialsCommand
ess.broadcastMessage(user, "who being naughty in My sight, shall snuff it.");
}
- final Location loc = LocationUtil.getTarget(user);
+ final Location loc = LocationUtil.getTarget(user.getBase());
loc.getWorld().spawn(loc, TNTPrimed.class);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
index 082234c7e..3d46eeaef 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
@@ -36,7 +36,7 @@ public class Commandbigtree extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- final Location loc = LocationUtil.getTarget(user);
+ final Location loc = LocationUtil.getTarget(user.getBase());
final Location safeLocation = LocationUtil.getSafeDestination(loc);
final boolean success = user.getWorld().generateTree(safeLocation, tree);
if (success)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
index 9764eee59..ba2e9fd44 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
@@ -41,7 +41,7 @@ public class Commandclearinventory extends EssentialsCommand
if (sender instanceof User)
{
- players.add((Player)sender);
+ players.add(((User)sender).getBase());
}
if (allowAll && args.length > 0 && args[0].contentEquals("*"))
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandexp.java b/Essentials/src/com/earth2me/essentials/commands/Commandexp.java
index b4535414e..519292758 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandexp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandexp.java
@@ -159,7 +159,7 @@ public class Commandexp extends EssentialsCommand
private void showExp(final CommandSender sender, final User target)
{
- sender.sendMessage(_("exp", target.getDisplayName(), SetExpFix.getTotalExperience(target), target.getLevel(), SetExpFix.getExpUntilNextLevel(target)));
+ sender.sendMessage(_("exp", target.getDisplayName(), SetExpFix.getTotalExperience(target.getBase()), target.getLevel(), SetExpFix.getExpUntilNextLevel(target.getBase())));
}
//TODO: Limit who can give negative exp?
@@ -176,7 +176,7 @@ public class Commandexp extends EssentialsCommand
neededLevel += target.getLevel();
}
amount = (long)SetExpFix.getExpToLevel(neededLevel);
- SetExpFix.setTotalExperience(target, 0);
+ SetExpFix.setTotalExperience(target.getBase(), 0);
}
else
{
@@ -189,7 +189,7 @@ public class Commandexp extends EssentialsCommand
if (give)
{
- amount += SetExpFix.getTotalExperience(target);
+ amount += SetExpFix.getTotalExperience(target.getBase());
}
if (amount > Integer.MAX_VALUE)
{
@@ -199,7 +199,7 @@ public class Commandexp extends EssentialsCommand
{
amount = 0l;
}
- SetExpFix.setTotalExperience(target, (int)amount);
+ SetExpFix.setTotalExperience(target.getBase(), (int)amount);
sender.sendMessage(_("expSet", target.getDisplayName(), amount));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
index 1528dc353..c993217c1 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
@@ -27,7 +27,7 @@ public class Commandinvsee extends EssentialsCommand
if (args.length > 1 && user.isAuthorized("essentials.invsee.equip"))
{
- inv = server.createInventory(invUser, 9, "Equipped");
+ inv = server.createInventory(invUser.getBase(), 9, "Equipped");
inv.setContents(invUser.getInventory().getArmorContents());
}
else
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
index 62c002c12..e9e60bdce 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
@@ -39,7 +39,7 @@ public class Commandjump extends EssentialsCommand
try
{
- loc = LocationUtil.getTarget(user);
+ loc = LocationUtil.getTarget(user.getBase());
loc.setYaw(cloc.getYaw());
loc.setPitch(cloc.getPitch());
loc.setY(loc.getY() + 1);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
index b6a1c641f..1a02f09d7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
@@ -81,7 +81,7 @@ public class Commandmsg extends EssentialsCommand
}
matchPlayer.sendMessage(_("msgFormat", senderName, translatedMe, message));
- replyTo.setReplyTo(matchedUser);
+ replyTo.setReplyTo(matchPlayer);
ess.getUser(matchPlayer).setReplyTo(sender);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
index a48bbc4aa..de365a89a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
@@ -29,7 +29,7 @@ public class Commandnuke extends EssentialsCommand
int pos = 0;
for (String arg : args)
{
- targets.add(getPlayer(server, sender, args, pos));
+ targets.add(getPlayer(server, sender, args, pos).getBase());
pos++;
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandpotion.java b/Essentials/src/com/earth2me/essentials/commands/Commandpotion.java
index f5c760016..f09b797ef 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandpotion.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandpotion.java
@@ -57,7 +57,7 @@ public class Commandpotion extends EssentialsCommand
{
for (PotionEffect effect : pmeta.getCustomEffects())
{
- effect.apply(user);
+ effect.apply(user.getBase());
}
}
else if (args.length < 3)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
index dc1119242..9704dd5ee 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
@@ -73,7 +73,7 @@ public class Commandremove extends EssentialsCommand
}
}
- removeEntities(user, world, toRemove, radius);
+ removeEntities(user.getBase(), world, toRemove, radius);
}
@Override
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
index d4f23fd27..ea57ca7ad 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
@@ -29,7 +29,7 @@ public class Commandspawner extends EssentialsCommand
throw new NotEnoughArgumentsException(_("mobsAvailable", StringUtil.joinList(Mob.getMobList())));
}
- final Location target = LocationUtil.getTarget(user);
+ final Location target = LocationUtil.getTarget(user.getBase());
if (target == null || target.getBlock().getType() != Material.MOB_SPAWNER)
{
throw new Exception(_("mobSpawnTarget"));
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
index e9bdaa72a..fc2c1302c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
@@ -39,7 +39,7 @@ public class Commandtp extends EssentialsCommand
user.sendMessage(_("teleporting"));
final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
- user.getTeleport().teleport(player, charge, TeleportCause.COMMAND);
+ user.getTeleport().teleport(player.getBase(), charge, TeleportCause.COMMAND);
throw new NoChargeException();
case 4:
if (!user.isAuthorized("essentials.tp.others"))
@@ -84,7 +84,7 @@ public class Commandtp extends EssentialsCommand
{
throw new Exception(_("noPerm", "essentials.worlds." + toPlayer.getWorld().getName()));
}
- target.getTeleport().now(toPlayer, false, TeleportCause.COMMAND);
+ target.getTeleport().now(toPlayer.getBase(), false, TeleportCause.COMMAND);
user.sendMessage(_("teleporting"));
target.sendMessage(_("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName()));
break;
@@ -103,7 +103,7 @@ public class Commandtp extends EssentialsCommand
if (args.length == 2)
{
final User toPlayer = getPlayer(server, args, 1, true, false);
- target.getTeleport().now(toPlayer, false, TeleportCause.COMMAND);
+ target.getTeleport().now(toPlayer.getBase(), false, TeleportCause.COMMAND);
target.sendMessage(_("teleportAtoB", Console.NAME, toPlayer.getDisplayName()));
}
else if (args.length > 3)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
index e6924a406..cba791c6a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
@@ -63,7 +63,7 @@ public class Commandtpaccept extends EssentialsCommand
}
else
{
- target.getTeleport().teleport(user, charge, TeleportCause.COMMAND);
+ target.getTeleport().teleport(user.getBase(), charge, TeleportCause.COMMAND);
}
}
catch (Exception ex)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
index 73f8f26f1..4b3dd2783 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
@@ -50,7 +50,7 @@ public class Commandtpall extends EssentialsCommand
}
try
{
- player.getTeleport().now(target, false, TeleportCause.COMMAND);
+ player.getTeleport().now(target.getBase(), false, TeleportCause.COMMAND);
}
catch (Exception ex)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
index 729007151..45ed0dfb1 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
@@ -29,7 +29,7 @@ public class Commandtpo extends EssentialsCommand
throw new Exception(_("noPerm", "essentials.worlds." + player.getWorld().getName()));
}
user.sendMessage(_("teleporting"));
- user.getTeleport().now(player, false, TeleportCause.COMMAND);
+ user.getTeleport().now(player.getBase(), false, TeleportCause.COMMAND);
break;
default:
@@ -47,7 +47,7 @@ public class Commandtpo extends EssentialsCommand
throw new Exception(_("noPerm", "essentials.worlds." + toPlayer.getWorld().getName()));
}
- target.getTeleport().now(toPlayer, false, TeleportCause.COMMAND);
+ target.getTeleport().now(toPlayer.getBase(), false, TeleportCause.COMMAND);
target.sendMessage(_("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName()));
break;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
index eb9c3538c..c4e9cd907 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
@@ -31,7 +31,7 @@ public class Commandtpohere extends EssentialsCommand
}
// Verify permission
- player.getTeleport().now(user, false, TeleportCause.COMMAND);
+ player.getTeleport().now(user.getBase(), false, TeleportCause.COMMAND);
user.sendMessage(_("teleporting"));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
index 3df53d55c..5c5f25b78 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
@@ -60,7 +60,7 @@ public class Commandtree extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- final Location loc = LocationUtil.getTarget(user);
+ final Location loc = LocationUtil.getTarget(user.getBase());
final Location safeLocation = LocationUtil.getSafeDestination(loc);
final boolean success = user.getWorld().generateTree(safeLocation, tree);
if (success)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
index 5b518857c..b89a4d7f7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
@@ -33,7 +33,7 @@ public class Commandwhois extends EssentialsCommand
sender.sendMessage(_("whoisNick", user.getDisplayName()));
sender.sendMessage(_("whoisHealth", user.getHealth()));
sender.sendMessage(_("whoisHunger", user.getFoodLevel(), user.getSaturation()));
- sender.sendMessage(_("whoisExp", SetExpFix.getTotalExperience(user), user.getLevel()));
+ sender.sendMessage(_("whoisExp", SetExpFix.getTotalExperience(user.getBase()), user.getLevel()));
sender.sendMessage(_("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ()));
if (!ess.getSettings().isEcoDisabled())
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
index 86f23f34d..51e761cc8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
+++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
@@ -137,7 +137,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- run(server, (CommandSender)user.getBase(), commandLabel, args);
+ run(server, (CommandSender)(user.getBase()), commandLabel, args);
}
@Override
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
index f44c6177a..9cff65cf3 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
@@ -14,7 +14,7 @@ public class SignDisposal extends EssentialsSign
@Override
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess)
{
- player.getBase().openInventory(ess.getServer().createInventory(player, 36));
+ player.getBase().openInventory(ess.getServer().createInventory(player.getBase(), 36));
return true;
}
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java
index b5dd3fa73..cb7b842ff 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java
@@ -40,7 +40,7 @@ public class SignFree extends EssentialsSign
}
item.setAmount(item.getType().getMaxStackSize());
- Inventory invent = ess.getServer().createInventory(player, 36);
+ Inventory invent = ess.getServer().createInventory(player.getBase(), 36);
for (int i = 0; i < 36; i++) {
invent.addItem(item);
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java
index 686e304f3..e709b3eb7 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java
@@ -44,7 +44,7 @@ public class SignGameMode extends EssentialsSign
charge.isAffordableFor(player);
- performSetMode(mode.toLowerCase(Locale.ENGLISH), player);
+ performSetMode(mode.toLowerCase(Locale.ENGLISH), player.getBase());
player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
Trade.log("Sign", "gameMode", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
charge.charge(player);
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
index 156a570f8..7eaaf2e0f 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
@@ -50,7 +50,7 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
event.setMessage(FormatUtil.formatMessage(user, "essentials.chat", event.getMessage()));
String group = user.getGroup();
String world = user.getWorld().getName();
- Team team = user.getScoreboard().getPlayerTeam(user);
+ Team team = user.getScoreboard().getPlayerTeam(user.getBase());
String format = ess.getSettings().getChatFormat(group);
format = format.replace("{0}", group);
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
index e0bf9827c..c4f66097e 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
@@ -21,7 +21,7 @@ public class Commandsetxmpp extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- EssentialsXMPP.getInstance().setAddress(user, args[0]);
+ EssentialsXMPP.getInstance().setAddress(user.getBase(), args[0]);
user.sendMessage("XMPP address set to " + args[0]);
}
}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
index 21798521e..0c3b6e3b3 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
@@ -95,7 +95,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
break;
default:
final IUser sender = parent.getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant()));
- parent.broadcastMessage(sender, "=" + sender.getDisplayName() + ": " + message, StringUtils.parseBareAddress(chat.getParticipant()));
+ parent.broadcastMessage(sender, "=" + sender.getBase().getDisplayName() + ": " + message, StringUtils.parseBareAddress(chat.getParticipant()));
}
}
}