diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 13df70904..3d2b55739 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -438,6 +438,11 @@ public class Settings implements IConf public Boolean spawnIfNoHome() { - return config.getBoolean("spawn-if-no-home", true); + return config.getBoolean("spawn-if-no-home", false); + } + + public Boolean warnOnBuildDisallow() + { + return config.getBoolean("warn-on-build-disallow", false); } } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index e9473f0af..11d3c323e 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -378,6 +378,9 @@ protect: # Set true to disable building for those people build: true + #Should we tell people they are not allowed to build + warn-on-build-disallow: false + diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index bd9991f19..c1aadeda7 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -2,8 +2,7 @@ package com.earth2me.essentials.protect; import com.earth2me.essentials.Essentials; import com.earth2me.essentials.User; -import java.util.logging.Level; -import java.util.logging.Logger; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -46,6 +45,10 @@ public class EssentialsProtectBlockListener extends BlockListener if (EssentialsProtect.playerSettings.get("protect.disable.build") && !user.canBuild()) { + if(Essentials.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(ChatColor.RED + "You are not permitted to build"); + } event.setCancelled(true); return; } diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java index 330cb7da8..c3eff1803 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java @@ -40,6 +40,10 @@ public class EssentialsProtectPlayerListener extends PlayerListener if (EssentialsProtect.playerSettings.get("protect.disable.build") && !user.canBuild()) { + if(Essentials.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(ChatColor.RED + "You are not permitted to build"); + } event.setCancelled(true); return; }