mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-16 23:25:11 +01:00
fixed the loading issue
This commit is contained in:
parent
c1f793d50a
commit
a74734dfb7
@ -39,6 +39,7 @@ package fr.moribus.imageonmap.image;
|
||||
import fr.moribus.imageonmap.ImageOnMap;
|
||||
import fr.moribus.imageonmap.map.MapManager;
|
||||
import fr.zcraft.quartzlib.core.QuartzLib;
|
||||
import fr.zcraft.quartzlib.tools.runners.RunTask;
|
||||
import java.io.File;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@ -97,11 +98,14 @@ public class MapInitEvent implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onChunkLoad(ChunkLoadEvent event) {
|
||||
for (Entity entity : event.getChunk().getEntities()) {
|
||||
if (entity instanceof ItemFrame) {
|
||||
initMap(((ItemFrame) entity).getItem());
|
||||
//Fix for paper
|
||||
RunTask.later(() -> {
|
||||
for (Entity entity : event.getChunk().getEntities()) {
|
||||
if (entity instanceof ItemFrame) {
|
||||
initMap(((ItemFrame) entity).getItem());
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 5L);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -65,7 +65,8 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.MapMeta;
|
||||
|
||||
|
||||
//TODO rework splatter effect, using ID is far more stable than nbt tags.
|
||||
// To update when adding small picture previsualization.
|
||||
public abstract class SplatterMapManager {
|
||||
private SplatterMapManager() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user