diff --git a/build.gradle b/build.gradle index 2e2a417d..26114f43 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,7 @@ + +import java.nio.file.* +import java.nio.file.Path + plugins { id 'java' } @@ -29,19 +33,6 @@ repositories { } } -tasks.build.doLast { - File export = file('build/libs/LibsDisguises.jar') - File dest = file('dist') - dest.mkdir() - dest.listFiles().each { - it.delete() - } - export.renameTo(new File(dest, "LibsDisguises.jar")) - file('build').delete() - println "Copied LibsDisguises.jar into /dist" - println "LibsDisguises is finished compiling, have a nice day!" -} - file('libs').mkdirs() //Retrieves spigot.jar server file from link diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java index d5b4acad..e7f2edf4 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java @@ -82,6 +82,8 @@ public class PlayerWatcher extends LivingWatcher { /** * If no BlockFace is supplied. It grabs it from the entities facing direction if applicable. + * @param sleeping + * @param sleepingDirection */ public void setSleeping(boolean sleeping, BlockFace sleepingDirection) { if (sleepingDirection != null) { diff --git a/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java index 4dacd6dc..950ba3ca 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -117,6 +117,10 @@ public class PacketsManager { /** * Construct the packets I need to spawn in the disguise + * @param player + * @param disguise + * @param disguisedEntity + * @return */ public static PacketContainer[][] constructSpawnPackets(final Player player, Disguise disguise, Entity disguisedEntity) { if (disguise.getEntity() == null) @@ -213,7 +217,6 @@ public class PacketsManager { mods.write(5, pitch); } else if (disguise.getType().isPlayer()) { - spawnPackets[0] = new PacketContainer(PacketType.Play.Server.NAMED_ENTITY_SPAWN); StructureModifier stringMods = spawnPackets[0].getStrings(); WrappedGameProfile gameProfile; @@ -285,7 +288,6 @@ public class PacketsManager { delayedPackets = new PacketContainer[] { delayedPacket }; } else if (disguise.getType().isMob() || disguise.getType() == DisguiseType.ARMOR_STAND) { - DisguiseValues values = DisguiseValues.getDisguiseValues(disguise.getType()); Vector vec = disguisedEntity.getVelocity(); spawnPackets[0] = new PacketContainer(PacketType.Play.Server.SPAWN_ENTITY_LIVING); @@ -324,7 +326,7 @@ public class PacketsManager { int id = disguise.getType().getEntityId(); int data = msc.getData(); if (disguise.getType() == DisguiseType.FALLING_BLOCK) { - data = msc.getId() + (data << 0x12); + data = msc.getData(); //No data values for now } else if (disguise.getType() == DisguiseType.FISHING_HOOK && data == 0) { // If the MiscDisguise data isn't set. Then no entity id was provided, so default to the owners entity id data = disguisedEntity.getEntityId(); @@ -526,6 +528,7 @@ public class PacketsManager { /** * Creates the packet listeners + * @param plugin */ public static void init(LibsDisguises plugin) { libsDisguises = plugin; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 26eaf8e6..0354c114 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.4 +version: 8.5 author: libraryaddict authors: [Byteflux, Navid K.] depend: [ProtocolLib]