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>
|
||||
<version>2.4.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.5.1-R0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.5.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -4,17 +4,17 @@ import java.util.HashMap;
|
||||
import me.libraryaddict.disguise.DisguiseTypes.Disguise;
|
||||
import me.libraryaddict.disguise.DisguiseTypes.DisguiseSound;
|
||||
import me.libraryaddict.disguise.DisguiseTypes.DisguiseSound.SoundType;
|
||||
import net.minecraft.server.v1_5_R3.Block;
|
||||
import net.minecraft.server.v1_5_R3.EntityPlayer;
|
||||
import net.minecraft.server.v1_5_R3.EntityTrackerEntry;
|
||||
import net.minecraft.server.v1_5_R3.World;
|
||||
import net.minecraft.server.v1_5_R3.WorldServer;
|
||||
import net.minecraft.server.v1_6_R1.Block;
|
||||
import net.minecraft.server.v1_6_R1.EntityPlayer;
|
||||
import net.minecraft.server.v1_6_R1.EntityTrackerEntry;
|
||||
import net.minecraft.server.v1_6_R1.World;
|
||||
import net.minecraft.server.v1_6_R1.WorldServer;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_5_R3.CraftSound;
|
||||
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.CraftSound;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -120,11 +120,11 @@ public class DisguiseAPI {
|
||||
} else {
|
||||
boolean hasInvun = false;
|
||||
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();
|
||||
hasInvun = e.noDamageTicks == e.maxNoDamageTicks;
|
||||
hasInvun = (e.noDamageTicks == e.maxNoDamageTicks);
|
||||
} 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();
|
||||
}
|
||||
soundType = disSound.getType(soundName, !hasInvun);
|
||||
@ -137,7 +137,7 @@ public class DisguiseAPI {
|
||||
soundType = null;
|
||||
disguisedEntity = entity;
|
||||
break;
|
||||
}*/
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,18 +9,18 @@ import java.util.Random;
|
||||
|
||||
import me.libraryaddict.disguise.DisguiseTypes.Watchers.AgeableWatcher;
|
||||
import me.libraryaddict.disguise.DisguiseTypes.Watchers.LivingWatcher;
|
||||
import net.minecraft.server.v1_5_R3.DataWatcher;
|
||||
import net.minecraft.server.v1_5_R3.Entity;
|
||||
import net.minecraft.server.v1_5_R3.EntityLiving;
|
||||
import net.minecraft.server.v1_5_R3.EntityTypes;
|
||||
import net.minecraft.server.v1_5_R3.ItemStack;
|
||||
import net.minecraft.server.v1_5_R3.MathHelper;
|
||||
import net.minecraft.server.v1_5_R3.EnumArt;
|
||||
import net.minecraft.server.v1_5_R3.WatchableObject;
|
||||
import net.minecraft.server.v1_6_R1.DataWatcher;
|
||||
import net.minecraft.server.v1_6_R1.Entity;
|
||||
import net.minecraft.server.v1_6_R1.EntityLiving;
|
||||
import net.minecraft.server.v1_6_R1.EntityTypes;
|
||||
import net.minecraft.server.v1_6_R1.ItemStack;
|
||||
import net.minecraft.server.v1_6_R1.MathHelper;
|
||||
import net.minecraft.server.v1_6_R1.EnumArt;
|
||||
import net.minecraft.server.v1_6_R1.WatchableObject;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -110,7 +110,7 @@ public class Disguise {
|
||||
else if (disguiseType == DisguiseType.FIREBALL)
|
||||
name = "LargeFireball";
|
||||
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.setAccessible(true);
|
||||
Map map = (Map) field.get(null);
|
||||
|
@ -4,7 +4,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_5_R3.CraftSound;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.CraftSound;
|
||||
|
||||
public enum DisguiseSound {
|
||||
|
||||
|
@ -7,12 +7,12 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
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 net.minecraft.server.v1_5_R3.ItemStack;
|
||||
import net.minecraft.server.v1_5_R3.Packet40EntityMetadata;
|
||||
import net.minecraft.server.v1_5_R3.WatchableObject;
|
||||
import net.minecraft.server.v1_6_R1.ItemStack;
|
||||
import net.minecraft.server.v1_6_R1.Packet40EntityMetadata;
|
||||
import net.minecraft.server.v1_6_R1.WatchableObject;
|
||||
|
||||
public class FlagWatcher {
|
||||
|
||||
|
@ -3,7 +3,7 @@ package me.libraryaddict.disguise.DisguiseTypes;
|
||||
import java.util.HashMap;
|
||||
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;
|
||||
|
||||
public enum WatcherValues {
|
||||
|
@ -1,6 +1,6 @@
|
||||
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 me.libraryaddict.disguise.DisguiseTypes.FlagWatcher;
|
||||
@ -13,7 +13,7 @@ public class DroppedItemWatcher extends FlagWatcher {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
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 me.libraryaddict.disguise.DisguiseTypes.FlagWatcher;
|
||||
@ -16,7 +16,7 @@ public class ItemFrameWatcher extends FlagWatcher {
|
||||
public ItemStack getItemStack() {
|
||||
if (getValue(3) instanceof Integer)
|
||||
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) {
|
||||
|
@ -3,8 +3,8 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.server.v1_5_R3.MobEffect;
|
||||
import net.minecraft.server.v1_5_R3.PotionBrewer;
|
||||
import net.minecraft.server.v1_6_R1.MobEffect;
|
||||
import net.minecraft.server.v1_6_R1.PotionBrewer;
|
||||
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
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.DisguiseType;
|
||||
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.ChatColor;
|
||||
|
Loading…
Reference in New Issue
Block a user