summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-05-22 17:54:19 +0100
committerKHobbits <rob@khobbits.co.uk>2012-05-22 17:54:19 +0100
commit74f0babc7d364809132a01f73e59eba46a0899a4 (patch)
treeff3ca67ca46e780a6e8afe92e9b0f1f4ee3f1726
parentfa58503c9f561a388f9cf1b1cc11f4b6de74c7e2 (diff)
downloadEssentials-74f0babc7d364809132a01f73e59eba46a0899a4.tar
Essentials-74f0babc7d364809132a01f73e59eba46a0899a4.tar.gz
Essentials-74f0babc7d364809132a01f73e59eba46a0899a4.tar.lz
Essentials-74f0babc7d364809132a01f73e59eba46a0899a4.tar.xz
Essentials-74f0babc7d364809132a01f73e59eba46a0899a4.zip
Separate toggle for world teleports using homes.
-rw-r--r--Essentials/src/com/earth2me/essentials/ISettings.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhome.java2
-rw-r--r--Essentials/src/config.yml7
4 files changed, 15 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java
index 8eca8f06f..c179aee0f 100644
--- a/Essentials/src/com/earth2me/essentials/ISettings.java
+++ b/Essentials/src/com/earth2me/essentials/ISettings.java
@@ -159,6 +159,8 @@ public interface ISettings extends IConf
boolean getRepairEnchanted();
boolean isWorldTeleportPermissions();
+
+ boolean isWorldHomePermissions();
boolean registerBackInListener();
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index 5d49c52b8..ff3ec12aa 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -711,6 +711,12 @@ public class Settings implements ISettings
{
return config.getBoolean("world-teleport-permissions", false);
}
+
+ @Override
+ public boolean isWorldHomePermissions()
+ {
+ return config.getBoolean("world-home-permissions", false);
+ }
private boolean registerBackInListener;
@Override
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
index d838411cf..2c91a06c9 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
@@ -101,7 +101,7 @@ public class Commandhome extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- if (user.getWorld() != loc.getWorld() && ess.getSettings().isWorldTeleportPermissions()
+ if (user.getWorld() != loc.getWorld() && ess.getSettings().isWorldHomePermissions()
&& !user.isAuthorized("essentials.world." + loc.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + loc.getWorld().getName()));
diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml
index 06ca57ad5..0ec761956 100644
--- a/Essentials/src/config.yml
+++ b/Essentials/src/config.yml
@@ -285,7 +285,7 @@ no-god-in-worlds:
# - world_nether
# Set to true to enable per-world permissions for teleporting between worlds with essentials commands
-# This applies to /world, /home, /back, /tp[a|o][here|all], but not warps.
+# 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>
world-teleport-permissions: false
@@ -320,6 +320,11 @@ spawn-if-no-home: true
# Allows people to set their bed at daytime
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>
+world-home-permissions: false
+
# Allow players to have multiple homes.
# Players need essentials.sethome.multiple before they can have more than 1 home, default to 'default' below.
# Define different amounts of multiple homes for different permissions, e.g. essentials.sethome.multiple.vip