mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +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);
|
manager.createRoadSouthEast(plotworld, plot);
|
||||||
MainUtil.sendMessage(player, "&6Regenerating plot south/east roads: " + plot.id + "\n&6 - Result: &aSuccess");
|
MainUtil.sendMessage(player, "&6Regenerating plot south/east roads: " + plot.id + "\n&6 - Result: &aSuccess");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ import com.intellectualcrafters.plot.object.PlotWorld;
|
|||||||
import com.intellectualcrafters.plot.object.SetupObject;
|
import com.intellectualcrafters.plot.object.SetupObject;
|
||||||
import com.intellectualcrafters.plot.util.BlockManager;
|
import com.intellectualcrafters.plot.util.BlockManager;
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
|
import com.intellectualcrafters.plot.util.SetBlockQueue;
|
||||||
import com.intellectualcrafters.plot.util.SetupUtils;
|
import com.intellectualcrafters.plot.util.SetupUtils;
|
||||||
import com.intellectualcrafters.plot.util.TaskManager;
|
import com.intellectualcrafters.plot.util.TaskManager;
|
||||||
import com.plotsquared.general.commands.CommandDeclaration;
|
import com.plotsquared.general.commands.CommandDeclaration;
|
||||||
@ -178,8 +179,13 @@ public class Template extends SubCommand {
|
|||||||
setup.step = new ConfigurationNode[0];
|
setup.step = new ConfigurationNode[0];
|
||||||
setup.world = world;
|
setup.world = world;
|
||||||
SetupUtils.manager.setupWorld(setup);
|
SetupUtils.manager.setupWorld(setup);
|
||||||
|
SetBlockQueue.addNotify(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
MainUtil.sendMessage(plr, "Done!");
|
MainUtil.sendMessage(plr, "Done!");
|
||||||
plr.teleport(BlockManager.manager.getSpawn(world));
|
plr.teleport(BlockManager.manager.getSpawn(world));
|
||||||
|
}
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "export": {
|
case "export": {
|
||||||
@ -210,7 +216,10 @@ public class Template extends SubCommand {
|
|||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
default: {
|
||||||
return true;
|
C.COMMAND_SYNTAX.send(plr, this.getUsage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user