Fixed typo

This commit is contained in:
boy0001 2015-07-31 20:47:10 +10:00
parent 6f90700187
commit 9f89928120
4 changed files with 159 additions and 150 deletions

View File

@ -1449,7 +1449,7 @@ public class PS {
options.put("chat.fancy", Settings.FANCY_CHAT);
options.put("metrics", true);
options.put("debug", true);
options.put("auto_update", false);
options.put("update-notifications", true);
for (final Entry<String, Object> node : options.entrySet()) {
if (!config.contains(node.getKey())) {

View File

@ -71,7 +71,7 @@ public class Info extends SubCommand {
public static String getPlayerName(final UUID uuid) {
if (uuid == null) {
return "unknown";
return C.UNKNOWN.s();
}
if (uuid.equals(DBFunc.everyone) || uuid.toString().equalsIgnoreCase(DBFunc.everyone.toString())) {
return "everyone";

View File

@ -138,8 +138,10 @@ public class EntityWrapper {
if (this.aged.locked) {
entity.setAgeLock(this.aged.locked);
}
if (this.aged.age > 0) {
entity.setAge(this.aged.age);
}
}
public void storeAgeable(final Ageable aged) {
this.aged = new AgeableStats();
@ -432,9 +434,9 @@ public class EntityWrapper {
} catch (final Exception e) {
}
}
entity.setFallDistance(this.base.fall);
entity.setFireTicks(this.base.fire);
entity.setTicksLived(this.base.age);
if (this.base.fall != 0) entity.setFallDistance(this.base.fall);
if (this.base.fire != 0) entity.setFireTicks(this.base.fire);
if (this.base.age != 0) entity.setTicksLived(this.base.age);
entity.setVelocity(new Vector(this.base.v_x, this.base.v_y, this.base.v_z));
if (this.depth == 1) {
return entity;

View File

@ -565,10 +565,10 @@ public class BukkitChunkManager extends ChunkManager {
chest.getInventory().setContents(chestContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate chest: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate chest: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate chest: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate chest: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : signContents.keySet()) {
@ -584,10 +584,10 @@ public class BukkitChunkManager extends ChunkManager {
}
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate sign: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate sign: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate sign: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate sign: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : dispenserContents.keySet()) {
@ -598,10 +598,10 @@ public class BukkitChunkManager extends ChunkManager {
((Dispenser) (state)).getInventory().setContents(dispenserContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : dropperContents.keySet()) {
@ -612,10 +612,10 @@ public class BukkitChunkManager extends ChunkManager {
((Dropper) (state)).getInventory().setContents(dropperContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate dispenser: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : beaconContents.keySet()) {
@ -626,10 +626,10 @@ public class BukkitChunkManager extends ChunkManager {
((Beacon) (state)).getInventory().setContents(beaconContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate beacon: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate beacon: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate beacon: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate beacon: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : jukeDisc.keySet()) {
@ -640,10 +640,10 @@ public class BukkitChunkManager extends ChunkManager {
((Jukebox) (state)).setPlaying(Material.getMaterial(jukeDisc.get(loc)));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to restore jukebox: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore jukebox: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate jukebox: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate jukebox: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : skullData.keySet()) {
@ -663,10 +663,10 @@ public class BukkitChunkManager extends ChunkManager {
}
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to restore skull: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore skull: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate skull: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate skull: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : hopperContents.keySet()) {
@ -677,10 +677,10 @@ public class BukkitChunkManager extends ChunkManager {
((Hopper) (state)).getInventory().setContents(hopperContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate hopper: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate hopper: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate hopper: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate hopper: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : noteBlockContents.keySet()) {
@ -691,10 +691,10 @@ public class BukkitChunkManager extends ChunkManager {
((NoteBlock) (state)).setNote(noteBlockContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate note block: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate note block: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate note block: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate note block: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : brewTime.keySet()) {
@ -704,10 +704,10 @@ public class BukkitChunkManager extends ChunkManager {
if (state instanceof BrewingStand) {
((BrewingStand) (state)).setBrewingTime(brewTime.get(loc));
} else {
PS.debug("&c[WARN] Plot clear failed to restore brewing stand cooking: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore brewing stand cooking: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to restore brewing stand cooking: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore brewing stand cooking: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : spawnerData.keySet()) {
@ -718,10 +718,10 @@ public class BukkitChunkManager extends ChunkManager {
((CreatureSpawner) (state)).setCreatureTypeId(spawnerData.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to restore spawner type: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore spawner type: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to restore spawner type: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore spawner type: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : cmdData.keySet()) {
@ -732,10 +732,10 @@ public class BukkitChunkManager extends ChunkManager {
((CommandBlock) (state)).setCommand(cmdData.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to restore command block: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore command block: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to restore command block: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore command block: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : brewingStandContents.keySet()) {
@ -746,10 +746,10 @@ public class BukkitChunkManager extends ChunkManager {
((BrewingStand) (state)).getInventory().setContents(brewingStandContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate brewing stand: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate brewing stand: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate brewing stand: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate brewing stand: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : furnaceTime.keySet()) {
@ -761,10 +761,10 @@ public class BukkitChunkManager extends ChunkManager {
((Furnace) (state)).setBurnTime(time[0]);
((Furnace) (state)).setCookTime(time[1]);
} else {
PS.debug("&c[WARN] Plot clear failed to restore furnace cooking: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore furnace cooking: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to restore furnace cooking: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to restore furnace cooking: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : furnaceContents.keySet()) {
@ -775,10 +775,10 @@ public class BukkitChunkManager extends ChunkManager {
((Furnace) (state)).getInventory().setContents(furnaceContents.get(loc));
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate furnace: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate furnace: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate furnace: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate furnace: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
for (final BlockLoc loc : bannerBase.keySet()) {
@ -795,10 +795,10 @@ public class BukkitChunkManager extends ChunkManager {
}
state.update(true);
} else {
PS.debug("&c[WARN] Plot clear failed to regenerate banner: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate banner: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
} catch (final Exception e) {
PS.debug("&c[WARN] Plot clear failed to regenerate banner: " + loc.x + x_offset + "," + loc.y + "," + loc.z + z_offset);
PS.debug("&c[WARN] Plot clear failed to regenerate banner: " + (loc.x + x_offset) + "," + (loc.y) + "," + (loc.z + z_offset));
}
}
}
@ -820,6 +820,7 @@ public class BukkitChunkManager extends ChunkManager {
datas.put(y, data);
}
BlockLoc bl;
try {
switch (id) {
case 54:
bl = new BlockLoc(x + offset_x, y, z + offset_z);
@ -934,6 +935,12 @@ public class BukkitChunkManager extends ChunkManager {
break;
}
}
catch (Exception e) {
PS.debug("------------ FAILED TO DO SOMETHING --------");
e.printStackTrace();
PS.debug("------------ but we caught it ^ --------");
}
}
}
final PlotLoc loc = new PlotLoc(x, z);
GENERATE_BLOCKS.put(loc, ids);