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
commit510fe4365794e9a474deabfe72674ff4bce3f48a (patch)
treea47fbf5a3151c3e65bf70042eed579aa983685b6
parent3ef591d74ffc00ed7a7d41892f64028b88782e79 (diff)
downloadEssentials-510fe4365794e9a474deabfe72674ff4bce3f48a.tar
Essentials-510fe4365794e9a474deabfe72674ff4bce3f48a.tar.gz
Essentials-510fe4365794e9a474deabfe72674ff4bce3f48a.tar.lz
Essentials-510fe4365794e9a474deabfe72674ff4bce3f48a.tar.xz
Essentials-510fe4365794e9a474deabfe72674ff4bce3f48a.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