Updated for 1.8.6.

This commit is contained in:
NavidK0 2015-05-30 03:22:38 -04:00
parent 9083a5ba84
commit 17869698d5
4 changed files with 14 additions and 14 deletions

View File

@ -5,7 +5,7 @@ plugins {
println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion
sourceCompatibility = '1.7'
ext.spigotVersion = '1.8.3-R0.1-SNAPSHOT'
ext.spigotVersion = '1.8.6-R0.1-SNAPSHOT'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
@ -44,7 +44,7 @@ tasks.build.doLast {
file('libs').mkdirs()
//Retrieves spigot-1.8.jar server file from link
//Retrieves spigot.jar server file from link
ant.get src: 'https://www.dropbox.com/s/1ofgubrldjwamnk/spigot.jar?dl=1', dest: file('libs'), verbose: false, skipexisting: true
jar {
@ -52,10 +52,10 @@ jar {
}
dependencies {
compile 'org.bukkit:bukkit:' + project.ext.spigotVersion
compile 'com.comphenix.protocol:ProtocolLib:3.6.3-SNAPSHOT'
compile files(
'libs/spigot.jar'
)
compile 'org.bukkit:bukkit:' + project.ext.spigotVersion
compile 'com.comphenix.protocol:ProtocolLib:3.6.3-SNAPSHOT'
testCompile group: 'junit', name: 'junit', version: '4.10'
}

View File

@ -103,13 +103,15 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
/**
* Get perms for the node. Returns a hashmap of allowed disguisetypes and their options
* @param sender
* @param permissionNode
* @return
*/
protected HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> getPermissions(CommandSender sender,
String permissionNode) {
protected HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> getPermissions(CommandSender sender, String permissionNode) {
HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> singleDisguises = new HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>>();
HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> rangeDisguises = new HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>>();
HashMap<String, Boolean> perms = new HashMap<String, Boolean>();
HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> rangeDisguises = new HashMap<>();
HashMap<String, Boolean> perms = new HashMap<>();
for (PermissionAttachmentInfo permission : sender.getEffectivePermissions()) {
String perm = permission.getPermission().toLowerCase();

View File

@ -54,7 +54,7 @@ import com.comphenix.protocol.wrappers.WrappedAttribute.Builder;
import com.comphenix.protocol.wrappers.WrappedDataWatcher;
import com.comphenix.protocol.wrappers.WrappedGameProfile;
import com.comphenix.protocol.wrappers.WrappedWatchableObject;
import net.minecraft.server.v1_8_R2.DamageSource;
import net.minecraft.server.v1_8_R3.DamageSource;
public class PacketsManager {
/**
@ -319,11 +319,11 @@ public class PacketsManager {
createDataWatcher(player, WrappedDataWatcher.getEntityWatcher(disguisedEntity), disguise.getWatcher()));
} else if (disguise.getType().isMisc()) {
MiscDisguise msc = (MiscDisguise)disguise;
int id = disguise.getType().getEntityId();
int data = ((MiscDisguise) disguise).getData();
int data = msc.getData();
if (disguise.getType() == DisguiseType.FALLING_BLOCK) {
data = ((MiscDisguise) disguise).getId() + (data << 12);
data = msc.getId() + (data << 0x12);
} 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();

View File

@ -26,8 +26,6 @@ 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 {