Updated EssentialsSpawn to use the new config code

/spawn and /home now call the PlayerRespawnEvent to make it more compatible with other plugins.
This commit is contained in:
snowleo 2011-12-06 13:41:29 +01:00
parent f3b278eac2
commit 019b49ef11
21 changed files with 406 additions and 79 deletions

View file

@ -24,7 +24,7 @@ public class Commandspawn extends EssentialsCommand
if (args.length > 0 && user.isAuthorized("essentials.spawn.others"))
{
final User otherUser = getPlayer(server, args, 0);
otherUser.getTeleport().respawn(ess.getSpawn(), charge);
otherUser.getTeleport().respawn(charge);
if (!otherUser.equals(user))
{
otherUser.sendMessage(_("teleportAtoB", user.getDisplayName(), "spawn"));
@ -33,7 +33,7 @@ public class Commandspawn extends EssentialsCommand
}
else
{
user.getTeleport().respawn(ess.getSpawn(), charge);
user.getTeleport().respawn(charge);
}
}
@ -45,7 +45,7 @@ public class Commandspawn extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
final User user = getPlayer(server, args, 0);
user.getTeleport().respawn(ess.getSpawn(), null);
user.getTeleport().respawn(null);
user.sendMessage(_("teleportAtoB", user.getDisplayName(), "spawn"));
sender.sendMessage(_("teleporting"));
}