Tweaks to the settings file

This commit is contained in:
nossr50 2010-12-31 08:26:37 -08:00
parent da40f79d2a
commit 47e5a07b82
2 changed files with 46 additions and 54 deletions

View File

@ -120,6 +120,7 @@ public class vMinecraftListener extends PluginListener {
}
public boolean onIgnite(Block block, Player player) {
if(vMinecraftSettings.getInstance().stopFire()){
//There are 3 ways fire can spread
//1 = lava, 2 = lighter, 3 = spread (other fire blocks)

View File

@ -1,5 +1,6 @@
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
//=====================================================================
@ -40,7 +41,6 @@ public class vMinecraftSettings {
cmdSay = false,
cmdWho = false,
stopFire = false,
stopTnt = false,
cmdHeal = false,
cmdSuicide = false,
cmdAdminToggle = false,
@ -92,7 +92,6 @@ public class vMinecraftSettings {
writer.write("FFF=true\r\n");
writer.write("\r\n");
writer.write("#Admin Settings\r\n");
writer.write("#Enables or disables players spawning to their home location\r\n");
writer.write("playerspawn=true\r\n");
writer.write("#Enables or disables the admin only chat\r\n");
@ -125,7 +124,6 @@ public class vMinecraftSettings {
writer.write("#Global Messages\r\n");
writer.write("#Enable or Disable sending announcements about sensitive commands to the entire server\r\n");
writer.write("globalmessages=true\r\n");
writer.write("\r\n");
writer.write("#Adding player names to this list will have them start off in ezmodo\r\n");
writer.write("ezModo=\r\n");
writer.write("#Stop fire from spreading\r\n");
@ -197,21 +195,15 @@ public class vMinecraftSettings {
String[] tempEz = properties.getString("ezModo").split(",");
String[] fireblocks = properties.getString("fireblocks").split(",");
fireblockan = new ArrayList<Integer>();
for(int x = 0;x <= fireblocks.length; x++)
for(int x = 0;x < fireblocks.length; x++)
{
fireblockan.add(Integer.parseInt(fireblocks[x]));
x++;
}
ezModo = new ArrayList<String>();
for(String ezName : tempEz)
ezModo.add(ezName);
ezModo.addAll(Arrays.asList(tempEz));
ranks = properties.getString("ranks").split(",");
log.log(Level.INFO, "vminecraft plugin successfully loaded");
}
catch (Exception e)
{
@ -253,7 +245,6 @@ public class vMinecraftSettings {
public boolean cmdWho() {return cmdWho;}
public boolean stopFire() {return stopFire;}
public boolean lavaSpread() {return lavaspread;}
public boolean stopTnt() {return stopTnt;}
public boolean cmdSuicide() {return cmdSuicide;}
public boolean cmdHeal() {return cmdHeal;}
public ArrayList<Integer> getFireBlockIds() {return fireblockan;}