mirror of
https://github.com/PretzelJohn/VillagerTradeLimiter.git
synced 2024-11-28 21:25:45 +01:00
Fixed nms bug on minecraft versions < 1.17
This commit is contained in:
parent
6eb4eb782f
commit
fff230d85d
@ -18,7 +18,7 @@ public class NBTContainer {
|
||||
final CraftEntity craftEntity = new CraftEntity(nms);
|
||||
final NMSEntity nmsEntity = new NMSEntity(nms);
|
||||
final Class<?> tgc;
|
||||
if(nms.getVersion().compareTo("1.17_R1") < 0)
|
||||
if(nms.getVersion().compareTo("v1.17_R1") < 0)
|
||||
tgc = nms.getNMSClass("server."+nms.getVersion()+".NBTTagCompound");
|
||||
else
|
||||
tgc = nms.getNMSClass("nbt.NBTTagCompound");
|
||||
|
@ -11,7 +11,7 @@ public class NBTTagList
|
||||
public NBTTagList(final NMS nms, final Object self) {
|
||||
this.nms = nms;
|
||||
this.self = self;
|
||||
if(nms.getVersion().compareTo("1.17_R1") < 0)
|
||||
if(nms.getVersion().compareTo("v1.17_R1") < 0)
|
||||
this.c = nms.getNMSClass("server."+nms.getVersion()+".NBTTagList");
|
||||
else
|
||||
this.c = nms.getNMSClass("nbt.NBTTagList");
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.pretzel.dev.villagertradelimiter.nms;
|
||||
|
||||
import com.pretzel.dev.villagertradelimiter.lib.Util;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -8,7 +8,7 @@ public class NMSEntity {
|
||||
|
||||
public NMSEntity(final NMS nms) {
|
||||
this.nms = nms;
|
||||
if(nms.getVersion().compareTo("1.17_R1") < 0)
|
||||
if(nms.getVersion().compareTo("v1.17_R1") < 0)
|
||||
this.c = nms.getNMSClass("server."+nms.getVersion()+".Entity");
|
||||
else
|
||||
this.c = nms.getNMSClass("world.entity.Entity");
|
||||
|
Loading…
Reference in New Issue
Block a user