Updated to 1.6.2

This commit is contained in:
Andrew 2013-07-09 14:51:35 +12:00
parent e0129c154a
commit c70f0ab5b4
10 changed files with 38 additions and 36 deletions

View File

@ -57,7 +57,7 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<version>1.6.1-R0.1-SNAPSHOT</version> <version>1.6.2-R0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.comphenix.protocol</groupId> <groupId>com.comphenix.protocol</groupId>

View File

@ -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_6_R1.Block; import net.minecraft.server.v1_6_R2.Block;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R1.EntityTrackerEntry; import net.minecraft.server.v1_6_R2.EntityTrackerEntry;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import net.minecraft.server.v1_6_R1.WorldServer; import net.minecraft.server.v1_6_R2.WorldServer;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_6_R1.CraftSound; import org.bukkit.craftbukkit.v1_6_R2.CraftSound;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_6_R2.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;
@ -116,11 +116,11 @@ public class DisguiseAPI {
} else { } else {
boolean hasInvun = false; boolean hasInvun = false;
if (entity instanceof LivingEntity) { 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(); .getHandle();
hasInvun = (e.noDamageTicks == e.maxNoDamageTicks); hasInvun = (e.noDamageTicks == e.maxNoDamageTicks);
} else { } 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(); hasInvun = e.isInvulnerable();
} }
soundType = disSound.getType(soundName, !hasInvun); soundType = disSound.getType(soundName, !hasInvun);

View File

@ -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_6_R1.DataWatcher; import net.minecraft.server.v1_6_R2.DataWatcher;
import net.minecraft.server.v1_6_R1.Entity; import net.minecraft.server.v1_6_R2.Entity;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.EntityTypes; import net.minecraft.server.v1_6_R2.EntityTypes;
import net.minecraft.server.v1_6_R1.ItemStack; import net.minecraft.server.v1_6_R2.ItemStack;
import net.minecraft.server.v1_6_R1.MathHelper; import net.minecraft.server.v1_6_R2.MathHelper;
import net.minecraft.server.v1_6_R1.EnumArt; import net.minecraft.server.v1_6_R2.EnumArt;
import net.minecraft.server.v1_6_R1.WatchableObject; import net.minecraft.server.v1_6_R2.WatchableObject;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack; import org.bukkit.craftbukkit.v1_6_R2.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_6_R1.Entity" + name); Class entityClass = Class.forName("net.minecraft.server.v1_6_R2.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);

View File

@ -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_6_R1.CraftSound; import org.bukkit.craftbukkit.v1_6_R2.CraftSound;
public enum DisguiseSound { public enum DisguiseSound {
@ -30,6 +30,8 @@ public enum DisguiseSound {
GIANT(Sound.HURT_FLESH, Sound.STEP_GRASS, null, null), 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), 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), MAGMA_CUBE(Sound.SLIME_ATTACK, Sound.SLIME_WALK2, null, null, Sound.SLIME_WALK),

View File

@ -7,13 +7,13 @@ 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_6_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import net.minecraft.server.v1_6_R1.ChunkCoordinates; import net.minecraft.server.v1_6_R2.ChunkCoordinates;
import net.minecraft.server.v1_6_R1.ItemStack; import net.minecraft.server.v1_6_R2.ItemStack;
import net.minecraft.server.v1_6_R1.Packet40EntityMetadata; import net.minecraft.server.v1_6_R2.Packet40EntityMetadata;
import net.minecraft.server.v1_6_R1.WatchableObject; import net.minecraft.server.v1_6_R2.WatchableObject;
public class FlagWatcher { public class FlagWatcher {

View File

@ -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_6_R1.inventory.CraftItemStack; import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
public enum WatcherValues { public enum WatcherValues {

View File

@ -1,6 +1,6 @@
package me.libraryaddict.disguise.DisguiseTypes.Watchers; 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 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_6_R1.ItemStack) getValue(10)); return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_6_R2.ItemStack) getValue(10));
} }
public void setItemStack(ItemStack item) { public void setItemStack(ItemStack item) {

View File

@ -1,6 +1,6 @@
package me.libraryaddict.disguise.DisguiseTypes.Watchers; 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 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_6_R1.ItemStack) getValue(3)); return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_6_R2.ItemStack) getValue(3));
} }
public void setItemStack(ItemStack newItem) { public void setItemStack(ItemStack newItem) {

View File

@ -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_6_R1.MobEffect; import net.minecraft.server.v1_6_R2.MobEffect;
import net.minecraft.server.v1_6_R1.PotionBrewer; import net.minecraft.server.v1_6_R2.PotionBrewer;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;

View File

@ -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_6_R1.WatchableObject; import net.minecraft.server.v1_6_R2.WatchableObject;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;