mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-24 03:05:56 +01:00
Better island deletion.
This commit is contained in:
parent
18d52f1e33
commit
0ef80b465f
@ -31,7 +31,6 @@ public class ProxyCommand extends SubCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onCommand(CommandSender sender, String[] args) {
|
public void onCommand(CommandSender sender, String[] args) {
|
||||||
PlayerDataManager playerDataManager = skyblock.getPlayerDataManager();
|
|
||||||
MessageManager messageManager = skyblock.getMessageManager();
|
MessageManager messageManager = skyblock.getMessageManager();
|
||||||
IslandManager islandManager = skyblock.getIslandManager();
|
IslandManager islandManager = skyblock.getIslandManager();
|
||||||
SoundManager soundManager = skyblock.getSoundManager();
|
SoundManager soundManager = skyblock.getSoundManager();
|
||||||
|
@ -391,11 +391,12 @@ public class IslandManager {
|
|||||||
WorldManager worldManager = skyblock.getWorldManager();
|
WorldManager worldManager = skyblock.getWorldManager();
|
||||||
|
|
||||||
// Delete island from world.
|
// Delete island from world.
|
||||||
Bukkit.getScheduler().runTask(skyblock, () -> {
|
long i = 0;
|
||||||
for (IslandWorld worldList : IslandWorld.getIslandWorlds()) {
|
for (IslandWorld worldList : IslandWorld.getIslandWorlds()) {
|
||||||
|
Bukkit.getScheduler().runTaskLater(skyblock, () -> {
|
||||||
org.bukkit.World world = worldManager.getWorld(worldList);
|
org.bukkit.World world = worldManager.getWorld(worldList);
|
||||||
Location location = island.getLocation(worldList, IslandEnvironment.Island);
|
Location location = island.getLocation(worldList, IslandEnvironment.Island);
|
||||||
if (location == null) continue;
|
if (location == null) return;
|
||||||
int size = island.getSize();
|
int size = island.getSize();
|
||||||
int xx = location.getBlockX() - size / 2;
|
int xx = location.getBlockX() - size / 2;
|
||||||
int zz = location.getBlockZ() - size / 2;
|
int zz = location.getBlockZ() - size / 2;
|
||||||
@ -406,8 +407,9 @@ public class IslandManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}, i);
|
||||||
});
|
i += 20L;
|
||||||
|
}
|
||||||
|
|
||||||
skyblock.getVisitManager().deleteIsland(island.getOwnerUUID());
|
skyblock.getVisitManager().deleteIsland(island.getOwnerUUID());
|
||||||
skyblock.getBanManager().deleteIsland(island.getOwnerUUID());
|
skyblock.getBanManager().deleteIsland(island.getOwnerUUID());
|
||||||
|
Loading…
Reference in New Issue
Block a user