Updated to 1.6.2
This commit is contained in:
parent
e0129c154a
commit
c70f0ab5b4
2
pom.xml
2
pom.xml
@ -57,7 +57,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.6.2-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.comphenix.protocol</groupId>
|
||||
|
@ -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_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 net.minecraft.server.v1_6_R2.Block;
|
||||
import net.minecraft.server.v1_6_R2.EntityPlayer;
|
||||
import net.minecraft.server.v1_6_R2.EntityTrackerEntry;
|
||||
import net.minecraft.server.v1_6_R2.World;
|
||||
import net.minecraft.server.v1_6_R2.WorldServer;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
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.craftbukkit.v1_6_R2.CraftSound;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -116,11 +116,11 @@ public class DisguiseAPI {
|
||||
} else {
|
||||
boolean hasInvun = false;
|
||||
if (entity instanceof LivingEntity) {
|
||||
net.minecraft.server.v1_6_R1.EntityLiving e = ((CraftLivingEntity) entity)
|
||||
net.minecraft.server.v1_6_R2.EntityLiving e = ((CraftLivingEntity) entity)
|
||||
.getHandle();
|
||||
hasInvun = (e.noDamageTicks == e.maxNoDamageTicks);
|
||||
} else {
|
||||
net.minecraft.server.v1_6_R1.Entity e = ((CraftEntity) entity).getHandle();
|
||||
net.minecraft.server.v1_6_R2.Entity e = ((CraftEntity) entity).getHandle();
|
||||
hasInvun = e.isInvulnerable();
|
||||
}
|
||||
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.LivingWatcher;
|
||||
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 net.minecraft.server.v1_6_R2.DataWatcher;
|
||||
import net.minecraft.server.v1_6_R2.Entity;
|
||||
import net.minecraft.server.v1_6_R2.EntityLiving;
|
||||
import net.minecraft.server.v1_6_R2.EntityTypes;
|
||||
import net.minecraft.server.v1_6_R2.ItemStack;
|
||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
||||
import net.minecraft.server.v1_6_R2.EnumArt;
|
||||
import net.minecraft.server.v1_6_R2.WatchableObject;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.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_6_R1.Entity" + name);
|
||||
Class entityClass = Class.forName("net.minecraft.server.v1_6_R2.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_6_R1.CraftSound;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.CraftSound;
|
||||
|
||||
public enum DisguiseSound {
|
||||
|
||||
@ -30,6 +30,8 @@ public enum DisguiseSound {
|
||||
|
||||
GIANT(Sound.HURT_FLESH, Sound.STEP_GRASS, null, null),
|
||||
|
||||
HORSE(null, null, null, null),
|
||||
|
||||
IRON_GOLEM(Sound.IRONGOLEM_HIT, Sound.IRONGOLEM_WALK, Sound.IRONGOLEM_DEATH, Sound.IRONGOLEM_THROW),
|
||||
|
||||
MAGMA_CUBE(Sound.SLIME_ATTACK, Sound.SLIME_WALK2, null, null, Sound.SLIME_WALK),
|
||||
|
@ -7,13 +7,13 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.minecraft.server.v1_6_R1.ChunkCoordinates;
|
||||
import net.minecraft.server.v1_6_R1.ItemStack;
|
||||
import net.minecraft.server.v1_6_R1.Packet40EntityMetadata;
|
||||
import net.minecraft.server.v1_6_R1.WatchableObject;
|
||||
import net.minecraft.server.v1_6_R2.ChunkCoordinates;
|
||||
import net.minecraft.server.v1_6_R2.ItemStack;
|
||||
import net.minecraft.server.v1_6_R2.Packet40EntityMetadata;
|
||||
import net.minecraft.server.v1_6_R2.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_6_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.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_6_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.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_6_R1.ItemStack) getValue(10));
|
||||
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_6_R2.ItemStack) getValue(10));
|
||||
}
|
||||
|
||||
public void setItemStack(ItemStack item) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.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_6_R1.ItemStack) getValue(3));
|
||||
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_6_R2.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_6_R1.MobEffect;
|
||||
import net.minecraft.server.v1_6_R1.PotionBrewer;
|
||||
import net.minecraft.server.v1_6_R2.MobEffect;
|
||||
import net.minecraft.server.v1_6_R2.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_6_R1.WatchableObject;
|
||||
import net.minecraft.server.v1_6_R2.WatchableObject;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
Loading…
Reference in New Issue
Block a user