Oh silly booleans...

This commit is contained in:
Eric Stokes 2011-07-10 13:19:38 -06:00
parent 8a0301f162
commit 0edd3f80e0
2 changed files with 20 additions and 13 deletions

View File

@ -75,6 +75,7 @@ public class MVWorld {
// public List<String> monsters = new ArrayList<String>(); // Contain a list of Monsters which we want to ignore the Spawn Setting.
private Boolean pvp; // Does this World allow PVP?
private Boolean fakepvp;
private List<Integer> blockBlacklist; // Contain a list of Blocks which we won't allow on this World.
@ -421,9 +422,9 @@ public class MVWorld {
}
public void setPvp(Boolean pvp) {
boolean fakepvp = this.plugin.configMV.getBoolean("fakepvp", false);
if(fakepvp) {
this.world.setPVP(false);
this.fakepvp = this.plugin.configMV.getBoolean("fakepvp", false);
if(this.fakepvp) {
this.world.setPVP(true);
} else {
this.world.setPVP(pvp);
}
@ -497,4 +498,8 @@ public class MVWorld {
}
return false;
}
public boolean getFakePVP() {
return this.fakepvp;
}
}

View File

@ -44,20 +44,22 @@ public class InfoCommand extends Command {
}
}
private String[] buildEntireCommand(MVWorld world) {
StringBuilder sb = new StringBuilder();
ArrayList<String[]> pagedInfo = new ArrayList<String[]>();
String[] aPage = new String[5];
private List<String> buildEntireCommand(MVWorld world) {
List<String> page = new ArrayList<String>();
// World Name: 1
aPage[0] = "World: " + world.getName();
page.add("World: " + world.getName());
// World Scale: 1
aPage[1] = "World Scale: " + world.getScaling();
page.add("World Scale: " + world.getScaling());
// PVP: 1
aPage[2] = "PVP: " + world.getPvp();
aPage[3] = "Animals: " + world.allowAnimalSpawning();
aPage[4] = "Monsters: " + world.allowMonsterSpawning();
page.add("PVP (MV): " + world.getPvp());
page.add("PVP: " + world.getCBWorld().getPVP());
page.add("Fake PVP: " + world.getFakePVP());
page.add("Animals (MV): " + world.allowAnimalSpawning());
page.add("Animals: " + world.getCBWorld().getAllowAnimals());
page.add("Monsters (MV): " + world.allowMonsterSpawning());
page.add("Monsters: " + world.getCBWorld().getAllowMonsters());
// This feature is not mission critical and I am spending too much time on it...
// Stopping work on it for now --FF 20110623
@ -98,7 +100,7 @@ public class InfoCommand extends Command {
// }
// }
// }
return aPage;
return page;
}
private ChatColor getChatColor(boolean positive) {