From 32f37b74e2267077b0234308a920e171bb0f9f81 Mon Sep 17 00:00:00 2001 From: NavidK0 Date: Mon, 13 Apr 2015 01:25:48 -0400 Subject: [PATCH] Temporarily commented out setAllowSleep for now until it can be fixed later Updated config.yml Updated plugin.yml Updated plugin for latest spigot builds and latest ProtocolLib build --- build.gradle | 4 +++- .../libraryaddict/disguise/utilities/ReflectionManager.java | 5 ++++- src/main/resources/config.yml | 4 ++-- src/main/resources/plugin.yml | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 25de14b5..d316cd32 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,6 @@ -apply plugin: 'java' +plugins { + id 'java' +} println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion diff --git a/src/main/java/me/libraryaddict/disguise/utilities/ReflectionManager.java b/src/main/java/me/libraryaddict/disguise/utilities/ReflectionManager.java index 9aaa871b..d0a09f3d 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/ReflectionManager.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/ReflectionManager.java @@ -26,6 +26,8 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import com.comphenix.protocol.wrappers.WrappedGameProfile; +import net.minecraft.server.v1_8_R2.EntityPlayer; +import net.minecraft.server.v1_8_R2.PlayerConnection; import org.bukkit.potion.PotionEffect; public class ReflectionManager { @@ -610,10 +612,11 @@ public class ReflectionManager { public static void setAllowSleep(Player player) { try { + /** Object nmsEntity = getNmsEntity(player); Object connection = getNmsField(nmsEntity.getClass(), "playerConnection").get(nmsEntity); Field check = getNmsField(connection.getClass(), "checkMovement"); - check.setBoolean(connection, true); + check.setBoolean(connection, true); **/ } catch (Exception ex) { ex.printStackTrace(System.out); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 11586dc6..3e0cd437 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -8,13 +8,13 @@ DisguiseRadiusMax: 50 UndisguiseRadiusMax: 50 # Shall the players view their disguises? # Best used when viewing yourself in 3rd person -ViewSelfDisguises: false +ViewSelfDisguises: true # Shall I disguise the sounds? # This turns your damage sound into a MOOOO DisguiseSounds: true # Shall the disguised hear their disguise sounds or their damage sounds. # I disable this as it can be a little confusing when not used with self disguises -HearSelfDisguise: false +HearSelfDisguise: true # Shall I send the velocity packets? I REALLY recommend you don't disable. # This is the only thing allowing the mobs to fly without glitching out. SendVelocity: true diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 88733fa5..ea57a1ae 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: LibsDisguises main: me.libraryaddict.disguise.LibsDisguises -version: 8.3.1 +version: 8.3.2 author: libraryaddict authors: [Byteflux, Navid K.] depend: [ProtocolLib]