summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-08-08 22:50:54 +0100
committerKHobbits <rob@khobbits.co.uk>2012-08-08 22:50:54 +0100
commitdd12e5db66d89dc7310651a9860cf061141e0d67 (patch)
treebe963750e3e02fb4ea4bcb47d4ec2f51f7206b38
parent8e50158af82bf72e4ec4995389230a18b1bab510 (diff)
downloadEssentials-dd12e5db66d89dc7310651a9860cf061141e0d67.tar
Essentials-dd12e5db66d89dc7310651a9860cf061141e0d67.tar.gz
Essentials-dd12e5db66d89dc7310651a9860cf061141e0d67.tar.lz
Essentials-dd12e5db66d89dc7310651a9860cf061141e0d67.tar.xz
Essentials-dd12e5db66d89dc7310651a9860cf061141e0d67.zip
Fix tp permissions check to check player typing command not teleportee.
If you don't want players inviting players to other worlds, do not give them essentials.world.<currentworld>
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtp.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpall.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtphere.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java2
5 files changed, 5 insertions, 5 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
index c1d4347c6..d6d6b76f9 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
@@ -58,7 +58,7 @@ public class Commandtp extends EssentialsCommand
throw new Exception(_("teleportDisabled", toPlayer.getDisplayName()));
}
if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions()
- && !target.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
+ && !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName()));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java
index dba6bdb87..9d389ecac 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java
@@ -26,7 +26,7 @@ public class Commandtpahere extends EssentialsCommand
throw new Exception(_("teleportDisabled", player.getDisplayName()));
}
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
- && !player.isAuthorized("essentials.world." + user.getWorld().getName()))
+ && !user.isAuthorized("essentials.world." + user.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
index 98e232609..6335a4a54 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
@@ -43,7 +43,7 @@ public class Commandtpall extends EssentialsCommand
continue;
}
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
- && !player.isAuthorized("essentials.world." + user.getWorld().getName()))
+ && !user.isAuthorized("essentials.world." + user.getWorld().getName()))
{
continue;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
index 804176bd3..92eb87226 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
@@ -23,7 +23,7 @@ public class Commandtphere extends EssentialsCommand
throw new Exception(_("teleportDisabled", player.getDisplayName()));
}
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
- && !player.isAuthorized("essentials.world." + user.getWorld().getName()))
+ && !user.isAuthorized("essentials.world." + user.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
index 3f650f96d..880c4e362 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
@@ -31,7 +31,7 @@ public class Commandtpohere extends EssentialsCommand
}
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
- && !player.isAuthorized("essentials.world." + user.getWorld().getName()))
+ && !user.isAuthorized("essentials.world." + user.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
}