From 2968ccb8d21a5db1ae463bad48ea85b1df221732 Mon Sep 17 00:00:00 2001 From: Brianna Date: Wed, 12 Aug 2020 15:58:35 -0500 Subject: [PATCH 1/2] Add support for 1.13 while updating redstone neighbors. --- .../java/com/songoda/core/utils/BlockUtilsModern.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/songoda/core/utils/BlockUtilsModern.java b/Core/src/main/java/com/songoda/core/utils/BlockUtilsModern.java index 4ec4891f..b7fe6faa 100644 --- a/Core/src/main/java/com/songoda/core/utils/BlockUtilsModern.java +++ b/Core/src/main/java/com/songoda/core/utils/BlockUtilsModern.java @@ -3,9 +3,12 @@ package com.songoda.core.utils; import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; + +import com.songoda.core.compatibility.ServerVersion; import org.bukkit.Bukkit; import org.bukkit.Effect; import org.bukkit.Material; +import org.bukkit.Server; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.data.Ageable; @@ -102,10 +105,12 @@ public class BlockUtilsModern { clazzPressurePlateBlock = Class.forName("net.minecraft.server." + ver + ".BlockPressurePlateAbstract"); // nmsLever_updateNeighbours, nmsButton_updateNeighbours, nmsPlate_updateNeighbours - nmsLever_updateNeighbours = clazzLeverBlock.getDeclaredMethod("e", clazzBlockState, clazzWorld, clazzBlockPos); + nmsLever_updateNeighbours = clazzLeverBlock.getDeclaredMethod(ServerVersion.isServerVersionAbove(ServerVersion.V1_13) + ? "e" : "b", clazzBlockState, clazzWorld, clazzBlockPos); nmsLever_updateNeighbours.setAccessible(true); - nmsButton_updateNeighbours = clazzButtonBlock.getDeclaredMethod("f", clazzBlockState, clazzWorld, clazzBlockPos); + nmsButton_updateNeighbours = clazzButtonBlock.getDeclaredMethod(ServerVersion.isServerVersionAbove(ServerVersion.V1_13) + ? "f" : "c", clazzBlockState, clazzWorld, clazzBlockPos); nmsButton_updateNeighbours.setAccessible(true); nmsPlate_updateNeighbours = clazzPressurePlateBlock.getDeclaredMethod("a", clazzWorld, clazzBlockPos); From 7250595d6c0c26f1723f3358178c84a12b06b983 Mon Sep 17 00:00:00 2001 From: Brianna Date: Wed, 12 Aug 2020 15:58:56 -0500 Subject: [PATCH 2/2] version 2.3.47 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dc015ad7..31193baf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "SongodaCore" path: "/builds/$CI_PROJECT_PATH" - version: "2.3.46" + version: "2.3.47" build: stage: build