mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-14 15:26:54 +01:00
Init reflection after version check
This commit is contained in:
parent
4835b6de0b
commit
dad91c1075
@ -68,6 +68,8 @@ public class LibsDisguises extends JavaPlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
ReflectionManager.init();
|
||||
|
||||
PacketsManager.init(this);
|
||||
DisguiseUtilities.init(this);
|
||||
|
||||
|
@ -544,8 +544,9 @@ public class FlagWatcher {
|
||||
|
||||
public void setSneaking(boolean setSneaking) {
|
||||
setEntityFlag(1, setSneaking);
|
||||
updatePose();
|
||||
sendData(MetaIndex.ENTITY_META);
|
||||
|
||||
updatePose();
|
||||
}
|
||||
|
||||
public boolean isSleeping() {
|
||||
|
@ -32,19 +32,19 @@ import java.util.UUID;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class ReflectionManager {
|
||||
private static final String bukkitVersion = Bukkit.getServer().getClass().getName().split("\\.")[3];
|
||||
private static final Class<?> craftItemClass;
|
||||
private static String bukkitVersion = Bukkit.getServer().getClass().getName().split("\\.")[3];
|
||||
private static Class<?> craftItemClass;
|
||||
private static Method damageAndIdleSoundMethod;
|
||||
private static final Constructor<?> boundingBoxConstructor;
|
||||
private static final Method setBoundingBoxMethod;
|
||||
private static final Field pingField;
|
||||
public static final Field entityCountField;
|
||||
private static final Field chunkMapField;
|
||||
private static final Field chunkProviderField;
|
||||
private static final Field entityTrackerField;
|
||||
private static final Field trackedEntitiesField;
|
||||
private static Constructor<?> boundingBoxConstructor;
|
||||
private static Method setBoundingBoxMethod;
|
||||
private static Field pingField;
|
||||
public static Field entityCountField;
|
||||
private static Field chunkMapField;
|
||||
private static Field chunkProviderField;
|
||||
private static Field entityTrackerField;
|
||||
private static Field trackedEntitiesField;
|
||||
|
||||
static {
|
||||
public static void init() {
|
||||
try {
|
||||
Object entity = createEntityInstance(DisguiseType.COW, "Cow");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user