浏览代码

First version of fire antigriefs.

nossr50 14 年之前
父节点
当前提交
55f48764fe
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 1 0
      vMinecraft.java
  2. 5 1
      vMinecraftSettings.java

+ 1 - 0
vMinecraft.java

@@ -28,6 +28,7 @@ public class vMinecraft extends Plugin {
         etc.getLoader().addListener(PluginLoader.Hook.IGNITE, listener, this, PluginListener.Priority.HIGH);
         etc.getLoader().addListener(PluginLoader.Hook.IGNITE, listener, this, PluginListener.Priority.HIGH);
         etc.getLoader().addListener(PluginLoader.Hook.DAMAGE, listener, this, PluginListener.Priority.MEDIUM);
         etc.getLoader().addListener(PluginLoader.Hook.DAMAGE, listener, this, PluginListener.Priority.MEDIUM);
         etc.getLoader().addListener(PluginLoader.Hook.EXPLODE, listener, this, PluginListener.Priority.HIGH);
         etc.getLoader().addListener(PluginLoader.Hook.EXPLODE, listener, this, PluginListener.Priority.HIGH);
+        etc.getLoader().addListener(PluginLoader.Hook.LIQUID_DESTROY, listener, this, PluginListener.Priority.MEDIUM);
         etc.getLoader().addListener(PluginLoader.Hook.HEALTH_CHANGE, listener, this, PluginListener.Priority.MEDIUM);
         etc.getLoader().addListener(PluginLoader.Hook.HEALTH_CHANGE, listener, this, PluginListener.Priority.MEDIUM);
         }
         }
     }
     }

+ 5 - 1
vMinecraftSettings.java

@@ -40,6 +40,8 @@ public class vMinecraftSettings {
 	static ArrayList<String> ezModo = new ArrayList<String>();
 	static ArrayList<String> ezModo = new ArrayList<String>();
         //An array of players currently toggled for admin chat
         //An array of players currently toggled for admin chat
         static ArrayList<String> adminChatList = new ArrayList<String>();
         static ArrayList<String> adminChatList = new ArrayList<String>();
+        //An array of blocks that won't catch on fire
+        static ArrayList<String> fireNoSpread = new ArrayList<String>();
 
 
 	
 	
 	private PropertiesFile properties;
 	private PropertiesFile properties;
@@ -88,6 +90,8 @@ public class vMinecraftSettings {
 				writer.write("#The health ezmodo people will have while in ezmodo. Don't set to 0\r\n");
 				writer.write("#The health ezmodo people will have while in ezmodo. Don't set to 0\r\n");
 				writer.write("ezHealth=30\r\n");
 				writer.write("ezHealth=30\r\n");
 				writer.write("stopFire=false\r\n");
 				writer.write("stopFire=false\r\n");
+                                writer.write("#Flame Immune blocks will never have fire spread to them, seperate with comma. Needs stopFire to be true\r\n");
+                                writer.write("fireNoSpread=5,17,18");
 				writer.write("stopTnt=false\r\n");
 				writer.write("stopTnt=false\r\n");
 				writer.write("rules=Rules@#1: No griefing@#2: No griefing\r\n");
 				writer.write("rules=Rules@#1: No griefing@#2: No griefing\r\n");
 				writer.write("#Death messages, seperate them by comma. All death messages start with the player name and a space.\r\n");
 				writer.write("#Death messages, seperate them by comma. All death messages start with the player name and a space.\r\n");
@@ -137,7 +141,7 @@ public class vMinecraftSettings {
 			stopTnt = properties.getBoolean("stopTNT",true);
 			stopTnt = properties.getBoolean("stopTNT",true);
 			rules = properties.getString("rules", "").split("@");
 			rules = properties.getString("rules", "").split("@");
 			deathMessages = properties.getString("deathmessages", "").split(",");
 			deathMessages = properties.getString("deathmessages", "").split(",");
-			
+                        fireNoSpread.add(properties.getString("fireNoSpread", "").split(",").toString());
 			String[] tempEz = properties.getString("ezModo").split(",");
 			String[] tempEz = properties.getString("ezModo").split(",");
 			ezModo = new ArrayList<String>();
 			ezModo = new ArrayList<String>();
 			for(String ezName : tempEz)
 			for(String ezName : tempEz)