mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Fixed template teleportation if the world hasn't loaded fully
This commit is contained in:
parent
64bb860594
commit
6944471ad6
@ -64,9 +64,6 @@ public class DebugRoadRegen extends SubCommand {
|
||||
manager.createRoadSouthEast(plotworld, plot);
|
||||
MainUtil.sendMessage(player, "&6Regenerating plot south/east roads: " + plot.id + "\n&6 - Result: &aSuccess");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ import com.intellectualcrafters.plot.object.PlotWorld;
|
||||
import com.intellectualcrafters.plot.object.SetupObject;
|
||||
import com.intellectualcrafters.plot.util.BlockManager;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.SetBlockQueue;
|
||||
import com.intellectualcrafters.plot.util.SetupUtils;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
@ -178,8 +179,13 @@ public class Template extends SubCommand {
|
||||
setup.step = new ConfigurationNode[0];
|
||||
setup.world = world;
|
||||
SetupUtils.manager.setupWorld(setup);
|
||||
MainUtil.sendMessage(plr, "Done!");
|
||||
plr.teleport(BlockManager.manager.getSpawn(world));
|
||||
SetBlockQueue.addNotify(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MainUtil.sendMessage(plr, "Done!");
|
||||
plr.teleport(BlockManager.manager.getSpawn(world));
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
case "export": {
|
||||
@ -210,7 +216,10 @@ public class Template extends SubCommand {
|
||||
});
|
||||
return true;
|
||||
}
|
||||
default: {
|
||||
C.COMMAND_SYNTAX.send(plr, this.getUsage());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user