diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-11 10:49:45 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-11 10:49:45 +0000 |
commit | b529b17fea6259e2b298423efbc55fd777bc7bfe (patch) | |
tree | f8afc70265593e7c9340e8d569310408e3b6e850 /EssentialsProtect/src/com/earth2me | |
parent | dd4a22c379072e8a01d224f00b040c8240722712 (diff) | |
download | Essentials-b529b17fea6259e2b298423efbc55fd777bc7bfe.tar Essentials-b529b17fea6259e2b298423efbc55fd777bc7bfe.tar.gz Essentials-b529b17fea6259e2b298423efbc55fd777bc7bfe.tar.lz Essentials-b529b17fea6259e2b298423efbc55fd777bc7bfe.tar.xz Essentials-b529b17fea6259e2b298423efbc55fd777bc7bfe.zip |
[trunk] Protect: new prevent.portal-creation
If enabled, players can't create portals using fire.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1177 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsProtect/src/com/earth2me')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index da790e0d5..bd9991f19 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -2,6 +2,8 @@ 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.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -129,6 +131,14 @@ public class EssentialsProtectBlockListener extends BlockListener event.setCancelled(true); return; } + + if (event.getBlock().getType() == Material.OBSIDIAN || + event.getBlock().getFace(BlockFace.DOWN).getType() == Material.OBSIDIAN) + { + event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.portal-creation")); + return; + } + if ((event.getCause().equals(BlockIgniteEvent.IgniteCause.SPREAD))) { event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.fire-spread")); |