diff options
author | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-14 21:14:16 +0000 |
---|---|---|
committer | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-14 21:14:16 +0000 |
commit | 2b1164f0211075fe749c2b481ee8d21cb75b1dbc (patch) | |
tree | 33af3343a9518cc9ea2ad57fdf1b889ebbb4e052 /EssentialsProtect/src/com/earth2me | |
parent | 7e93ef0bd02845b0fc8375efa08a35781805b745 (diff) | |
download | Essentials-2b1164f0211075fe749c2b481ee8d21cb75b1dbc.tar Essentials-2b1164f0211075fe749c2b481ee8d21cb75b1dbc.tar.gz Essentials-2b1164f0211075fe749c2b481ee8d21cb75b1dbc.tar.lz Essentials-2b1164f0211075fe749c2b481ee8d21cb75b1dbc.tar.xz Essentials-2b1164f0211075fe749c2b481ee8d21cb75b1dbc.zip |
[trunk] add setting warn-on-build-disallow to protect. setting this will give users with build:false a warning
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1189 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsProtect/src/com/earth2me')
2 files changed, 9 insertions, 2 deletions
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; } |