mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 12:35:15 +01:00
Fixed typo
This commit is contained in:
parent
6f90700187
commit
9f89928120
@ -1449,7 +1449,7 @@ public class PS {
|
|||||||
options.put("chat.fancy", Settings.FANCY_CHAT);
|
options.put("chat.fancy", Settings.FANCY_CHAT);
|
||||||
options.put("metrics", true);
|
options.put("metrics", true);
|
||||||
options.put("debug", true);
|
options.put("debug", true);
|
||||||
options.put("auto_update", false);
|
options.put("update-notifications", true);
|
||||||
|
|
||||||
for (final Entry<String, Object> node : options.entrySet()) {
|
for (final Entry<String, Object> node : options.entrySet()) {
|
||||||
if (!config.contains(node.getKey())) {
|
if (!config.contains(node.getKey())) {
|
||||||
|
@ -71,7 +71,7 @@ public class Info extends SubCommand {
|
|||||||
|
|
||||||
public static String getPlayerName(final UUID uuid) {
|
public static String getPlayerName(final UUID uuid) {
|
||||||
if (uuid == null) {
|
if (uuid == null) {
|
||||||
return "unknown";
|
return C.UNKNOWN.s();
|
||||||
}
|
}
|
||||||
if (uuid.equals(DBFunc.everyone) || uuid.toString().equalsIgnoreCase(DBFunc.everyone.toString())) {
|
if (uuid.equals(DBFunc.everyone) || uuid.toString().equalsIgnoreCase(DBFunc.everyone.toString())) {
|
||||||
return "everyone";
|
return "everyone";
|
||||||
|
@ -138,7 +138,9 @@ public class EntityWrapper {
|
|||||||
if (this.aged.locked) {
|
if (this.aged.locked) {
|
||||||
entity.setAgeLock(this.aged.locked);
|
entity.setAgeLock(this.aged.locked);
|
||||||
}
|
}
|
||||||
entity.setAge(this.aged.age);
|
if (this.aged.age > 0) {
|
||||||
|
entity.setAge(this.aged.age);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeAgeable(final Ageable aged) {
|
public void storeAgeable(final Ageable aged) {
|
||||||
@ -432,9 +434,9 @@ public class EntityWrapper {
|
|||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
entity.setFallDistance(this.base.fall);
|
if (this.base.fall != 0) entity.setFallDistance(this.base.fall);
|
||||||
entity.setFireTicks(this.base.fire);
|
if (this.base.fire != 0) entity.setFireTicks(this.base.fire);
|
||||||
entity.setTicksLived(this.base.age);
|
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));
|
entity.setVelocity(new Vector(this.base.v_x, this.base.v_y, this.base.v_z));
|
||||||
if (this.depth == 1) {
|
if (this.depth == 1) {
|
||||||
return entity;
|
return entity;
|
||||||
|
@ -565,10 +565,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
chest.getInventory().setContents(chestContents.get(loc));
|
chest.getInventory().setContents(chestContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : signContents.keySet()) {
|
||||||
@ -584,10 +584,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
}
|
}
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : dispenserContents.keySet()) {
|
||||||
@ -598,10 +598,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((Dispenser) (state)).getInventory().setContents(dispenserContents.get(loc));
|
((Dispenser) (state)).getInventory().setContents(dispenserContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : dropperContents.keySet()) {
|
||||||
@ -612,10 +612,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((Dropper) (state)).getInventory().setContents(dropperContents.get(loc));
|
((Dropper) (state)).getInventory().setContents(dropperContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : beaconContents.keySet()) {
|
||||||
@ -626,10 +626,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((Beacon) (state)).getInventory().setContents(beaconContents.get(loc));
|
((Beacon) (state)).getInventory().setContents(beaconContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : jukeDisc.keySet()) {
|
||||||
@ -640,10 +640,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((Jukebox) (state)).setPlaying(Material.getMaterial(jukeDisc.get(loc)));
|
((Jukebox) (state)).setPlaying(Material.getMaterial(jukeDisc.get(loc)));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : skullData.keySet()) {
|
||||||
@ -663,10 +663,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
}
|
}
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : hopperContents.keySet()) {
|
||||||
@ -677,10 +677,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((Hopper) (state)).getInventory().setContents(hopperContents.get(loc));
|
((Hopper) (state)).getInventory().setContents(hopperContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : noteBlockContents.keySet()) {
|
||||||
@ -691,10 +691,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((NoteBlock) (state)).setNote(noteBlockContents.get(loc));
|
((NoteBlock) (state)).setNote(noteBlockContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : brewTime.keySet()) {
|
||||||
@ -704,10 +704,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
if (state instanceof BrewingStand) {
|
if (state instanceof BrewingStand) {
|
||||||
((BrewingStand) (state)).setBrewingTime(brewTime.get(loc));
|
((BrewingStand) (state)).setBrewingTime(brewTime.get(loc));
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : spawnerData.keySet()) {
|
||||||
@ -718,10 +718,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((CreatureSpawner) (state)).setCreatureTypeId(spawnerData.get(loc));
|
((CreatureSpawner) (state)).setCreatureTypeId(spawnerData.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : cmdData.keySet()) {
|
||||||
@ -732,10 +732,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((CommandBlock) (state)).setCommand(cmdData.get(loc));
|
((CommandBlock) (state)).setCommand(cmdData.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : brewingStandContents.keySet()) {
|
||||||
@ -746,10 +746,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((BrewingStand) (state)).getInventory().setContents(brewingStandContents.get(loc));
|
((BrewingStand) (state)).getInventory().setContents(brewingStandContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : furnaceTime.keySet()) {
|
||||||
@ -761,10 +761,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((Furnace) (state)).setBurnTime(time[0]);
|
((Furnace) (state)).setBurnTime(time[0]);
|
||||||
((Furnace) (state)).setCookTime(time[1]);
|
((Furnace) (state)).setCookTime(time[1]);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : furnaceContents.keySet()) {
|
||||||
@ -775,10 +775,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
((Furnace) (state)).getInventory().setContents(furnaceContents.get(loc));
|
((Furnace) (state)).getInventory().setContents(furnaceContents.get(loc));
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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()) {
|
for (final BlockLoc loc : bannerBase.keySet()) {
|
||||||
@ -795,10 +795,10 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
}
|
}
|
||||||
state.update(true);
|
state.update(true);
|
||||||
} else {
|
} 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) {
|
} 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,118 +820,125 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
datas.put(y, data);
|
datas.put(y, data);
|
||||||
}
|
}
|
||||||
BlockLoc bl;
|
BlockLoc bl;
|
||||||
switch (id) {
|
try {
|
||||||
case 54:
|
switch (id) {
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 54:
|
||||||
final InventoryHolder chest = (InventoryHolder) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final ItemStack[] inventory = chest.getInventory().getContents().clone();
|
final InventoryHolder chest = (InventoryHolder) block.getState();
|
||||||
chestContents.put(bl, inventory);
|
final ItemStack[] inventory = chest.getInventory().getContents().clone();
|
||||||
break;
|
chestContents.put(bl, inventory);
|
||||||
case 52:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 52:
|
||||||
final CreatureSpawner spawner = (CreatureSpawner) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final String type = spawner.getCreatureTypeId();
|
final CreatureSpawner spawner = (CreatureSpawner) block.getState();
|
||||||
if ((type != null) && (type.length() != 0)) {
|
final String type = spawner.getCreatureTypeId();
|
||||||
spawnerData.put(bl, type);
|
if ((type != null) && (type.length() != 0)) {
|
||||||
}
|
spawnerData.put(bl, type);
|
||||||
break;
|
}
|
||||||
case 137:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 137:
|
||||||
final CommandBlock cmd = (CommandBlock) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final String string = cmd.getCommand();
|
final CommandBlock cmd = (CommandBlock) block.getState();
|
||||||
if ((string != null) && (string.length() > 0)) {
|
final String string = cmd.getCommand();
|
||||||
cmdData.put(bl, string);
|
if ((string != null) && (string.length() > 0)) {
|
||||||
}
|
cmdData.put(bl, string);
|
||||||
break;
|
}
|
||||||
case 63:
|
break;
|
||||||
case 68:
|
case 63:
|
||||||
case 323:
|
case 68:
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 323:
|
||||||
final Sign sign = (Sign) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
sign.getLines();
|
final Sign sign = (Sign) block.getState();
|
||||||
signContents.put(bl, sign.getLines().clone());
|
sign.getLines();
|
||||||
break;
|
signContents.put(bl, sign.getLines().clone());
|
||||||
case 61:
|
break;
|
||||||
case 62:
|
case 61:
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 62:
|
||||||
final Furnace furnace = (Furnace) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final short burn = furnace.getBurnTime();
|
final Furnace furnace = (Furnace) block.getState();
|
||||||
final short cook = furnace.getCookTime();
|
final short burn = furnace.getBurnTime();
|
||||||
final ItemStack[] invFur = furnace.getInventory().getContents().clone();
|
final short cook = furnace.getCookTime();
|
||||||
furnaceContents.put(bl, invFur);
|
final ItemStack[] invFur = furnace.getInventory().getContents().clone();
|
||||||
if (cook != 0) {
|
furnaceContents.put(bl, invFur);
|
||||||
furnaceTime.put(bl, new Short[] { burn, cook });
|
if (cook != 0) {
|
||||||
}
|
furnaceTime.put(bl, new Short[] { burn, cook });
|
||||||
break;
|
}
|
||||||
case 23:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 23:
|
||||||
final Dispenser dispenser = (Dispenser) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final ItemStack[] invDis = dispenser.getInventory().getContents().clone();
|
final Dispenser dispenser = (Dispenser) block.getState();
|
||||||
dispenserContents.put(bl, invDis);
|
final ItemStack[] invDis = dispenser.getInventory().getContents().clone();
|
||||||
break;
|
dispenserContents.put(bl, invDis);
|
||||||
case 158:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 158:
|
||||||
final Dropper dropper = (Dropper) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final ItemStack[] invDro = dropper.getInventory().getContents().clone();
|
final Dropper dropper = (Dropper) block.getState();
|
||||||
dropperContents.put(bl, invDro);
|
final ItemStack[] invDro = dropper.getInventory().getContents().clone();
|
||||||
break;
|
dropperContents.put(bl, invDro);
|
||||||
case 117:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 117:
|
||||||
final BrewingStand brewingStand = (BrewingStand) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final short time = (short) brewingStand.getBrewingTime();
|
final BrewingStand brewingStand = (BrewingStand) block.getState();
|
||||||
if (time > 0) {
|
final short time = (short) brewingStand.getBrewingTime();
|
||||||
brewTime.put(bl, time);
|
if (time > 0) {
|
||||||
}
|
brewTime.put(bl, time);
|
||||||
final ItemStack[] invBre = brewingStand.getInventory().getContents().clone();
|
}
|
||||||
brewingStandContents.put(bl, invBre);
|
final ItemStack[] invBre = brewingStand.getInventory().getContents().clone();
|
||||||
break;
|
brewingStandContents.put(bl, invBre);
|
||||||
case 25:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 25:
|
||||||
final NoteBlock noteBlock = (NoteBlock) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final Note note = noteBlock.getNote();
|
final NoteBlock noteBlock = (NoteBlock) block.getState();
|
||||||
noteBlockContents.put(bl, note);
|
final Note note = noteBlock.getNote();
|
||||||
break;
|
noteBlockContents.put(bl, note);
|
||||||
case 138:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 138:
|
||||||
final Beacon beacon = (Beacon) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final ItemStack[] invBea = beacon.getInventory().getContents().clone();
|
final Beacon beacon = (Beacon) block.getState();
|
||||||
beaconContents.put(bl, invBea);
|
final ItemStack[] invBea = beacon.getInventory().getContents().clone();
|
||||||
break;
|
beaconContents.put(bl, invBea);
|
||||||
case 84:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 84:
|
||||||
final Jukebox jukebox = (Jukebox) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final Material playing = jukebox.getPlaying();
|
final Jukebox jukebox = (Jukebox) block.getState();
|
||||||
if (playing != null) {
|
final Material playing = jukebox.getPlaying();
|
||||||
jukeDisc.put(bl, (short) playing.getId());
|
if (playing != null) {
|
||||||
}
|
jukeDisc.put(bl, (short) playing.getId());
|
||||||
break;
|
}
|
||||||
case 154:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 154:
|
||||||
final Hopper hopper = (Hopper) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final ItemStack[] invHop = hopper.getInventory().getContents().clone();
|
final Hopper hopper = (Hopper) block.getState();
|
||||||
hopperContents.put(bl, invHop);
|
final ItemStack[] invHop = hopper.getInventory().getContents().clone();
|
||||||
break;
|
hopperContents.put(bl, invHop);
|
||||||
case 397:
|
break;
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 397:
|
||||||
final Skull skull = (Skull) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final String o = skull.getOwner();
|
final Skull skull = (Skull) block.getState();
|
||||||
final byte skulltype = getOrdinal(SkullType.values(), skull.getSkullType());
|
final String o = skull.getOwner();
|
||||||
skull.getRotation();
|
final byte skulltype = getOrdinal(SkullType.values(), skull.getSkullType());
|
||||||
final short rot = getOrdinal(BlockFace.values(), skull.getRotation());
|
skull.getRotation();
|
||||||
skullData.put(bl, new Object[] { o, rot, skulltype });
|
final short rot = getOrdinal(BlockFace.values(), skull.getRotation());
|
||||||
break;
|
skullData.put(bl, new Object[] { o, rot, skulltype });
|
||||||
case 176:
|
break;
|
||||||
case 177:
|
case 176:
|
||||||
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
case 177:
|
||||||
final Banner banner = (Banner) block.getState();
|
bl = new BlockLoc(x + offset_x, y, z + offset_z);
|
||||||
final byte base = getOrdinal(DyeColor.values(), banner.getBaseColor());
|
final Banner banner = (Banner) block.getState();
|
||||||
final ArrayList<Byte[]> types = new ArrayList<>();
|
final byte base = getOrdinal(DyeColor.values(), banner.getBaseColor());
|
||||||
for (final Pattern pattern : banner.getPatterns()) {
|
final ArrayList<Byte[]> types = new ArrayList<>();
|
||||||
types.add(new Byte[] { getOrdinal(PatternType.values(), pattern.getPattern()), pattern.getColor().getDyeData() });
|
for (final Pattern pattern : banner.getPatterns()) {
|
||||||
}
|
types.add(new Byte[] { getOrdinal(PatternType.values(), pattern.getPattern()), pattern.getColor().getDyeData() });
|
||||||
bannerBase.put(bl, base);
|
}
|
||||||
bannerColors.put(bl, types);
|
bannerBase.put(bl, base);
|
||||||
break;
|
bannerColors.put(bl, types);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
PS.debug("------------ FAILED TO DO SOMETHING --------");
|
||||||
|
e.printStackTrace();
|
||||||
|
PS.debug("------------ but we caught it ^ --------");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user