diff --git a/addon/core/src/main/java/de/erethon/dungeonsxxl/util/GlowUtil.java b/addon/core/src/main/java/de/erethon/dungeonsxxl/util/GlowUtil.java index 9d808747..b0ec14fc 100644 --- a/addon/core/src/main/java/de/erethon/dungeonsxxl/util/GlowUtil.java +++ b/addon/core/src/main/java/de/erethon/dungeonsxxl/util/GlowUtil.java @@ -9,17 +9,17 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Random; -import net.minecraft.server.v1_16_R2.EntityShulker; -import net.minecraft.server.v1_16_R2.EntityTypes; -import net.minecraft.server.v1_16_R2.Packet; -import net.minecraft.server.v1_16_R2.PacketPlayOutEntityDestroy; -import net.minecraft.server.v1_16_R2.PacketPlayOutSpawnEntityLiving; +import net.minecraft.server.v1_16_R3.EntityShulker; +import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.Packet; +import net.minecraft.server.v1_16_R3.PacketPlayOutEntityDestroy; +import net.minecraft.server.v1_16_R3.PacketPlayOutSpawnEntityLiving; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.block.Block; -import org.bukkit.craftbukkit.v1_16_R2.CraftWorld; -import org.bukkit.craftbukkit.v1_16_R2.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_16_R3.CraftWorld; +import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer; import org.bukkit.entity.Player; import org.bukkit.entity.Shulker; import org.bukkit.event.EventHandler; @@ -41,7 +41,7 @@ public class GlowUtil implements Listener { private Map teams = new HashMap<>(); private GlowData glowingBlocks = new GlowData<>(); - private Map> playerGlows = new HashMap<>(); + private Map> playerGlows = new HashMap<>(); private GlowRunnable runnable = new GlowRunnable(); public GlowUtil(Plugin plugin) { @@ -177,8 +177,8 @@ public class GlowUtil implements Listener { runnable.removeEntity(bukkitEntity); } - for (Entry> entry : playerGlows.entrySet()) { - net.minecraft.server.v1_16_R2.Entity nmsEntity = entry.getValue().get(block); + for (Entry> entry : playerGlows.entrySet()) { + net.minecraft.server.v1_16_R3.Entity nmsEntity = entry.getValue().get(block); if (nmsEntity != null) { sendPacket(entry.getKey(), new PacketPlayOutEntityDestroy(nmsEntity.getId())); runnable.removeEntity(nmsEntity); @@ -203,7 +203,7 @@ public class GlowUtil implements Listener { * @param entity an NMS Entity * @param color the glow color */ - public void addGlow(net.minecraft.server.v1_16_R2.Entity entity, ChatColor color) { + public void addGlow(net.minecraft.server.v1_16_R3.Entity entity, ChatColor color) { getTeam(color).addEntry(asEntry(entity)); entity.setFlag(6, true); } @@ -233,7 +233,7 @@ public class GlowUtil implements Listener { * * @param entity an NMS Entity */ - public void addRainbowGlow(net.minecraft.server.v1_16_R2.Entity entity) { + public void addRainbowGlow(net.minecraft.server.v1_16_R3.Entity entity) { addRainbowGlow(entity, null); } @@ -243,7 +243,7 @@ public class GlowUtil implements Listener { * @param entity an NMS Entity * @param cancelTime the time in milliseconds until the glow effect shall end; null = forever */ - public void addRainbowGlow(net.minecraft.server.v1_16_R2.Entity entity, Long cancelTime) { + public void addRainbowGlow(net.minecraft.server.v1_16_R3.Entity entity, Long cancelTime) { entity.setFlag(6, true); runnable.addEntity(entity, cancelTime != null ? System.currentTimeMillis() + cancelTime : null); } @@ -264,7 +264,7 @@ public class GlowUtil implements Listener { * * @param entity an NMS Entity */ - public void removeGlow(net.minecraft.server.v1_16_R2.Entity entity) { + public void removeGlow(net.minecraft.server.v1_16_R3.Entity entity) { entity.setFlag(6, false); teams.values().forEach(t -> t.removeEntry(asEntry(entity))); runnable.removeEntity(entity); @@ -274,7 +274,7 @@ public class GlowUtil implements Listener { return entity instanceof Player ? entity.getName() : entity.getUniqueId().toString(); } - private static String asEntry(net.minecraft.server.v1_16_R2.Entity entity) { + private static String asEntry(net.minecraft.server.v1_16_R3.Entity entity) { return entity instanceof Player ? entity.getName() : entity.getUniqueID().toString(); } @@ -311,8 +311,8 @@ public class GlowUtil implements Listener { for (Entry entry : entities.entrySet().toArray(new Entry[entities.size()])) { if (entry.getKey() instanceof org.bukkit.entity.Entity) { run((org.bukkit.entity.Entity) entry.getKey(), entry.getValue()); - } else if (entry.getKey() instanceof net.minecraft.server.v1_16_R2.Entity) { - run((net.minecraft.server.v1_16_R2.Entity) entry.getKey(), entry.getValue()); + } else if (entry.getKey() instanceof net.minecraft.server.v1_16_R3.Entity) { + run((net.minecraft.server.v1_16_R3.Entity) entry.getKey(), entry.getValue()); } } } @@ -332,11 +332,11 @@ public class GlowUtil implements Listener { getTeam(color).addEntry(asEntry(entity)); } - private void run(net.minecraft.server.v1_16_R2.Entity entity, Long cancelTime) { + private void run(net.minecraft.server.v1_16_R3.Entity entity, Long cancelTime) { getTeam(color).removeEntry(asEntry(entity)); if (cancelTime != null && System.currentTimeMillis() >= cancelTime) { entities.remove(entity); - for (Entry> entry : playerGlows.entrySet()) { + for (Entry> entry : playerGlows.entrySet()) { if (!entry.getValue().glowingBlocks.containsValue(entity)) { continue; } diff --git a/core/pom.xml b/core/pom.xml index 22a46703..6d9c5767 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -104,7 +104,7 @@ com.gmail.filoghost.holographicdisplays holographicdisplays-api - 2.3.2 + 2.4.5 provided @@ -122,7 +122,7 @@ me.clip placeholderapi - 2.10.2 + 2.10.9 provided diff --git a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java index 1e8ac1a7..e2288fb6 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java +++ b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java @@ -204,7 +204,7 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI { public void onEnable() { super.onEnable(); String ixlVersion = manager.isPluginEnabled("ItemsXL") ? manager.getPlugin("ItemsXL").getDescription().getVersion() : ""; - if (ixlVersion.startsWith("0.[0-5]") || ixlVersion.equals("0.6") || ixlVersion.equals("0.6.1")) { + if (ixlVersion.startsWith("0.[0-5]") || ixlVersion.equals("0.6") || ixlVersion.matches("0.6.[1-3]")) { getLogger().log(Level.SEVERE, "DungeonsXL includes v1.0-RC-03 of the Caliburn custom item library. ItemsXL must implement the same or a newer, " + "but still compatible version of this library. This build of DungeonsXL is compatible with ItemsXL v" + StatusCommand.LATEST_IXL + " and, possibly, higher. The latest DXL and IXL versions available on SpigotMC.org should always be compatible with each other."); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java index dd55d5c1..250f5719 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java @@ -38,7 +38,7 @@ public class StatusCommand extends DCommand { public static final String TRUE = ChatColor.GREEN + "\u2714"; public static final String FALSE = ChatColor.DARK_RED + "\u2718"; - public static final String LATEST_IXL = "0.6.3"; + public static final String LATEST_IXL = "0.6.4"; public StatusCommand(DungeonsXL plugin) { super(plugin); diff --git a/pom.xml b/pom.xml index 99200036..03af532c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,13 +21,13 @@ UTF-8 1.8 1.8 - 1.16.3-R0.1-SNAPSHOT + 1.16.4-R0.1-SNAPSHOT de.erethon caliburn - 1.0-RC-03 + 1.0-RC-04 compile