mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-24 00:51:37 +01:00
Move the per world permissions:
essentials.world.worldname is moved to essentials.worlds.worldname
This commit is contained in:
parent
78a580bc40
commit
f9659dae68
@ -17,9 +17,9 @@ public class Commandback extends EssentialsCommand
|
||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
if (user.getWorld() != user.getLastLocation().getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + user.getLastLocation().getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + user.getLastLocation().getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + user.getLastLocation().getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + user.getLastLocation().getWorld().getName()));
|
||||
}
|
||||
final Trade charge = new Trade(this.getName(), ess);
|
||||
charge.isAffordableFor(user);
|
||||
|
@ -102,9 +102,9 @@ public class Commandhome extends EssentialsCommand
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
if (user.getWorld() != loc.getWorld() && ess.getSettings().isWorldHomePermissions()
|
||||
&& !user.isAuthorized("essentials.world." + loc.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + loc.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + loc.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + loc.getWorld().getName()));
|
||||
}
|
||||
user.getTeleport().home(loc, charge);
|
||||
}
|
||||
|
@ -31,9 +31,9 @@ public class Commandtp extends EssentialsCommand
|
||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + player.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + player.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + player.getWorld().getName()));
|
||||
}
|
||||
user.sendMessage(_("teleporting"));
|
||||
final Trade charge = new Trade(this.getName(), ess);
|
||||
@ -58,9 +58,9 @@ public class Commandtp extends EssentialsCommand
|
||||
throw new Exception(_("teleportDisabled", toPlayer.getDisplayName()));
|
||||
}
|
||||
if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + toPlayer.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + toPlayer.getWorld().getName()));
|
||||
}
|
||||
target.getTeleport().now(toPlayer, false, TeleportCause.COMMAND);
|
||||
target.sendMessage(_("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName()));
|
||||
|
@ -26,9 +26,9 @@ public class Commandtpa extends EssentialsCommand
|
||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + player.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + player.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + player.getWorld().getName()));
|
||||
}
|
||||
if (!player.isIgnoredPlayer(user))
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ public class Commandtpaall extends EssentialsCommand
|
||||
continue;
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + user.getWorld().getName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -27,14 +27,14 @@ public class Commandtpaccept extends EssentialsCommand
|
||||
|
||||
if (user.isTpRequestHere() && ((!target.isAuthorized("essentials.tpahere") && !target.isAuthorized("essentials.tpaall"))
|
||||
|| (user.getWorld() != target.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))))
|
||||
&& !user.isAuthorized("essentials.worlds." + user.getWorld().getName()))))
|
||||
{
|
||||
throw new Exception(_("noPendingRequest"));
|
||||
}
|
||||
|
||||
if (!user.isTpRequestHere() && (!target.isAuthorized("essentials.tpa")
|
||||
|| (user.getWorld() != target.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + target.getWorld().getName()))))
|
||||
&& !user.isAuthorized("essentials.worlds." + target.getWorld().getName()))))
|
||||
{
|
||||
throw new Exception(_("noPendingRequest"));
|
||||
}
|
||||
|
@ -26,9 +26,9 @@ public class Commandtpahere extends EssentialsCommand
|
||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + user.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + user.getWorld().getName()));
|
||||
}
|
||||
player.requestTeleport(user, true);
|
||||
player.sendMessage(_("teleportHereRequest", user.getDisplayName()));
|
||||
|
@ -43,7 +43,7 @@ public class Commandtpall extends EssentialsCommand
|
||||
continue;
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + user.getWorld().getName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -23,9 +23,9 @@ public class Commandtphere extends EssentialsCommand
|
||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + user.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + user.getWorld().getName()));
|
||||
}
|
||||
player.getTeleport().teleport(user, new Trade(this.getName(), ess), TeleportCause.COMMAND);
|
||||
user.sendMessage(_("teleporting"));
|
||||
|
@ -28,9 +28,9 @@ public class Commandtpo extends EssentialsCommand
|
||||
throw new NoSuchFieldException(_("playerNotFound"));
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + player.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + player.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + player.getWorld().getName()));
|
||||
}
|
||||
user.sendMessage(_("teleporting"));
|
||||
user.getTeleport().now(player, false, TeleportCause.COMMAND);
|
||||
@ -52,9 +52,9 @@ public class Commandtpo extends EssentialsCommand
|
||||
}
|
||||
|
||||
if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + toPlayer.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + toPlayer.getWorld().getName()));
|
||||
}
|
||||
|
||||
target.getTeleport().now(toPlayer, false, TeleportCause.COMMAND);
|
||||
|
@ -31,9 +31,9 @@ public class Commandtpohere extends EssentialsCommand
|
||||
}
|
||||
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.worlds." + user.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + user.getWorld().getName()));
|
||||
}
|
||||
|
||||
// Verify permission
|
||||
|
@ -54,9 +54,9 @@ public class Commandworld extends EssentialsCommand
|
||||
}
|
||||
}
|
||||
|
||||
if (ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + world.getName()))
|
||||
if (ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.worlds." + world.getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + world.getName()));
|
||||
throw new Exception(_("noPerm", "essentials.worlds." + world.getName()));
|
||||
}
|
||||
|
||||
double factor;
|
||||
|
@ -298,7 +298,7 @@ no-god-in-worlds:
|
||||
|
||||
# Set to true to enable per-world permissions for teleporting between worlds with essentials commands
|
||||
# This applies to /world, /back, /tp[a|o][here|all], but not warps.
|
||||
# Give someone permission to teleport to a world with essentials.world.<worldname>
|
||||
# Give someone permission to teleport to a world with essentials.worlds.<worldname>
|
||||
# This does not effect the /home command, there is a seperate toggle below for this.
|
||||
world-teleport-permissions: false
|
||||
|
||||
@ -338,7 +338,7 @@ update-bed-at-daytime: true
|
||||
|
||||
# Set to true to enable per-world permissions for using homes to teleport between worlds
|
||||
# This applies to the /home only.
|
||||
# Give someone permission to teleport to a world with essentials.world.<worldname>
|
||||
# Give someone permission to teleport to a world with essentials.worlds.<worldname>
|
||||
world-home-permissions: false
|
||||
|
||||
# Allow players to have multiple homes.
|
||||
|
Loading…
Reference in New Issue
Block a user