Update LibsDisguises to 1.6
This commit is contained in:
parent
009a4608b8
commit
1089032e4a
7
pom.xml
7
pom.xml
@ -54,10 +54,15 @@
|
|||||||
<artifactId>ProtocolLib</artifactId>
|
<artifactId>ProtocolLib</artifactId>
|
||||||
<version>2.4.3</version>
|
<version>2.4.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bukkit</groupId>
|
||||||
|
<artifactId>bukkit</artifactId>
|
||||||
|
<version>1.5.1-R0.2</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<version>1.5.2-R0.1-SNAPSHOT</version>
|
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
@ -4,17 +4,17 @@ import java.util.HashMap;
|
|||||||
import me.libraryaddict.disguise.DisguiseTypes.Disguise;
|
import me.libraryaddict.disguise.DisguiseTypes.Disguise;
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.DisguiseSound;
|
import me.libraryaddict.disguise.DisguiseTypes.DisguiseSound;
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.DisguiseSound.SoundType;
|
import me.libraryaddict.disguise.DisguiseTypes.DisguiseSound.SoundType;
|
||||||
import net.minecraft.server.v1_5_R3.Block;
|
import net.minecraft.server.v1_6_R1.Block;
|
||||||
import net.minecraft.server.v1_5_R3.EntityPlayer;
|
import net.minecraft.server.v1_6_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_5_R3.EntityTrackerEntry;
|
import net.minecraft.server.v1_6_R1.EntityTrackerEntry;
|
||||||
import net.minecraft.server.v1_5_R3.World;
|
import net.minecraft.server.v1_6_R1.World;
|
||||||
import net.minecraft.server.v1_5_R3.WorldServer;
|
import net.minecraft.server.v1_6_R1.WorldServer;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.CraftSound;
|
import org.bukkit.craftbukkit.v1_6_R1.CraftSound;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -120,11 +120,11 @@ public class DisguiseAPI {
|
|||||||
} else {
|
} else {
|
||||||
boolean hasInvun = false;
|
boolean hasInvun = false;
|
||||||
if (entity instanceof LivingEntity) {
|
if (entity instanceof LivingEntity) {
|
||||||
net.minecraft.server.v1_5_R3.EntityLiving e = ((CraftLivingEntity) entity)
|
net.minecraft.server.v1_6_R1.EntityLiving e = ((CraftLivingEntity) entity)
|
||||||
.getHandle();
|
.getHandle();
|
||||||
hasInvun = e.noDamageTicks == e.maxNoDamageTicks;
|
hasInvun = (e.noDamageTicks == e.maxNoDamageTicks);
|
||||||
} else {
|
} else {
|
||||||
net.minecraft.server.v1_5_R3.Entity e = ((CraftEntity) entity).getHandle();
|
net.minecraft.server.v1_6_R1.Entity e = ((CraftEntity) entity).getHandle();
|
||||||
hasInvun = e.isInvulnerable();
|
hasInvun = e.isInvulnerable();
|
||||||
}
|
}
|
||||||
soundType = disSound.getType(soundName, !hasInvun);
|
soundType = disSound.getType(soundName, !hasInvun);
|
||||||
|
@ -9,18 +9,18 @@ import java.util.Random;
|
|||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.Watchers.AgeableWatcher;
|
import me.libraryaddict.disguise.DisguiseTypes.Watchers.AgeableWatcher;
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.Watchers.LivingWatcher;
|
import me.libraryaddict.disguise.DisguiseTypes.Watchers.LivingWatcher;
|
||||||
import net.minecraft.server.v1_5_R3.DataWatcher;
|
import net.minecraft.server.v1_6_R1.DataWatcher;
|
||||||
import net.minecraft.server.v1_5_R3.Entity;
|
import net.minecraft.server.v1_6_R1.Entity;
|
||||||
import net.minecraft.server.v1_5_R3.EntityLiving;
|
import net.minecraft.server.v1_6_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_5_R3.EntityTypes;
|
import net.minecraft.server.v1_6_R1.EntityTypes;
|
||||||
import net.minecraft.server.v1_5_R3.ItemStack;
|
import net.minecraft.server.v1_6_R1.ItemStack;
|
||||||
import net.minecraft.server.v1_5_R3.MathHelper;
|
import net.minecraft.server.v1_6_R1.MathHelper;
|
||||||
import net.minecraft.server.v1_5_R3.EnumArt;
|
import net.minecraft.server.v1_6_R1.EnumArt;
|
||||||
import net.minecraft.server.v1_5_R3.WatchableObject;
|
import net.minecraft.server.v1_6_R1.WatchableObject;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
@ -110,7 +110,7 @@ public class Disguise {
|
|||||||
else if (disguiseType == DisguiseType.FIREBALL)
|
else if (disguiseType == DisguiseType.FIREBALL)
|
||||||
name = "LargeFireball";
|
name = "LargeFireball";
|
||||||
try {
|
try {
|
||||||
Class entityClass = Class.forName("net.minecraft.server.v1_5_R3.Entity" + name);
|
Class entityClass = Class.forName("net.minecraft.server.v1_6_R1.Entity" + name);
|
||||||
Field field = EntityTypes.class.getDeclaredField("e");
|
Field field = EntityTypes.class.getDeclaredField("e");
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
Map map = (Map) field.get(null);
|
Map map = (Map) field.get(null);
|
||||||
|
@ -4,7 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.CraftSound;
|
import org.bukkit.craftbukkit.v1_6_R1.CraftSound;
|
||||||
|
|
||||||
public enum DisguiseSound {
|
public enum DisguiseSound {
|
||||||
|
|
||||||
|
@ -7,12 +7,12 @@ import java.util.Iterator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import net.minecraft.server.v1_5_R3.ItemStack;
|
import net.minecraft.server.v1_6_R1.ItemStack;
|
||||||
import net.minecraft.server.v1_5_R3.Packet40EntityMetadata;
|
import net.minecraft.server.v1_6_R1.Packet40EntityMetadata;
|
||||||
import net.minecraft.server.v1_5_R3.WatchableObject;
|
import net.minecraft.server.v1_6_R1.WatchableObject;
|
||||||
|
|
||||||
public class FlagWatcher {
|
public class FlagWatcher {
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package me.libraryaddict.disguise.DisguiseTypes;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public enum WatcherValues {
|
public enum WatcherValues {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher;
|
import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher;
|
||||||
@ -13,7 +13,7 @@ public class DroppedItemWatcher extends FlagWatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getItemStack() {
|
public ItemStack getItemStack() {
|
||||||
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_5_R3.ItemStack) getValue(10));
|
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_6_R1.ItemStack) getValue(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemStack(ItemStack item) {
|
public void setItemStack(ItemStack item) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher;
|
import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher;
|
||||||
@ -16,7 +16,7 @@ public class ItemFrameWatcher extends FlagWatcher {
|
|||||||
public ItemStack getItemStack() {
|
public ItemStack getItemStack() {
|
||||||
if (getValue(3) instanceof Integer)
|
if (getValue(3) instanceof Integer)
|
||||||
return new ItemStack(0);
|
return new ItemStack(0);
|
||||||
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_5_R3.ItemStack) getValue(3));
|
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_6_R1.ItemStack) getValue(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemStack(ItemStack newItem) {
|
public void setItemStack(ItemStack newItem) {
|
||||||
|
@ -3,8 +3,8 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import net.minecraft.server.v1_5_R3.MobEffect;
|
import net.minecraft.server.v1_6_R1.MobEffect;
|
||||||
import net.minecraft.server.v1_5_R3.PotionBrewer;
|
import net.minecraft.server.v1_6_R1.PotionBrewer;
|
||||||
|
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
@ -9,7 +9,7 @@ import me.libraryaddict.disguise.Commands.UndisguisePlayerCommand;
|
|||||||
import me.libraryaddict.disguise.DisguiseTypes.Disguise;
|
import me.libraryaddict.disguise.DisguiseTypes.Disguise;
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.DisguiseType;
|
import me.libraryaddict.disguise.DisguiseTypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.PlayerDisguise;
|
import me.libraryaddict.disguise.DisguiseTypes.PlayerDisguise;
|
||||||
import net.minecraft.server.v1_5_R3.WatchableObject;
|
import net.minecraft.server.v1_6_R1.WatchableObject;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
Loading…
Reference in New Issue
Block a user