Async island location change event call fix

This commit is contained in:
Esophose 2019-04-29 23:40:24 -06:00
parent 5c3d706752
commit ba98f31ce9
2 changed files with 4 additions and 3 deletions

View File

@ -297,11 +297,11 @@ public class Island {
public void setLocation(IslandWorld world, IslandEnvironment environment, Location location) {
for (IslandLocation islandLocationList : islandLocations) {
if (islandLocationList.getWorld() == world && islandLocationList.getEnvironment() == environment) {
Bukkit.getServer().getPluginManager()
.callEvent(new IslandLocationChangeEvent(getAPIWrapper(),
Bukkit.getScheduler().runTaskAsynchronously(skyblock, () ->
Bukkit.getServer().getPluginManager().callEvent(new IslandLocationChangeEvent(getAPIWrapper(),
new me.goodandevil.skyblock.api.island.IslandLocation(
APIUtil.fromImplementation(environment), APIUtil.fromImplementation(world),
location)));
location))));
FileManager fileManager = skyblock.getFileManager();

View File

@ -388,6 +388,7 @@ public final class BlockUtil {
} else {
skull.setOwner(blockData.getSkullOwner());
}
skull.update();
} else {
if (NMSVersion > 8) {
if (blockTypeState == BlockStateType.ENDGATEWAY) {