mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-24 08:21:26 +01:00
Merge branch 'SD-7259' into development
This commit is contained in:
commit
49ed7c6449
@ -275,12 +275,14 @@ public class IslandManager {
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () ->
|
||||
plugin.getBiomeManager().setBiome(island, IslandWorld.Normal, compatibleBiome, () -> {
|
||||
if (structure.getCommands() != null) {
|
||||
for (String commandList : structure.getCommands()) {
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), commandList.replace("%player", player.getName()));
|
||||
}
|
||||
}
|
||||
}), 20L);
|
||||
if (structure.getCommands() != null) {
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
||||
for (String commandList : structure.getCommands()) {
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), commandList.replace("%player", player.getName()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}), 20L);
|
||||
|
||||
// Recalculate island level after 5 seconds
|
||||
if (configLoad.getBoolean("Island.Levelling.ScanAutomatically"))
|
||||
@ -1611,9 +1613,11 @@ public class IslandManager {
|
||||
|
||||
for (IslandWorld worldList : IslandWorld.getIslandWorlds()) {
|
||||
if (worldList != IslandWorld.Nether || ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)) {
|
||||
for (Player all : getPlayersAtIsland(island)) {
|
||||
WorldBorder.send(all, island.getBorderColor(), island.getSize(), island.getLocation(worldManager.getIslandWorld(all.getWorld()), IslandEnvironment.Island).clone().add(increment, 0, increment));
|
||||
}
|
||||
Bukkit.getScheduler().runTask(plugin, () -> {
|
||||
for (Player all : getPlayersAtIsland(island)) {
|
||||
WorldBorder.send(all, island.getBorderColor(), island.getSize(), island.getLocation(worldManager.getIslandWorld(all.getWorld()), IslandEnvironment.Island).clone().add(increment, 0, increment));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -1621,9 +1625,11 @@ public class IslandManager {
|
||||
} else {
|
||||
for (IslandWorld worldList : IslandWorld.getIslandWorlds()) {
|
||||
if (worldList != IslandWorld.Nether || ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)) {
|
||||
for (Player all : getPlayersAtIsland(island)) {
|
||||
WorldBorder.send(all, null, 1.4999992E7D, new Location(all.getWorld(), 0, 0, 0));
|
||||
}
|
||||
Bukkit.getScheduler().runTask(plugin, () -> {
|
||||
for (Player all : getPlayersAtIsland(island)) {
|
||||
WorldBorder.send(all, null, 1.4999992E7D, new Location(all.getWorld(), 0, 0, 0));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.songoda.skyblock.utils.world;
|
||||
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.utils.version.NMSUtil;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user