mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-14 22:55:55 +01:00
New permission essentials.spawn.others
This commit is contained in:
parent
ec3586c08c
commit
8417c5e1f0
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user