mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
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:
parent
f3b278eac2
commit
019b49ef11
21 changed files with 406 additions and 79 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue