mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-08 09:42:56 +01:00
Updated for 1.8.6.
This commit is contained in:
parent
9083a5ba84
commit
17869698d5
@ -5,7 +5,7 @@ plugins {
|
|||||||
println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion
|
println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion
|
||||||
|
|
||||||
sourceCompatibility = '1.7'
|
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'
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ tasks.build.doLast {
|
|||||||
|
|
||||||
file('libs').mkdirs()
|
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
|
ant.get src: 'https://www.dropbox.com/s/1ofgubrldjwamnk/spigot.jar?dl=1', dest: file('libs'), verbose: false, skipexisting: true
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
@ -52,10 +52,10 @@ jar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compile 'org.bukkit:bukkit:' + project.ext.spigotVersion
|
||||||
|
compile 'com.comphenix.protocol:ProtocolLib:3.6.3-SNAPSHOT'
|
||||||
compile files(
|
compile files(
|
||||||
'libs/spigot.jar'
|
'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'
|
testCompile group: 'junit', name: 'junit', version: '4.10'
|
||||||
}
|
}
|
||||||
|
@ -103,13 +103,15 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get perms for the node. Returns a hashmap of allowed disguisetypes and their options
|
* 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,
|
protected HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> getPermissions(CommandSender sender, String permissionNode) {
|
||||||
String permissionNode) {
|
|
||||||
|
|
||||||
HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> singleDisguises = new HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>>();
|
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<DisguiseType, HashMap<ArrayList<String>, Boolean>> rangeDisguises = new HashMap<>();
|
||||||
HashMap<String, Boolean> perms = new HashMap<String, Boolean>();
|
HashMap<String, Boolean> perms = new HashMap<>();
|
||||||
|
|
||||||
for (PermissionAttachmentInfo permission : sender.getEffectivePermissions()) {
|
for (PermissionAttachmentInfo permission : sender.getEffectivePermissions()) {
|
||||||
String perm = permission.getPermission().toLowerCase();
|
String perm = permission.getPermission().toLowerCase();
|
||||||
|
@ -54,7 +54,7 @@ import com.comphenix.protocol.wrappers.WrappedAttribute.Builder;
|
|||||||
import com.comphenix.protocol.wrappers.WrappedDataWatcher;
|
import com.comphenix.protocol.wrappers.WrappedDataWatcher;
|
||||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||||
import com.comphenix.protocol.wrappers.WrappedWatchableObject;
|
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 {
|
public class PacketsManager {
|
||||||
/**
|
/**
|
||||||
@ -319,11 +319,11 @@ public class PacketsManager {
|
|||||||
createDataWatcher(player, WrappedDataWatcher.getEntityWatcher(disguisedEntity), disguise.getWatcher()));
|
createDataWatcher(player, WrappedDataWatcher.getEntityWatcher(disguisedEntity), disguise.getWatcher()));
|
||||||
|
|
||||||
} else if (disguise.getType().isMisc()) {
|
} else if (disguise.getType().isMisc()) {
|
||||||
|
MiscDisguise msc = (MiscDisguise)disguise;
|
||||||
int id = disguise.getType().getEntityId();
|
int id = disguise.getType().getEntityId();
|
||||||
int data = ((MiscDisguise) disguise).getData();
|
int data = msc.getData();
|
||||||
if (disguise.getType() == DisguiseType.FALLING_BLOCK) {
|
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) {
|
} 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
|
// If the MiscDisguise data isn't set. Then no entity id was provided, so default to the owners entity id
|
||||||
data = disguisedEntity.getEntityId();
|
data = disguisedEntity.getEntityId();
|
||||||
|
@ -26,8 +26,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
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;
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
|
||||||
public class ReflectionManager {
|
public class ReflectionManager {
|
||||||
|
Loading…
Reference in New Issue
Block a user