Sponge fixes

This commit is contained in:
boy0001 2015-08-11 22:05:44 +10:00
parent 1a9ec84a4d
commit 994ca12102
8 changed files with 9 additions and 9 deletions

View File

@ -8,7 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<artifactId>PlotSquared</artifactId> <artifactId>PlotSquared</artifactId>
<version>3.0.11</version> <version>3.0.13</version>
<name>PlotSquared</name> <name>PlotSquared</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<build> <build>

View File

@ -95,7 +95,7 @@ public class DebugExec extends SubCommand {
TaskManager.runTaskLater(new Runnable() { TaskManager.runTaskLater(new Runnable() {
@Override @Override
public void run() { public void run() {
onCommand(ConsolePlayer.getConsole(), new String[] {"runasync", "start.js"}); onCommand(ConsolePlayer.getConsole(), new String[] {"run", "start.js"});
} }
}, 1); }, 1);
} }

View File

@ -337,7 +337,7 @@ public class MainCommand extends CommandManager<PlotPlayer> {
MainUtil.sendMessage(plr, C.NOT_VALID_SUBCOMMAND); MainUtil.sendMessage(plr, C.NOT_VALID_SUBCOMMAND);
{ {
List<Command<PlotPlayer>> cmds = getCommands(null, plr); List<Command<PlotPlayer>> cmds = getCommands(null, plr);
if (label == null || (cmd = new StringComparison<>(label, cmds).getMatchObject()) == null) { if (label == null || cmds.size() == 0 || (cmd = new StringComparison<>(label, cmds).getMatchObject()) == null) {
MainUtil.sendMessage(plr, C.DID_YOU_MEAN, "/plot help"); MainUtil.sendMessage(plr, C.DID_YOU_MEAN, "/plot help");
} }
else { else {

View File

@ -50,7 +50,7 @@ public class StringMan {
else if (obj instanceof Collection<?>) { else if (obj instanceof Collection<?>) {
String result = ""; String result = "";
String prefix = ""; String prefix = "";
for (Object element : (List<?>) obj) { for (Object element : (Collection<?>) obj) {
result += prefix + getString(element); result += prefix + getString(element);
prefix = ","; prefix = ",";
} }

View File

@ -178,8 +178,6 @@ public class EntityWrapper {
this.x = loc.getX(); this.x = loc.getX();
this.y = loc.getY(); this.y = loc.getY();
this.z = loc.getZ(); this.z = loc.getZ();
System.out.print("ENTITY: " + entity.getType());
System.out.print("ENTITY: " + entity.getType().getTypeId());
this.id = entity.getType().getTypeId(); this.id = entity.getType().getTypeId();
if (depth == 0) { if (depth == 0) {
return; return;

View File

@ -494,7 +494,6 @@ public class BukkitChunkManager extends ChunkManager {
public static void restoreEntities(final World world, final int x_offset, final int z_offset) { public static void restoreEntities(final World world, final int x_offset, final int z_offset) {
for (final EntityWrapper entity : entities) { for (final EntityWrapper entity : entities) {
try { try {
System.out.print("RESTORING ENTITIE!: " + EntityType.fromId(entity.id));
entity.spawn(world, x_offset, z_offset); entity.spawn(world, x_offset, z_offset);
} catch (final Exception e) { } catch (final Exception e) {
PS.debug("Failed to restore entity (e): " + entity.x + "," + entity.y + "," + entity.z + " : " + entity.id + " : " + EntityType.fromId(entity.id)); PS.debug("Failed to restore entity (e): " + entity.x + "," + entity.y + "," + entity.z + " : " + entity.id + " : " + EntityType.fromId(entity.id));

View File

@ -103,7 +103,6 @@ public class BukkitSetupUtils extends SetupUtils {
return; return;
} }
File file = new File("bukkit.yml").getAbsoluteFile(); File file = new File("bukkit.yml").getAbsoluteFile();
System.out.print(file.getAbsolutePath());
YamlConfiguration yml = YamlConfiguration.loadConfiguration(file); YamlConfiguration yml = YamlConfiguration.loadConfiguration(file);
yml.set("worlds." + world + ".generator", generator); yml.set("worlds." + world + ".generator", generator);
try { try {

View File

@ -131,7 +131,11 @@ public class SpongeBlockManager extends BlockManager {
@Override @Override
public Location getSpawn(String world) { public Location getSpawn(String world) {
return SpongeUtil.getLocation(world, SpongeUtil.getWorld(world).getSpawnLocation()); World worldObj = SpongeUtil.getWorld(world);
org.spongepowered.api.world.Location loc = worldObj.getSpawnLocation();
Location result = SpongeUtil.getLocation(world, SpongeUtil.getWorld(world).getSpawnLocation());
result.setY(getHeighestBlock(world, result.getX(), result.getZ()));
return result;
} }
@Override @Override