mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-31 01:23:44 +01:00 
			
		
		
		
	Fixed template teleportation if the world hasn't loaded fully
This commit is contained in:
		| @@ -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; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 boy0001
					boy0001