From 8417c5e1f06a51a0b2dd305902465c4a02c88b80 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 4 Dec 2011 22:09:36 +0100 Subject: New permission essentials.spawn.others --- .../src/com/earth2me/essentials/spawn/Commandspawn.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'EssentialsSpawn/src/com') diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java index e38de76cc..635d782f2 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java @@ -21,11 +21,11 @@ public class Commandspawn extends EssentialsCommand { final Trade charge = new Trade(this.getName(), ess); charge.isAffordableFor(user); - if (args.length > 0 && user.isAuthorized("essentials.spawn.other")) + if (args.length > 0 && user.isAuthorized("essentials.spawn.others")) { - User otherUser = getPlayer(server, args, 0); + final User otherUser = getPlayer(server, args, 0); otherUser.getTeleport().respawn(ess.getSpawn(), charge); - if (otherUser != user) + if (!otherUser.equals(user)) { otherUser.sendMessage(_("teleportAtoB", user.getDisplayName(), "spawn")); user.sendMessage(_("teleporting")); @@ -44,7 +44,7 @@ public class Commandspawn extends EssentialsCommand { throw new NotEnoughArgumentsException(); } - User user = getPlayer(server, args, 0); + final User user = getPlayer(server, args, 0); user.getTeleport().respawn(ess.getSpawn(), null); user.sendMessage(_("teleportAtoB", user.getDisplayName(), "spawn")); sender.sendMessage(_("teleporting")); -- cgit v1.2.3