From 4d824da7f518257b0b06c65b6b11a8c78ba58b49 Mon Sep 17 00:00:00 2001 From: Almighty-Satan <43804777+Almighty-Satan@users.noreply.github.com> Date: Sat, 14 Sep 2024 13:08:33 +0200 Subject: [PATCH] Player#sendBlockChange(Location, Material) was introduced in 1.13 and does not exist on 1.12 --- .../varoplugin/cfw/version/OneThirteenVersionAdapter.java | 7 +++++++ .../de/varoplugin/cfw/version/OneTwelveVersionAdapter.java | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/varoplugin/cfw/version/OneThirteenVersionAdapter.java b/src/main/java/de/varoplugin/cfw/version/OneThirteenVersionAdapter.java index 3326e720..51c80b6c 100644 --- a/src/main/java/de/varoplugin/cfw/version/OneThirteenVersionAdapter.java +++ b/src/main/java/de/varoplugin/cfw/version/OneThirteenVersionAdapter.java @@ -24,6 +24,8 @@ package de.varoplugin.cfw.version; +import org.bukkit.Location; +import org.bukkit.Material; import org.bukkit.entity.Player; import net.md_5.bungee.api.ChatMessageType; @@ -64,4 +66,9 @@ public void sendClickableMessage(Player player, String message, Action action, S public void sendTablist(Player player, String header, String footer) { player.setPlayerListHeaderFooter(header, footer); } + + @Override + public void sendBlockChange(Player player, Location location, Material material) { + player.sendBlockChange(location, material.createBlockData()); + } } diff --git a/src/main/java/de/varoplugin/cfw/version/OneTwelveVersionAdapter.java b/src/main/java/de/varoplugin/cfw/version/OneTwelveVersionAdapter.java index c6e675b0..de1e8b9e 100644 --- a/src/main/java/de/varoplugin/cfw/version/OneTwelveVersionAdapter.java +++ b/src/main/java/de/varoplugin/cfw/version/OneTwelveVersionAdapter.java @@ -27,8 +27,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import org.bukkit.Location; -import org.bukkit.Material; import org.bukkit.entity.Player; class OneTwelveVersionAdapter extends OneNineVersionAdapter { @@ -69,11 +67,6 @@ protected Object getMessagePacket(Player player, Object text) throws Instantiati return this.packetChatConstructor.newInstance(text, this.messageTypeSystem); } - @Override - public void sendBlockChange(Player player, Location location, Material material) { - player.sendBlockChange(location, material.createBlockData()); - } - @Override public void sendTitle(Player player, String title, String subtitle) { player.sendTitle(title, subtitle, 10, 70, 20);