From eeab0316c21adaaa6b20765d039d0cfc6c479bc1 Mon Sep 17 00:00:00 2001 From: TheDutchMC Date: Tue, 17 Aug 2021 23:31:58 +0200 Subject: [PATCH] Fixed issue related to previous commit --- .../commands/torchSubCmds/HighlightExecutor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/dev/array21/harotorch/commands/torchSubCmds/HighlightExecutor.java b/src/main/java/dev/array21/harotorch/commands/torchSubCmds/HighlightExecutor.java index 0c1b414..85a345b 100644 --- a/src/main/java/dev/array21/harotorch/commands/torchSubCmds/HighlightExecutor.java +++ b/src/main/java/dev/array21/harotorch/commands/torchSubCmds/HighlightExecutor.java @@ -205,12 +205,12 @@ public void killHighlighted(List ids, Player player) { } if(ReflectionUtil.isUseNewSpigotPackaging()) { - String[] vParts = ReflectionUtil.SERVER_VERSION.split(Pattern.quote(",")); - int patch = Integer.valueOf(vParts[2]); + String[] vParts = ReflectionUtil.SERVER_VERSION.split(Pattern.quote("_")); int minor = Integer.valueOf(vParts[1]); + int patch = Integer.valueOf(vParts[2].replace("R", "")); - // In 1.17.0 the constructor only took a single integer - // As of 1.17.1 it takes an int[] + // In 1.17.0 (1_17_R0) the constructor only took a single integer + // As of 1.17.1 (1_17_R1) it takes an int[] if(patch == 0 && minor == 17) { for(int id : ids) { Object destroyEntityPacket = ReflectionUtil.invokeConstructor(packetPlayOutEntityDestroyClass, new Class[] { int.class }, new Object[] { id });