Fix LD error

This commit is contained in:
libraryaddict 2022-12-21 09:18:37 +13:00
parent 03cd5ead66
commit 55ff0cc2a9
5 changed files with 7 additions and 9 deletions

View File

@ -125,10 +125,10 @@ import java.util.UUID;
public class MetaIndex<Y> {
private static MetaIndex[] _values = new MetaIndex[0];
@NmsAddedIn(NmsVersion.v1_19_1)
@NmsAddedIn(NmsVersion.v1_19_R1)
public static MetaIndex<Boolean> ALLAY_DANCING = new MetaIndex<>(AllayWatcher.class, 0, false);
@NmsAddedIn(NmsVersion.v1_19_1)
@NmsAddedIn(NmsVersion.v1_19_R1)
public static MetaIndex<Boolean> ALLAY_CAN_DUPLICATE = new MetaIndex<>(AllayWatcher.class, 1, true);
/**
* True if entity is a baby

View File

@ -11,7 +11,7 @@ public class AllayWatcher extends InsentientWatcher {
super(disguise);
}
@NmsAddedIn(NmsVersion.v1_19_1)
@NmsAddedIn(NmsVersion.v1_19_R1)
public void setDancing(boolean dancing) {
setData(MetaIndex.ALLAY_DANCING, dancing);
sendData(MetaIndex.ALLAY_DANCING);
@ -21,7 +21,7 @@ public class AllayWatcher extends InsentientWatcher {
return getData(MetaIndex.ALLAY_DANCING);
}
@NmsAddedIn(NmsVersion.v1_19_1)
@NmsAddedIn(NmsVersion.v1_19_R1)
@MethodOnlyUsedBy(value = {}) // Hide from command
public void setCanDuplicate(boolean canDuplicate) {
setData(MetaIndex.ALLAY_CAN_DUPLICATE, canDuplicate);

View File

@ -544,7 +544,7 @@ public class DisguiseUtilities {
}
// If you're on 1.19.1
if (!NmsVersion.v1_19_1.isSupported()) {
if (!NmsVersion.v1_19_R1.isSupported()) {
return new String[]{"5.0.1", "600"};
}

View File

@ -12,7 +12,7 @@ public enum NmsVersion {
v1_17,
v1_18,
v1_19,
v1_19_1,
v1_19_R1,
v1_19_R2,
UNSUPPORTED;

View File

@ -1,7 +1,6 @@
package me.libraryaddict.disguise.utilities.reflection;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.reflect.FieldAccessException;
import com.comphenix.protocol.wrappers.BlockPosition;
@ -107,7 +106,6 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.nio.charset.StandardCharsets;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@ -788,7 +786,7 @@ public class ReflectionManager {
version = v;
}
if (version == NmsVersion.v1_19_1 && !Bukkit.getVersion().matches("1\\.19\\.[12]")) {
if (version == NmsVersion.v1_19_R1 && !Bukkit.getVersion().matches("1\\.19\\.[12]")) {
version = NmsVersion.v1_19;
}
}