summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect
diff options
context:
space:
mode:
authorementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-04-26 21:36:51 +0000
committerementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-04-26 21:36:51 +0000
commitcc5eb6e3e1c014184a24d3750cf42276db6950ef (patch)
tree1b9013b84ab844dec46acff650104df991e4bc3c /EssentialsProtect
parente2173660c588ca0607e6710f565bfda6d18fc777 (diff)
downloadEssentials-cc5eb6e3e1c014184a24d3750cf42276db6950ef.tar
Essentials-cc5eb6e3e1c014184a24d3750cf42276db6950ef.tar.gz
Essentials-cc5eb6e3e1c014184a24d3750cf42276db6950ef.tar.lz
Essentials-cc5eb6e3e1c014184a24d3750cf42276db6950ef.tar.xz
Essentials-cc5eb6e3e1c014184a24d3750cf42276db6950ef.zip
[trunk] cleanup, prevent lightning fire spread
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1280 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsProtect')
-rw-r--r--EssentialsProtect/src/README.TXT30
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java6
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java25
3 files changed, 6 insertions, 55 deletions
diff --git a/EssentialsProtect/src/README.TXT b/EssentialsProtect/src/README.TXT
deleted file mode 100644
index 4bb1b5c05..000000000
--- a/EssentialsProtect/src/README.TXT
+++ /dev/null
@@ -1,30 +0,0 @@
-EssentialsProtect:
-
-REQUIRED : Essentials.jar. Also sqlite.jar, mysql.jar in the bukkit lib folder.
-
-Config Settings in plugins/Essentials/config.yml
-
-protect:
- datatype: 'sqlite' type of db, options sqlite or mysql
- username: 'root' mysql username
- pasword: 'root' mysql password
- mysqlDb: 'jdbc:mysql://localhost:3306/minecraft' mysql database location
- protectSigns: true
- protectRails: true
- protectBlockBelow: true
- preventBlockOnRail: false prevents block placement on protected rails
-
-On startup creates a sqlite database under /plugins/essentials called EssentialsProtect.db
-
-Permissions:
-
-"essentials.protect" - allows protection
-"essentials.protect.admin" can delete protected blocks / query protection by right clicking a protected item.
-
-Usage:
-
-Place a sign or rail and they (plus optionally the block below) will be protected. Only the owners and those with admin permissions can destroy.
-
-
-
-
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
index ab38761d1..640f70d8f 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
@@ -158,6 +158,12 @@ public class EssentialsProtectBlockListener extends BlockListener
event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.lava-fire-spread"));
return;
}
+
+ if (event.getCause().equals(BlockIgniteEvent.IgniteCause.LIGHTNING))
+ {
+ event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.lightning-fire-spread"));
+ return;
+ }
}
@Override
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
index d38e89760..8de1ee701 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
@@ -68,30 +68,5 @@ public class EssentialsProtectPlayerListener extends PlayerListener
{
parent.alert(user, item.getType().toString(), "used: ");
}
-
- /*if (item != null && item.getTypeId() == 323)
- {
- if (EssentialsProtect.genSettings.get("protect.protect.signs"))
- {
- if (user.isAuthorized("essentials.protect"))
- {
-
- signBlockX = blockClicked.getX();
- signBlockY = blockClicked.getY();
- signBlockZ = blockClicked.getZ();
-
- initialize();
- spData.insertProtectionIntoDb(user.getWorld().getName(), user.getName(), signBlockX,
- signBlockY + 1, signBlockZ);
-
- if (EssentialsProtect.genSettings.get("protect.protect.block-below"))
- {
- spData.insertProtectionIntoDb(user.getWorld().getName(), user.getName(), signBlockX,
- signBlockY, signBlockZ);
- }
- }
- }
- }*/
-
}
}