[trunk] cleanup, prevent lightning fire spread

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1280 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
ementalo 2011-04-26 21:36:51 +00:00
parent 530fc32515
commit 63f2eb157a
5 changed files with 9 additions and 56 deletions

View file

@ -327,7 +327,8 @@ public class Settings implements IConf
for (CreatureType ct : CreatureType.values()) {
String name = ct.toString().toLowerCase();
epSettings.put("protect.prevent.spawn."+name, config.getBoolean("protect.prevent.spawn."+name, false));
}
}
epSettings.put("protect.prevent.lightning-fire-spread", config.getBoolean("protect.prevent.lightning-fire-spread", false));
return epSettings;
}

View file

@ -297,6 +297,7 @@ protect:
fire-spread: false
lava-fire-spread: false
flint-fire: false
lightning-fire-spread: false
portal-creation: false
tnt-explosion: false
creeper-explosion: false

View file

@ -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.

View file

@ -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

View file

@ -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);
}
}
}
}*/
}
}