1.8 Updates

This commit is contained in:
Shaun Bennett 2015-07-27 20:26:37 -05:00
parent 5895adaeca
commit 16bad71dcc
56 changed files with 348 additions and 568 deletions

View File

@ -5,6 +5,8 @@
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/Nautilus.Game.PvP" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Mineplex.Game.Clans" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Nautilus.Game.Arcade" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Mineplex.Hub" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>

View File

@ -1,42 +0,0 @@
package net.minecraft.server.v1_7_R4;
import net.minecraft.server.v1_7_R4.ItemStack;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketDataSerializer;
import net.minecraft.server.v1_7_R4.PacketListener;
import net.minecraft.server.v1_7_R4.PacketPlayOutListener;
public class PacketPlayOutSetSlot extends Packet {
public int a;
public int b;
public ItemStack c;
public PacketPlayOutSetSlot() {
}
public PacketPlayOutSetSlot(int i, int j, ItemStack itemstack) {
this.a = i;
this.b = j;
this.c = itemstack == null?null:itemstack.cloneItemStack();
}
public void a(PacketPlayOutListener packetplayoutlistener) {
packetplayoutlistener.a(this);
}
public void a(PacketDataSerializer packetdataserializer) {
this.a = packetdataserializer.readByte();
this.b = packetdataserializer.readShort();
this.c = packetdataserializer.c();
}
public void b(PacketDataSerializer packetdataserializer) {
packetdataserializer.writeByte(this.a);
packetdataserializer.writeShort(this.b);
packetdataserializer.a(this.c);
}
public void handle(PacketListener packetlistener) {
this.a((PacketPlayOutListener)packetlistener);
}
}

View File

@ -1,179 +0,0 @@
package net.minecraft.server.v1_7_R4;
import java.io.IOException;
import java.util.HashMap;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketDataSerializer;
import net.minecraft.server.v1_7_R4.PacketListener;
import net.minecraft.server.v1_7_R4.PacketPlayOutListener;
public class PacketPlayOutWorldParticles extends Packet {
private String a;
private float b;
private float c;
private float d;
private float e;
private float f;
private float g;
private float h;
private int i;
private boolean _displayFar;
public PacketPlayOutWorldParticles() {
}
public PacketPlayOutWorldParticles(String s, float f, float f1, float f2, float f3, float f4, float f5, float f6, int i) {
this(s, f, f1, f2, f3, f4, f5, f6, i, false);
}
public PacketPlayOutWorldParticles(String s, float f, float f1, float f2, float f3, float f4, float f5, float f6, int i, boolean displayFar) {
this.a = s;
this.b = f;
this.c = f1;
this.d = f2;
this.e = f3;
this.f = f4;
this.g = f5;
this.h = f6;
this.i = i;
_displayFar = displayFar;
}
public void a(PacketDataSerializer packetdataserializer) throws IOException {
this.a = packetdataserializer.c(64);
this.b = packetdataserializer.readFloat();
this.c = packetdataserializer.readFloat();
this.d = packetdataserializer.readFloat();
this.e = packetdataserializer.readFloat();
this.f = packetdataserializer.readFloat();
this.g = packetdataserializer.readFloat();
this.h = packetdataserializer.readFloat();
this.i = packetdataserializer.readInt();
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {
String[] parts = this.a.split("_");
PacketPlayOutWorldParticles.Particle particle = PacketPlayOutWorldParticles.Particle.find(parts[0]);
if(particle == null) {
particle = PacketPlayOutWorldParticles.Particle.CRIT;
}
if(packetdataserializer.version < 17) {
packetdataserializer.a(this.a);
} else {
packetdataserializer.writeInt(particle.ordinal());
packetdataserializer.writeBoolean(_displayFar);
}
packetdataserializer.writeFloat(this.b);
packetdataserializer.writeFloat(this.c);
packetdataserializer.writeFloat(this.d);
packetdataserializer.writeFloat(this.e);
packetdataserializer.writeFloat(this.f);
packetdataserializer.writeFloat(this.g);
packetdataserializer.writeFloat(this.h);
packetdataserializer.writeInt(this.i);
if(packetdataserializer.version >= 17) {
for(int i = 0; i < particle.extra; ++i) {
int toWrite = 0;
if(parts.length - 1 > i) {
try {
toWrite = Integer.parseInt(parts[i + 1]);
if(particle.extra == 1 && parts.length == 3) {
++i;
toWrite |= Integer.parseInt(parts[i + 1]) << 12;
}
} catch (NumberFormatException var7) {
;
}
}
packetdataserializer.b(toWrite);
}
}
}
public void a(PacketPlayOutListener packetplayoutlistener) {
packetplayoutlistener.a(this);
}
public void handle(PacketListener packetlistener) {
this.a((PacketPlayOutListener)packetlistener);
}
private static enum Particle {
EXPLOSION_NORMAL("explode"),
EXPLOSION_LARGE("largeexplode"),
EXPLOSION_HUGE("hugeexplosion"),
FIREWORKS_SPARK("fireworksSpark"),
WATER_BUBBLE("bubble"),
WATER_SPLASH("splash"),
WATER_WAKE("wake"),
SUSPENDED("suspended"),
SUSPENDED_DEPTH("depthsuspend"),
CRIT("crit"),
CRIT_MAGIC("magicCrit"),
SMOKE_NORMAL("smoke"),
SMOKE_LARGE("largesmoke"),
SPELL("spell"),
SPELL_INSTANT("instantSpell"),
SPELL_MOB("mobSpell"),
SPELL_MOB_AMBIENT("mobSpellAmbient"),
SPELL_WITCH("witchMagic"),
DRIP_WATER("dripWater"),
DRIP_LAVA("dripLava"),
VILLAGER_ANGRY("angryVillager"),
VILLAGER_HAPPY("happyVillager"),
TOWN_AURA("townaura"),
NOTE("note"),
PORTAL("portal"),
ENCHANTMENT_TABLE("enchantmenttable"),
FLAME("flame"),
LAVA("lava"),
FOOTSTEP("footstep"),
CLOUD("cloud"),
REDSTONE("reddust"),
SNOWBALL("snowballpoof"),
SNOW_SHOVEL("snowshovel"),
SLIME("slime"),
HEART("heart"),
BARRIER("barrier"),
ICON_CRACK("iconcrack", 2),
BLOCK_CRACK("blockcrack", 1),
BLOCK_DUST("blockdust", 1),
WATER_DROP("droplet"),
ITEM_TAKE("take"),
MOB_APPEARANCE("mobappearance");
public final String name;
public final int extra;
private static final HashMap<String, PacketPlayOutWorldParticles.Particle> particleMap;
private Particle(String name) {
this(name, 0);
}
private Particle(String name, int extra) {
this.name = name;
this.extra = extra;
}
public static PacketPlayOutWorldParticles.Particle find(String part) {
return (PacketPlayOutWorldParticles.Particle)particleMap.get(part);
}
static {
particleMap = new HashMap();
PacketPlayOutWorldParticles.Particle[] var0 = values();
int var1 = var0.length;
for(int var2 = 0; var2 < var1; ++var2) {
PacketPlayOutWorldParticles.Particle particle = var0[var2];
particleMap.put(particle.name, particle);
}
}
}
}

View File

@ -1,8 +1,8 @@
package mineplex.core.common;
import net.minecraft.server.v1_8_R2.Entity;
import net.minecraft.server.v1_8_R2.NBTTagCompound;
import net.minecraft.server.v1_8_R2.World;
import net.minecraft.server.v1_8_R3.Entity;
import net.minecraft.server.v1_8_R3.NBTTagCompound;
import net.minecraft.server.v1_8_R3.World;
public class DummyEntity extends Entity
{

View File

@ -1,9 +1,9 @@
package mineplex.core.common.jsonchat;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.IChatBaseComponent;
import net.minecraft.server.v1_8_R2.PacketPlayOutChat;
import net.minecraft.server.v1_8_R3.IChatBaseComponent;
import net.minecraft.server.v1_8_R3.PacketPlayOutChat;
import mineplex.core.common.util.UtilServer;

View File

@ -2,7 +2,7 @@ package mineplex.core.common.util;
import java.util.HashMap;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventory;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventory;
import org.bukkit.inventory.ItemStack;
public class InventoryUtil

View File

@ -10,31 +10,31 @@ import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_8_R2.CraftChunk;
import org.bukkit.craftbukkit.v1_8_R2.CraftServer;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.v1_8_R3.CraftChunk;
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.util.CraftMagicNumbers;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.world.WorldUnloadEvent;
import org.bukkit.plugin.java.JavaPlugin;
import net.minecraft.server.v1_8_R2.Block;
import net.minecraft.server.v1_8_R2.BlockPosition;
import net.minecraft.server.v1_8_R2.ChunkCoordIntPair;
import net.minecraft.server.v1_8_R2.ExceptionWorldConflict;
import net.minecraft.server.v1_8_R2.IBlockData;
import net.minecraft.server.v1_8_R2.IProgressUpdate;
import net.minecraft.server.v1_8_R2.MinecraftServer;
import net.minecraft.server.v1_8_R2.PacketPlayOutMultiBlockChange;
import net.minecraft.server.v1_8_R2.RegionFile;
import net.minecraft.server.v1_8_R2.RegionFileCache;
import net.minecraft.server.v1_8_R3.Block;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.ChunkCoordIntPair;
import net.minecraft.server.v1_8_R3.ExceptionWorldConflict;
import net.minecraft.server.v1_8_R3.IBlockData;
import net.minecraft.server.v1_8_R3.IProgressUpdate;
import net.minecraft.server.v1_8_R3.MinecraftServer;
import net.minecraft.server.v1_8_R3.PacketPlayOutMultiBlockChange;
import net.minecraft.server.v1_8_R3.RegionFile;
import net.minecraft.server.v1_8_R3.RegionFileCache;
public class MapUtil
{
/*public static void ReplaceOreInChunk(Chunk chunk, Material replacee, Material replacer)
{
net.minecraft.server.v1_8_R2.Chunk c = ((CraftChunk) chunk).getHandle();
net.minecraft.server.v1_8_R3.Chunk c = ((CraftChunk) chunk).getHandle();
for (int x = 0; x < 16; x++)
{
@ -81,7 +81,7 @@ public class MapUtil
public static void QuickChangeBlockAt(World world, int x, int y, int z, int id, int data)
{
Chunk chunk = world.getChunkAt(x >> 4, z >> 4);
net.minecraft.server.v1_8_R2.Chunk c = ((CraftChunk) chunk).getHandle();
net.minecraft.server.v1_8_R3.Chunk c = ((CraftChunk) chunk).getHandle();
//c.a(x & 0xF, y, z & 0xF, Block.getById(id), data);
IBlockData blockData = CraftMagicNumbers.getBlock(id).fromLegacyData(data);
@ -150,7 +150,7 @@ public class MapUtil
world.getBlockAt(x, y, z).setTypeIdAndData(id, data, notifyPlayers);
}
private static boolean changeChunkBlock(int x, int y, int z, net.minecraft.server.v1_8_R2.Chunk chunk, Block block,
private static boolean changeChunkBlock(int x, int y, int z, net.minecraft.server.v1_8_R3.Chunk chunk, Block block,
byte data)
{
chunk.a(bp(x, y, z), block.fromLegacyData(data));
@ -158,7 +158,7 @@ public class MapUtil
// return chunk.a(x, y, z, block, data);
}
public static void SendChunkForPlayer(net.minecraft.server.v1_8_R2.Chunk chunk, Player player)
public static void SendChunkForPlayer(net.minecraft.server.v1_8_R3.Chunk chunk, Player player)
{
SendChunkForPlayer(chunk.locX, chunk.locZ, player);
}
@ -207,7 +207,7 @@ public class MapUtil
Bukkit.getPluginManager().callEvent(new WorldUnloadEvent(((CraftWorld) world).getHandle().getWorld()));
Iterator<net.minecraft.server.v1_8_R2.Chunk> chunkIterator = ((CraftWorld) world).getHandle().chunkProviderServer.chunks
Iterator<net.minecraft.server.v1_8_R3.Chunk> chunkIterator = ((CraftWorld) world).getHandle().chunkProviderServer.chunks
.values().iterator();
for (Entity entity : world.getEntities())
@ -217,7 +217,7 @@ public class MapUtil
while (chunkIterator.hasNext())
{
net.minecraft.server.v1_8_R2.Chunk chunk = chunkIterator.next();
net.minecraft.server.v1_8_R3.Chunk chunk = chunkIterator.next();
chunk.removeEntities();
}

View File

@ -4,16 +4,17 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import net.minecraft.server.v1_7_R4.Blocks;
import net.minecraft.server.v1_7_R4.MathHelper;
import net.minecraft.server.v1_7_R4.WorldServer;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.Blocks;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.WorldServer;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.inventory.ItemStack;
public class UtilBlock
@ -451,8 +452,9 @@ public class UtilBlock
if (block.getType() != Material.AIR)
{
float f3 = (damageBlocksEqually ? Blocks.DIRT : world.getType(block.getX(), block.getY(),
block.getZ())).a((net.minecraft.server.v1_7_R4.Entity) null);
Blocks.DIRT.a((net.minecraft.server.v1_8_R3.Entity) null);
float f3 = (damageBlocksEqually ? Blocks.DIRT : world.getType(new BlockPosition(block.getX(), block.getY(),
block.getZ())).getBlock()).a((net.minecraft.server.v1_8_R3.Entity) null);
f1 -= (f3 + 0.3F) * f2;
}

View File

@ -4,36 +4,34 @@ import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.server.v1_7_R4.EntityBat;
import net.minecraft.server.v1_7_R4.EntityCreature;
import net.minecraft.server.v1_7_R4.EntityEnderDragon;
import net.minecraft.server.v1_7_R4.EntityHuman;
import net.minecraft.server.v1_7_R4.EntityInsentient;
import net.minecraft.server.v1_7_R4.EntityLiving;
import net.minecraft.server.v1_7_R4.Navigation;
import net.minecraft.server.v1_7_R4.PathfinderGoal;
import net.minecraft.server.v1_7_R4.PathfinderGoalLookAtPlayer;
import net.minecraft.server.v1_7_R4.PathfinderGoalMoveTowardsRestriction;
import net.minecraft.server.v1_7_R4.PathfinderGoalRandomLookaround;
import net.minecraft.server.v1_7_R4.PathfinderGoalSelector;
import net.minecraft.server.v1_8_R3.EntityBat;
import net.minecraft.server.v1_8_R3.EntityCreature;
import net.minecraft.server.v1_8_R3.EntityEnderDragon;
import net.minecraft.server.v1_8_R3.EntityHuman;
import net.minecraft.server.v1_8_R3.EntityInsentient;
import net.minecraft.server.v1_8_R3.NavigationAbstract;
import net.minecraft.server.v1_8_R3.PathfinderGoal;
import net.minecraft.server.v1_8_R3.PathfinderGoalLookAtPlayer;
import net.minecraft.server.v1_8_R3.PathfinderGoalMoveTowardsRestriction;
import net.minecraft.server.v1_8_R3.PathfinderGoalRandomLookaround;
import net.minecraft.server.v1_8_R3.PathfinderGoalSelector;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Giant;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
public class UtilEnt
{
@ -53,19 +51,19 @@ public class UtilEnt
return _nameMap;
}
public static void silence(Entity entity, boolean silence)
public static void silence(LivingEntity entity, boolean silence)
{
((CraftEntity)entity).getHandle().Silent = silence;
((CraftLivingEntity)entity).getHandle().silent = silence;
}
public static void ghost(Entity entity, boolean ghost, boolean invisible)
{
if (entity instanceof LivingEntity)
{
((CraftLivingEntity)entity).getHandle().ghost = ghost;
((CraftLivingEntity)entity).getHandle().Ghost = ghost;
}
((CraftEntity)entity).getHandle().Invisible = invisible;
// ((CraftEntity)entity).getHandle().Invisible = invisible;
((CraftEntity)entity).getHandle().setInvisible(invisible);
}
@ -76,7 +74,7 @@ public class UtilEnt
EntityInsentient creature = (EntityInsentient)((CraftEntity)leashed).getHandle();
creature.PullWhileLeashed = pull;
creature.BreakLeash = breakable;
creature.ShouldBreakLeash = breakable;
}
leashed.setLeashHolder(holder);
@ -174,7 +172,7 @@ public class UtilEnt
EntityInsentient creature = (EntityInsentient)((CraftEntity)entity).getHandle();
creature.Vegetated = true;
creature.Silent = mute;
creature.silent = mute;
((List)_pathfinderBList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
((List)_pathfinderCList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
@ -591,7 +589,7 @@ public class UtilEnt
return;
EntityCreature ec = ((CraftCreature)ent).getHandle();
Navigation nav = ec.getNavigation();
NavigationAbstract nav = ec.getNavigation();
if (UtilMath.offset(ent.getLocation(), target) > 16)
{
@ -643,7 +641,7 @@ public class UtilEnt
{
try
{
Field field = net.minecraft.server.v1_7_R4.Entity.class.getDeclaredField("entityCount");
Field field = net.minecraft.server.v1_8_R3.Entity.class.getDeclaredField("entityCount");
field.setAccessible(true);
int entityId = field.getInt(null);
if (modifynumber) {

View File

@ -4,9 +4,9 @@ import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftFirework;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftFirework;
import org.bukkit.entity.Firework;
import org.bukkit.inventory.meta.FireworkMeta;
import org.bukkit.util.Vector;

View File

@ -3,7 +3,8 @@ package mineplex.core.common.util;
import java.lang.reflect.Field;
import mineplex.core.common.util.UtilParticle.ViewDist;
import net.minecraft.server.v1_7_R4.PacketPlayOutWorldParticles;
import net.minecraft.server.v1_8_R3.EnumParticle;
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldParticles;
import org.bukkit.Location;
import org.bukkit.Material;
@ -34,9 +35,9 @@ public class UtilParticle
public enum ParticleType
{
ANGRY_VILLAGER("angryVillager", "Lightning Cloud", Material.INK_SACK, (byte) 11),
ANGRY_VILLAGER("angryVillager", "Lightning Cloud", Material.INK_SACK, (byte) 11, EnumParticle.VILLAGER_ANGRY),
BLOCK_CRACK("blockcrack_1_0")
BLOCK_CRACK("blockcrack_1_0", EnumParticle.BLOCK_CRACK)
{
@Override
public String getParticle(Material type, int data)
@ -45,7 +46,7 @@ public class UtilParticle
}
},
BLOCK_DUST("blockdust_1_0")
BLOCK_DUST("blockdust_1_0", EnumParticle.BLOCK_DUST)
{
@Override
public String getParticle(Material type, int data)
@ -54,37 +55,37 @@ public class UtilParticle
}
},
BUBBLE("bubble"),
BUBBLE("bubble", EnumParticle.WATER_BUBBLE),
CLOUD("cloud", "White Smoke", Material.INK_SACK, (byte) 7),
CLOUD("cloud", "White Smoke", Material.INK_SACK, (byte) 7, EnumParticle.CLOUD),
CRIT("crit", "Brown Magic", Material.INK_SACK, (byte) 14),
CRIT("crit", "Brown Magic", Material.INK_SACK, (byte) 14, EnumParticle.CRIT),
DEPTH_SUSPEND("depthSuspend"),
DEPTH_SUSPEND("depthSuspend", EnumParticle.SUSPENDED_DEPTH),
DRIP_LAVA("dripLava", "Lava Drip", Material.LAVA_BUCKET, (byte) 0),
DRIP_LAVA("dripLava", "Lava Drip", Material.LAVA_BUCKET, (byte) 0, EnumParticle.DRIP_LAVA),
DRIP_WATER("dripWater", "Water Drop", Material.WATER_BUCKET, (byte) 0),
DRIP_WATER("dripWater", "Water Drop", Material.WATER_BUCKET, (byte) 0, EnumParticle.DRIP_WATER),
DROPLET("droplet", "Water Splash", Material.INK_SACK, (byte) 4),
DROPLET("droplet", "Water Splash", Material.INK_SACK, (byte) 4, EnumParticle.WATER_DROP),
ENCHANTMENT_TABLE("enchantmenttable", "Enchantment Words", Material.BOOK, (byte) 0),
ENCHANTMENT_TABLE("enchantmenttable", "Enchantment Words", Material.BOOK, (byte) 0, EnumParticle.ENCHANTMENT_TABLE),
EXPLODE("explode", "Big White Smoke", Material.INK_SACK, (byte) 15),
EXPLODE("explode", "Big White Smoke", Material.INK_SACK, (byte) 15, EnumParticle.EXPLOSION_NORMAL),
FIREWORKS_SPARK("fireworksSpark", "White Sparkle", Material.GHAST_TEAR, (byte) 0),
FIREWORKS_SPARK("fireworksSpark", "White Sparkle", Material.GHAST_TEAR, (byte) 0, EnumParticle.FIREWORKS_SPARK),
FLAME("flame", "Flame", Material.BLAZE_POWDER, (byte) 0),
FLAME("flame", "Flame", Material.BLAZE_POWDER, (byte) 0, EnumParticle.FLAME),
FOOTSTEP("footstep", "Foot Step", Material.LEATHER_BOOTS, (byte) 0),
FOOTSTEP("footstep", "Foot Step", Material.LEATHER_BOOTS, (byte) 0, EnumParticle.FOOTSTEP),
HAPPY_VILLAGER("happyVillager", "Emerald Sparkle", Material.EMERALD, (byte) 0),
HAPPY_VILLAGER("happyVillager", "Emerald Sparkle", Material.EMERALD, (byte) 0, EnumParticle.VILLAGER_HAPPY),
HEART("heart", "Love Heart", Material.APPLE, (byte) 0),
HEART("heart", "Love Heart", Material.APPLE, (byte) 0, EnumParticle.HEART),
HUGE_EXPLOSION("hugeexplosion", "Huge Explosion", Material.TNT, (byte) 0),
HUGE_EXPLOSION("hugeexplosion", "Huge Explosion", Material.TNT, (byte) 0, EnumParticle.EXPLOSION_HUGE),
ICON_CRACK("iconcrack_1_0")
ICON_CRACK("iconcrack_1_0", EnumParticle.ITEM_CRACK)
{
@Override
public String getParticle(Material type, int data)
@ -93,70 +94,73 @@ public class UtilParticle
}
},
INSTANT_SPELL("instantSpell"),
INSTANT_SPELL("instantSpell", EnumParticle.SPELL_INSTANT),
LARGE_EXPLODE("largeexplode", "Explosion", Material.FIREBALL, (byte) 0),
LARGE_EXPLODE("largeexplode", "Explosion", Material.FIREBALL, (byte) 0, EnumParticle.EXPLOSION_LARGE),
LARGE_SMOKE("largesmoke", "Black Smoke", Material.INK_SACK, (byte) 0),
LARGE_SMOKE("largesmoke", "Black Smoke", Material.INK_SACK, (byte) 0, EnumParticle.SMOKE_LARGE),
LAVA("lava", "Lava Debris", Material.LAVA, (byte) 0),
LAVA("lava", "Lava Debris", Material.LAVA, (byte) 0, EnumParticle.LAVA),
MAGIC_CRIT("magicCrit", "Teal Magic", Material.INK_SACK, (byte) 6),
MAGIC_CRIT("magicCrit", "Teal Magic", Material.INK_SACK, (byte) 6, EnumParticle.CRIT_MAGIC),
/**
* Can be colored if count is 0, color is RGB and depends on the offset of xyz
*/
MOB_SPELL("mobSpell", "Black Swirls", Material.getMaterial(2263), (byte) 0),
MOB_SPELL("mobSpell", "Black Swirls", Material.getMaterial(2263), (byte) 0, EnumParticle.SPELL_MOB),
/**
* Can be colored if count is 0, color is RGB and depends on the offset of xyz
*/
MOB_SPELL_AMBIENT("mobSpellAmbient", "Transparent Black Swirls", Material.getMaterial(2266), (byte) 0),
MOB_SPELL_AMBIENT("mobSpellAmbient", "Transparent Black Swirls", Material.getMaterial(2266), (byte) 0, EnumParticle.SPELL_MOB_AMBIENT),
NOTE("note", "Musical Note", Material.JUKEBOX, (byte) 0),
NOTE("note", "Musical Note", Material.JUKEBOX, (byte) 0, EnumParticle.NOTE),
PORTAL("portal", "Portal Effect", Material.INK_SACK, (byte) 5),
PORTAL("portal", "Portal Effect", Material.INK_SACK, (byte) 5, EnumParticle.PORTAL),
/**
* Can be colored if count is 0, color is RGB and depends on the offset of xyz. Offset y if 0 will default to 1, counter by making it 0.0001
*/
RED_DUST("reddust", "Red Smoke", Material.INK_SACK, (byte) 1),
RED_DUST("reddust", "Red Smoke", Material.INK_SACK, (byte) 1, EnumParticle.REDSTONE),
SLIME("slime", "Slime Particles", Material.SLIME_BALL, (byte) 0),
SLIME("slime", "Slime Particles", Material.SLIME_BALL, (byte) 0, EnumParticle.SLIME),
SNOW_SHOVEL("snowshovel", "Snow Puffs", Material.SNOW_BALL, (byte) 0),
SNOW_SHOVEL("snowshovel", "Snow Puffs", Material.SNOW_BALL, (byte) 0, EnumParticle.SNOW_SHOVEL),
SNOWBALL_POOF("snowballpoof"),
SNOWBALL_POOF("snowballpoof", EnumParticle.SNOWBALL),
SPELL("spell", "White Swirls", Material.getMaterial(2264), (byte) 0),
SPELL("spell", "White Swirls", Material.getMaterial(2264), (byte) 0, EnumParticle.SPELL),
SPLASH("splash"),
SPLASH("splash", EnumParticle.WATER_SPLASH),
SUSPEND("suspended"),
SUSPEND("suspended", EnumParticle.SUSPENDED),
TOWN_AURA("townaura", "Black Specks", Material.COAL, (byte) 0),
TOWN_AURA("townaura", "Black Specks", Material.COAL, (byte) 0, EnumParticle.TOWN_AURA),
WITCH_MAGIC("witchMagic", "Purple Magic", Material.INK_SACK, (byte) 13);
WITCH_MAGIC("witchMagic", "Purple Magic", Material.INK_SACK, (byte) 13, EnumParticle.SPELL_WITCH);
public String particleName;
private boolean _friendlyData;
private String _friendlyName;
private Material _material;
private byte _data;
private EnumParticle _enumParticle;
ParticleType(String particleName)
ParticleType(String particleName, EnumParticle enumParticle)
{
this.particleName = particleName;
_friendlyData = false;
_enumParticle = enumParticle;
}
ParticleType(String particleName, String friendlyName, Material material, byte data)
ParticleType(String particleName, String friendlyName, Material material, byte data, EnumParticle enumParticle)
{
this.particleName = particleName;
_friendlyData = true;
_friendlyName = friendlyName;
_material = material;
_data = data;
_enumParticle = enumParticle;
}
public String getParticle(Material type, int data)
@ -198,26 +202,25 @@ public class UtilParticle
}
return null;
}
public EnumParticle getEnumParticle()
{
return _enumParticle;
}
}
private static PacketPlayOutWorldParticles getPacket(String particleName, Location location, float offsetX, float offsetY,
private static PacketPlayOutWorldParticles getPacket(EnumParticle particle, Location location, float offsetX, float offsetY,
float offsetZ, float speed, int count, boolean displayFar)
{
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleName, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, displayFar);
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particle, displayFar, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count);
return packet;
}
public static void PlayParticle(ParticleType type,Location location, float offsetX, float offsetY, float offsetZ,
float speed, int count, ViewDist dist, Player... players)
{
PlayParticle(type.particleName, location, offsetX, offsetY, offsetZ, speed, count, dist, players);
}
public static void PlayParticle(String particle, Location location, float offsetX, float offsetY, float offsetZ,
public static void PlayParticle(ParticleType particle, Location location, float offsetX, float offsetY, float offsetZ,
float speed, int count, ViewDist dist, Player... players)
{
PacketPlayOutWorldParticles packet = getPacket(particle, location, offsetX, offsetY, offsetZ, speed, count, true);
PacketPlayOutWorldParticles packet = getPacket(particle.getEnumParticle(), location, offsetX, offsetY, offsetZ, speed, count, true);
for (Player player : players)
{

View File

@ -9,15 +9,15 @@ import java.util.UUID;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PlayerConnection;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PlayerConnection;
public class UtilPlayer
{
@ -599,7 +599,7 @@ public class UtilPlayer
public static boolean isSpectator(Entity player)
{
if (player instanceof Player)
return ((CraftPlayer) player).getHandle().spectating;
return ((CraftPlayer) player).getHandle().Spectating;
return false;
}

View File

@ -5,11 +5,11 @@ import java.util.Map;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.IChatBaseComponent;
import net.minecraft.server.v1_8_R2.PacketPlayOutPlayerListHeaderFooter;
import net.minecraft.server.v1_8_R2.PacketPlayOutTitle;
import net.minecraft.server.v1_8_R3.IChatBaseComponent;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerListHeaderFooter;
import net.minecraft.server.v1_8_R3.PacketPlayOutTitle;
public class UtilTabTitle
{

View File

@ -1,11 +1,11 @@
package mineplex.core.common.util;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.ChatMessage;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PacketPlayOutTitle;
import net.minecraft.server.v1_8_R3.ChatMessage;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutTitle;
/**
* Created by Shaun on 9/5/2014.

View File

@ -1,16 +1,16 @@
package mineplex.core.common.util;
import mineplex.core.common.DummyEntity;
import net.minecraft.server.v1_8_R2.DataWatcher;
import net.minecraft.server.v1_8_R2.MathHelper;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;

View File

@ -2,22 +2,22 @@ package mineplex.core.common.util;
import java.io.File;
import net.minecraft.server.v1_8_R2.Convertable;
import net.minecraft.server.v1_8_R2.EntityTracker;
import net.minecraft.server.v1_8_R2.EnumDifficulty;
import net.minecraft.server.v1_8_R2.IWorldAccess;
import net.minecraft.server.v1_8_R2.ServerNBTManager;
import net.minecraft.server.v1_8_R2.WorldData;
import net.minecraft.server.v1_8_R2.WorldLoaderServer;
import net.minecraft.server.v1_8_R2.WorldManager;
import net.minecraft.server.v1_8_R2.WorldServer;
import net.minecraft.server.v1_8_R2.WorldSettings;
import net.minecraft.server.v1_8_R2.WorldType;
import net.minecraft.server.v1_8_R3.Convertable;
import net.minecraft.server.v1_8_R3.EntityTracker;
import net.minecraft.server.v1_8_R3.EnumDifficulty;
import net.minecraft.server.v1_8_R3.IWorldAccess;
import net.minecraft.server.v1_8_R3.ServerNBTManager;
import net.minecraft.server.v1_8_R3.WorldData;
import net.minecraft.server.v1_8_R3.WorldLoaderServer;
import net.minecraft.server.v1_8_R3.WorldManager;
import net.minecraft.server.v1_8_R3.WorldServer;
import net.minecraft.server.v1_8_R3.WorldSettings;
import net.minecraft.server.v1_8_R3.WorldType;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import org.bukkit.craftbukkit.v1_8_R2.CraftServer;
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.event.world.WorldInitEvent;
import org.bukkit.event.world.WorldLoadEvent;
import org.bukkit.generator.ChunkGenerator;

View File

@ -6,7 +6,7 @@ import java.sql.SQLException;
import mineplex.core.database.DBPool;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class AntiHackRepository

View File

@ -4,15 +4,15 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.minecraft.server.v1_8_R2.EntityPlayer;
import net.minecraft.server.v1_8_R2.IChatBaseComponent;
import net.minecraft.server.v1_8_R2.Items;
import net.minecraft.server.v1_8_R2.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_8_R2.PacketPlayOutSetSlot;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import net.minecraft.server.v1_8_R3.IChatBaseComponent;
import net.minecraft.server.v1_8_R3.Items;
import net.minecraft.server.v1_8_R3.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_8_R3.PacketPlayOutSetSlot;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
@ -171,7 +171,7 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
entityPlayer.activeContainer = new AnvilContainer(entityPlayer.inventory, petTagPage.getInventory());
entityPlayer.activeContainer.windowId = containerCounter;
entityPlayer.activeContainer.addSlotListener(entityPlayer);
entityPlayer.playerConnection.sendPacket(new PacketPlayOutSetSlot(containerCounter, 0, new net.minecraft.server.v1_8_R2.ItemStack(Items.NAME_TAG)));
entityPlayer.playerConnection.sendPacket(new PacketPlayOutSetSlot(containerCounter, 0, new net.minecraft.server.v1_8_R3.ItemStack(Items.NAME_TAG)));
getShop().setCurrentPageForPlayer(getPlayer(), petTagPage);
}

View File

@ -16,8 +16,8 @@ import mineplex.core.pet.repository.token.PetChangeToken;
import mineplex.core.pet.repository.token.PetToken;
import mineplex.core.shop.page.ConfirmationPage;
import mineplex.core.shop.page.ShopPageBase;
import net.minecraft.server.v1_8_R2.ItemStack;
import net.minecraft.server.v1_8_R2.Items;
import net.minecraft.server.v1_8_R3.ItemStack;
import net.minecraft.server.v1_8_R3.Items;
import org.bukkit.ChatColor;
import org.bukkit.Material;

View File

@ -2,9 +2,11 @@ package mineplex.core.creature.command;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
@ -110,7 +112,7 @@ public class MobCommand extends MultiCommandBase<Creature>
HashSet<Entity> entSet = new HashSet<Entity>();
for (int i = 0 ; i < count ; i++)
{
entSet.add(Plugin.SpawnEntity(caller.getTargetBlock(null, 0).getLocation().add(0.5, 1, 0.5), type));
entSet.add(Plugin.SpawnEntity(caller.getTargetBlock((Set<Material>) null, 0).getLocation().add(0.5, 1, 0.5), type));
}
//Search Vars

View File

@ -9,41 +9,41 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Map.Entry;
import net.minecraft.server.v1_7_R4.Block;
import net.minecraft.server.v1_7_R4.Chunk;
import net.minecraft.server.v1_7_R4.ChunkSection;
import net.minecraft.server.v1_7_R4.EntityTrackerEntry;
import net.minecraft.server.v1_7_R4.PacketPlayOutAnimation;
import net.minecraft.server.v1_7_R4.ChunkAddEntityEvent;
import net.minecraft.server.v1_7_R4.EntityPlayer;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketPlayOutBed;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityStatus;
import net.minecraft.server.v1_7_R4.PacketPlayOutMapChunk;
import net.minecraft.server.v1_7_R4.PacketPlayOutMapChunkBulk;
import net.minecraft.server.v1_7_R4.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R4.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_7_R4.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R4.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_7_R4.PacketPlayOutNamedSoundEffect;
import net.minecraft.server.v1_7_R4.WorldServer;
import net.minecraft.server.v1_8_R3.Block;
import net.minecraft.server.v1_8_R3.Chunk;
import net.minecraft.server.v1_8_R3.ChunkSection;
import net.minecraft.server.v1_8_R3.EntityTrackerEntry;
import net.minecraft.server.v1_8_R3.PacketPlayOutAnimation;
import net.minecraft.server.v1_8_R3.ChunkAddEntityEvent;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutBed;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityStatus;
import net.minecraft.server.v1_8_R3.PacketPlayOutMapChunk;
import net.minecraft.server.v1_8_R3.PacketPlayOutMapChunkBulk;
import net.minecraft.server.v1_8_R3.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R3.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_8_R3.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_8_R3.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_8_R3.PacketPlayOutNamedSoundEffect;
import net.minecraft.server.v1_8_R3.WorldServer;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
@ -144,7 +144,9 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
// block = ((Object[]) ReflectionManager.getNmsField(ReflectionManager.getNmsClass("Block"),"byId")
// .get(null))[Material.BED_BLOCK.getId()];
for (BlockFace face : new BlockFace[]
// TODO
/*for (BlockFace face : new BlockFace[]
{
BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH
})
@ -153,13 +155,14 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
chunkSection.setData(1 + face.getModX(), 0, 1 + face.getModZ(), face.ordinal());
chunkSection.setSkyLight(1 + face.getModX(), 0, 1 + face.getModZ(), 0);
chunkSection.setEmittedLight(1 + face.getModX(), 0, 1 + face.getModZ(), 0);
}
}*/
ChunkSection[] chunkSections = new ChunkSection[16];
chunkSections[0] = chunkSection;
cSection.set(_bedChunk, chunkSections);
_bedChunk.world = ((CraftWorld) Bukkit.getWorlds().get(0)).getHandle();
// TODO
// _bedChunk.world = ((CraftWorld) Bukkit.getWorlds().get(0)).getHandle();
_xChunk = Chunk.class.getField("locX");
_xChunk.setAccessible(true);
@ -522,7 +525,7 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
return _spawnPacketMap.get(entity.getEntityId());
}
private EntityTrackerEntry getEntityTracker(net.minecraft.server.v1_7_R4.Entity entity)
private EntityTrackerEntry getEntityTracker(net.minecraft.server.v1_8_R3.Entity entity)
{
return (EntityTrackerEntry) ((WorldServer) entity.world).tracker.trackedEntities.get(entity.getId());
}

View File

@ -3,12 +3,12 @@ package mineplex.core.disguise.disguises;
import mineplex.core.common.*;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
import net.minecraft.server.v1_8_R2.DataWatcher;
import net.minecraft.server.v1_8_R2.Entity;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.Entity;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
public abstract class DisguiseBase
{

View File

@ -8,8 +8,8 @@ import java.util.Iterator;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
@ -20,7 +20,7 @@ import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import net.minecraft.server.v1_8_R2.EntityPlayer;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import mineplex.core.command.CommandCenter;
import mineplex.core.common.util.C;

View File

@ -2,9 +2,9 @@ package mineplex.core.friend.ui;
import java.util.UUID;
import net.minecraft.server.v1_8_R2.EntityPlayer;
import net.minecraft.server.v1_8_R2.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R2.WorldSettings;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R3.WorldSettings;
import com.mojang.authlib.GameProfile;

View File

@ -2,10 +2,10 @@ package mineplex.core.friend.ui;
import java.util.HashSet;
import net.minecraft.server.v1_8_R2.EntityPlayer;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import org.bukkit.ChatColor;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;

View File

@ -8,7 +8,7 @@ import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.Material;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.EnderPearl;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;

View File

@ -4,7 +4,7 @@ import java.util.HashSet;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftFallingSand;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftFallingSand;
import org.bukkit.entity.Bat;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.Item;

View File

@ -8,18 +8,18 @@ import java.util.Iterator;
import java.util.Map.Entry;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import net.minecraft.server.v1_8_R2.DataWatcher;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntity;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_8_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntity;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilPlayer;

View File

@ -6,11 +6,11 @@ import java.util.List;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R3.Packet;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -16,7 +16,7 @@ import mineplex.core.common.util.UtilTime;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;

View File

@ -14,9 +14,12 @@ import javax.imageio.ImageIO;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilServer;
import net.minecraft.server.v1_7_R4.EntityItemFrame;
import net.minecraft.server.v1_7_R4.PersistentCollection;
import net.minecraft.server.v1_7_R4.WorldServer;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.EntityItemFrame;
import net.minecraft.server.v1_8_R3.EnumDirection;
import net.minecraft.server.v1_8_R3.PersistentCollection;
import net.minecraft.server.v1_8_R3.WorldServer;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@ -24,7 +27,7 @@ import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.entity.Hanging;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player;
@ -338,27 +341,27 @@ public class BlockMap implements Listener
private ItemFrame spawnItemFrame(Block block, BlockFace bf)
{
int dir;
EnumDirection dir;
switch (bf)
{
default:
case SOUTH:
dir = 0;
dir = EnumDirection.SOUTH;
break;
case WEST:
dir = 1;
dir = EnumDirection.WEST;
break;
case NORTH:
dir = 2;
dir = EnumDirection.NORTH;
break;
case EAST:
dir = 3;
dir = EnumDirection.EAST;
break;
}
WorldServer world = ((CraftWorld) block.getWorld()).getHandle();
EntityItemFrame entity = new EntityItemFrame(world, block.getX(), block.getY(), block.getZ(), dir);
EntityItemFrame entity = new EntityItemFrame(world, new BlockPosition(block.getX(), block.getY(), block.getZ()), dir);
entity.setDirection(dir);

View File

@ -1,6 +1,6 @@
package mineplex.core.map;
import net.minecraft.server.v1_7_R4.WorldMap;
import net.minecraft.server.v1_8_R3.WorldMap;
import org.bukkit.Bukkit;
import org.bukkit.Location;

View File

@ -3,18 +3,18 @@ package mineplex.core.map;
import java.util.HashMap;
import java.util.Map.Entry;
import net.minecraft.server.v1_7_R4.Block;
import net.minecraft.server.v1_7_R4.Blocks;
import net.minecraft.server.v1_7_R4.Chunk;
import net.minecraft.server.v1_7_R4.MaterialMapColor;
import net.minecraft.server.v1_7_R4.MathHelper;
import net.minecraft.server.v1_7_R4.WorldMap;
import net.minecraft.util.com.google.common.collect.HashMultiset;
import net.minecraft.util.com.google.common.collect.Iterables;
import net.minecraft.util.com.google.common.collect.Multisets;
import net.minecraft.server.v1_8_R3.Block;
import net.minecraft.server.v1_8_R3.Blocks;
import net.minecraft.server.v1_8_R3.Chunk;
import net.minecraft.server.v1_8_R3.MaterialMapColor;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.WorldMap;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Iterables;
import com.google.common.collect.Multisets;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.entity.Player;
import org.bukkit.map.MapCanvas;
import org.bukkit.map.MapRenderer;

View File

@ -6,7 +6,7 @@ import mineplex.core.common.util.UtilEnt;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEnderDragon;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.Entity;

View File

@ -8,12 +8,12 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import net.minecraft.server.v1_8_R2.EntityCreature;
import net.minecraft.server.v1_8_R2.NavigationAbstract;
import net.minecraft.server.v1_8_R3.EntityCreature;
import net.minecraft.server.v1_8_R3.NavigationAbstract;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
import org.bukkit.entity.Horse.Variant;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Player;

View File

@ -5,7 +5,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.plugin.java.JavaPlugin;

View File

@ -4,9 +4,9 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
import org.bukkit.entity.LivingEntity;
import net.minecraft.server.v1_8_R2.EntityCreature;
import net.minecraft.server.v1_8_R3.EntityCreature;
import mineplex.core.common.util.C;
import mineplex.database.tables.records.NpcsRecord;

View File

@ -19,8 +19,8 @@ import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
@ -42,7 +42,7 @@ import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;
import net.minecraft.server.v1_8_R2.EntityInsentient;
import net.minecraft.server.v1_8_R3.EntityInsentient;
import mineplex.core.MiniPlugin;
import mineplex.core.common.Rank;

View File

@ -4,16 +4,15 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashSet;
import net.minecraft.server.v1_7_R4.EnumProtocol;
import net.minecraft.server.v1_8_R3.EnumProtocol;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.spigotmc.ProtocolInjector;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.NautHashMap;
@ -41,20 +40,6 @@ public class PacketHandler extends MiniPlugin
field.setAccessible(true);
field.set(null, this);
}
EnumProtocol.PLAY.a().put(25, PacketPlayResourcePackStatus.class);
EnumProtocol.PLAY.a().put(PacketPlayResourcePackStatus.class, 25);
EnumProtocol.PLAY.a().put(2, PacketPlayUseEntity.class);
EnumProtocol.PLAY.a().put(PacketPlayUseEntity.class, 2);
Method method = ProtocolInjector.class.getDeclaredMethod("addPacket", EnumProtocol.class,boolean.class, int.class, Class.class);
method.setAccessible(true);
method.invoke(null, EnumProtocol.PLAY, true, 68, PacketPlayOutWorldBorder.class);
// EnumProtocol.PLAY.b().put(68, PacketPlayOutWorldBorder.class);
// EnumProtocol.PLAY.b().put(PacketPlayOutWorldBorder.class, 68);
}
catch (Exception ex)
{

View File

@ -2,7 +2,7 @@ package mineplex.core.packethandler;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R3.Packet;
public class PacketInfo
{

View File

@ -1,10 +1,10 @@
package mineplex.core.packethandler;
import net.minecraft.server.v1_8_R2.PacketDataSerializer;
import net.minecraft.server.v1_8_R2.PacketListenerPlayOut;
import net.minecraft.server.v1_8_R3.PacketDataSerializer;
import net.minecraft.server.v1_8_R3.PacketListenerPlayOut;
public class PacketPlayOutWorldBorder extends net.minecraft.server.v1_8_R2.PacketPlayOutWorldBorder
public class PacketPlayOutWorldBorder extends net.minecraft.server.v1_8_R3.PacketPlayOutWorldBorder
{
/**
* @0 Set size - newRadius

View File

@ -3,11 +3,11 @@ package mineplex.core.packethandler;
import java.io.IOException;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PacketDataSerializer;
import net.minecraft.server.v1_8_R2.PacketListenerPlayIn;
import net.minecraft.server.v1_8_R2.PacketPlayInResourcePackStatus;
import net.minecraft.server.v1_8_R2.PlayerConnection;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketDataSerializer;
import net.minecraft.server.v1_8_R3.PacketListenerPlayIn;
import net.minecraft.server.v1_8_R3.PacketPlayInResourcePackStatus;
import net.minecraft.server.v1_8_R3.PlayerConnection;
public class PacketPlayResourcePackStatus implements Packet<PacketListenerPlayIn>
{

View File

@ -4,13 +4,12 @@ import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityDestroy;
import com.mineplex.spigot.IPacketVerifier;
import net.minecraft.server.v1_8_R3.IPacketVerifier;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
public class PacketVerifier implements IPacketVerifier
{

View File

@ -19,18 +19,18 @@ import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilServer;
import mineplex.core.disguise.DisguiseManager;
import mineplex.core.donation.DonationManager;
import net.minecraft.server.v1_8_R2.EntityCreature;
import net.minecraft.server.v1_8_R2.EntityWither;
import net.minecraft.server.v1_8_R2.Navigation;
import net.minecraft.server.v1_8_R2.NavigationAbstract;
import net.minecraft.server.v1_8_R3.EntityCreature;
import net.minecraft.server.v1_8_R3.EntityWither;
import net.minecraft.server.v1_8_R3.Navigation;
import net.minecraft.server.v1_8_R3.NavigationAbstract;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import com.google.gson.Gson;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;

View File

@ -3,13 +3,13 @@ package mineplex.core.pet.types;
import java.lang.reflect.Field;
import java.util.HashMap;
import org.bukkit.craftbukkit.v1_8_R2.SpigotTimings;
import org.bukkit.craftbukkit.v1_8_R3.SpigotTimings;
import org.bukkit.entity.EntityType;
import net.minecraft.server.v1_8_R2.EntityTypes;
import net.minecraft.server.v1_8_R2.EntityWither;
import net.minecraft.server.v1_8_R2.MathHelper;
import net.minecraft.server.v1_8_R2.World;
import net.minecraft.server.v1_8_R3.EntityTypes;
import net.minecraft.server.v1_8_R3.EntityWither;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.World;
public class CustomWither extends EntityWither
{

View File

@ -8,19 +8,19 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import net.minecraft.server.v1_7_R4.AxisAlignedBB;
import net.minecraft.server.v1_7_R4.MathHelper;
import net.minecraft.server.v1_7_R4.MovingObjectPosition;
import net.minecraft.server.v1_7_R4.Vec3D;
import net.minecraft.server.v1_8_R3.AxisAlignedBB;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.MovingObjectPosition;
import net.minecraft.server.v1_8_R3.Vec3D;
import org.bukkit.Effect;
import org.bukkit.GameMode;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
@ -121,28 +121,28 @@ public class ProjectileUser
double distanceToEntity = 0.0D;
LivingEntity victim = null;
net.minecraft.server.v1_7_R4.Entity nmsEntity = ((CraftEntity)_thrown).getHandle();
Vec3D vec3d = Vec3D.a(nmsEntity.locX, nmsEntity.locY, nmsEntity.locZ);
Vec3D vec3d1 = Vec3D.a(nmsEntity.locX + nmsEntity.motX, nmsEntity.locY + nmsEntity.motY, nmsEntity.locZ + nmsEntity.motZ);
net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity)_thrown).getHandle();
Vec3D vec3d = new Vec3D(nmsEntity.locX, nmsEntity.locY, nmsEntity.locZ);
Vec3D vec3d1 = new Vec3D(nmsEntity.locX + nmsEntity.motX, nmsEntity.locY + nmsEntity.motY, nmsEntity.locZ + nmsEntity.motZ);
MovingObjectPosition finalObjectPosition = nmsEntity.world.rayTrace(vec3d, vec3d1, false, true, false);
vec3d = Vec3D.a(nmsEntity.locX, nmsEntity.locY, nmsEntity.locZ);
vec3d1 = Vec3D.a(nmsEntity.locX + nmsEntity.motX, nmsEntity.locY + nmsEntity.motY, nmsEntity.locZ + nmsEntity.motZ);
vec3d = new Vec3D(nmsEntity.locX, nmsEntity.locY, nmsEntity.locZ);
vec3d1 = new Vec3D(nmsEntity.locX + nmsEntity.motX, nmsEntity.locY + nmsEntity.motY, nmsEntity.locZ + nmsEntity.motZ);
if (finalObjectPosition != null)
{
vec3d1 = Vec3D.a(finalObjectPosition.pos.a, finalObjectPosition.pos.b, finalObjectPosition.pos.c);
vec3d1 = new Vec3D(finalObjectPosition.pos.a, finalObjectPosition.pos.b, finalObjectPosition.pos.c);
}
for (Object entity : ((CraftWorld)_thrown.getWorld()).getHandle().getEntities(((CraftEntity)_thrown).getHandle(),
((CraftEntity)_thrown).getHandle().boundingBox.a(
((CraftEntity)_thrown).getHandle().motX,
((CraftEntity)_thrown).getHandle().motY,
((CraftEntity)_thrown).getHandle().motZ).grow(_hitboxGrow, _hitboxGrow, _hitboxGrow)))
for (Object entity : ((CraftWorld)_thrown.getWorld()).getHandle().getEntities(((CraftEntity) _thrown).getHandle(),
((CraftEntity) _thrown).getHandle().getBoundingBox().a(
((CraftEntity) _thrown).getHandle().motX,
((CraftEntity) _thrown).getHandle().motY,
((CraftEntity) _thrown).getHandle().motZ).grow(_hitboxGrow, _hitboxGrow, _hitboxGrow)))
{
if (entity instanceof net.minecraft.server.v1_7_R4.Entity)
if (entity instanceof net.minecraft.server.v1_8_R3.Entity)
{
Entity bukkitEntity = ((net.minecraft.server.v1_7_R4.Entity) entity).getBukkitEntity();
Entity bukkitEntity = ((net.minecraft.server.v1_8_R3.Entity) entity).getBukkitEntity();
if (bukkitEntity instanceof LivingEntity)
{
@ -158,7 +158,7 @@ public class ProjectileUser
continue;
//float f1 = (float)(nmsEntity.boundingBox.a() * 0.6f);
AxisAlignedBB axisalignedbb1 = ((CraftEntity)ent).getHandle().boundingBox.grow(1F, 1F, 1F);
AxisAlignedBB axisalignedbb1 = ((CraftEntity)ent).getHandle().getBoundingBox().grow(1F, 1F, 1F);
MovingObjectPosition entityCollisionPosition = axisalignedbb1.a(vec3d, vec3d1);
if (entityCollisionPosition != null)
@ -189,7 +189,7 @@ public class ProjectileUser
{
if (_hitBlock)
{
Block block = _thrown.getWorld().getBlockAt(finalObjectPosition.b, finalObjectPosition.c, finalObjectPosition.d);
Block block = _thrown.getWorld().getBlockAt(finalObjectPosition.a().getX(), finalObjectPosition.a().getY(), finalObjectPosition.a().getZ());
if (!UtilBlock.airFoliage(block) && !block.isLiquid())
{
nmsEntity.motX = ((float) (finalObjectPosition.pos.a - nmsEntity.locX));

View File

@ -25,7 +25,7 @@ import mineplex.core.shop.item.ShopItem;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventoryCustom;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCustom;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -5,11 +5,11 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import net.minecraft.server.v1_8_R2.EntityPlayer;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import org.bukkit.ChatColor;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -5,7 +5,7 @@ import java.util.List;
import org.bukkit.entity.Player;
import mineplex.core.account.CoreClient;
import net.minecraft.server.v1_8_R2.IInventory;
import net.minecraft.server.v1_8_R3.IInventory;
public interface ISalesPackage
{

View File

@ -3,7 +3,7 @@ package mineplex.core.shop.item;
import java.util.ArrayList;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@ -35,7 +35,7 @@ public class ShopItem extends ItemStack
UpdateVisual(true);
}
public net.minecraft.server.v1_8_R2.ItemStack getHandle() {
public net.minecraft.server.v1_8_R3.ItemStack getHandle() {
return CraftItemStack.asNMSCopy(this);
}

View File

@ -1,16 +1,16 @@
package mineplex.core.shop.page;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventory;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventoryDoubleChest;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventoryPlayer;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventoryView;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventory;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryDoubleChest;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryPlayer;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryView;
import net.minecraft.server.v1_8_R2.Container;
import net.minecraft.server.v1_8_R2.EntityHuman;
import net.minecraft.server.v1_8_R2.IInventory;
import net.minecraft.server.v1_8_R2.InventoryLargeChest;
import net.minecraft.server.v1_8_R2.PlayerInventory;
import net.minecraft.server.v1_8_R2.Slot;
import net.minecraft.server.v1_8_R3.Container;
import net.minecraft.server.v1_8_R3.EntityHuman;
import net.minecraft.server.v1_8_R3.IInventory;
import net.minecraft.server.v1_8_R3.InventoryLargeChest;
import net.minecraft.server.v1_8_R3.PlayerInventory;
import net.minecraft.server.v1_8_R3.Slot;
public class AnvilContainer extends Container
{

View File

@ -1,9 +1,9 @@
package mineplex.core.shop.page;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventoryCustom;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCustom;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
@ -89,7 +89,7 @@ public abstract class ShopPageBase<PluginType extends MiniPlugin, ShopType exten
protected void addItemFakeCount(int slot, ItemStack item, int fakeCount)
{
net.minecraft.server.v1_8_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
net.minecraft.server.v1_8_R3.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
nmsStack.count = fakeCount;
if (slot > inventory.getSize() - 1)

View File

@ -5,16 +5,18 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R4.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.util.CraftMagicNumbers;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_7_R4.PacketPlayOutBlockAction;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.PacketPlayOutBlockAction;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
@ -125,7 +127,7 @@ public class Treasure
}
}
Block block = _player.getTargetBlock(null, 3);
Block block = _player.getTargetBlock((Set<Material>) null, 3);
if (block.getType() == _treasureType.getMaterial())
{
ChestData data = getChestData(block);
@ -257,7 +259,7 @@ public class Treasure
if (data.isOpened())
{
Block block = data.getBlock();
PacketPlayOutBlockAction packet = new PacketPlayOutBlockAction(block.getX(), block.getY(), block.getZ(), CraftMagicNumbers.getBlock(block), 1, 1);
PacketPlayOutBlockAction packet = new PacketPlayOutBlockAction(new BlockPosition(block.getX(), block.getY(), block.getZ()), CraftMagicNumbers.getBlock(block), 1, 1);
for (Player player : players)
{

View File

@ -4,15 +4,16 @@ import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R4.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.util.CraftMagicNumbers;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import net.minecraft.server.v1_7_R4.PacketPlayOutBlockAction;
import net.minecraft.server.v1_7_R4.TileEntity;
import net.minecraft.server.v1_7_R4.TileEntityEnderChest;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.PacketPlayOutBlockAction;
import net.minecraft.server.v1_8_R3.TileEntity;
import net.minecraft.server.v1_8_R3.TileEntityEnderChest;
import mineplex.core.common.util.UtilServer;
import mineplex.core.hologram.Hologram;
@ -42,7 +43,7 @@ public class ChestOpenAnimation extends Animation
// Send chest open packet
Block block = chestData.getBlock();
PacketPlayOutBlockAction packet = new PacketPlayOutBlockAction(block.getX(), block.getY(), block.getZ(),
PacketPlayOutBlockAction packet = new PacketPlayOutBlockAction(new BlockPosition(block.getX(), block.getY(), block.getZ()),
CraftMagicNumbers.getBlock(block), 1, 1);
for (Player other : UtilServer.getPlayers())
{
@ -53,7 +54,7 @@ public class ChestOpenAnimation extends Animation
// Fix for Ender Chests closing as soon as they are opened
TileEntity tileEntity = ((CraftWorld) block.getWorld()).getTileEntityAt(block.getX(), block.getY(), block.getZ());
if (tileEntity instanceof TileEntityEnderChest)
((TileEntityEnderChest)tileEntity).j = 1;
((TileEntityEnderChest)tileEntity).g = 1;
}
other.playSound(block.getLocation(), Sound.CHEST_OPEN, 1, 1);

View File

@ -8,10 +8,11 @@ import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.util.Vector;
import net.minecraft.server.v1_7_R4.MathHelper;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.MathHelper;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
@ -135,7 +136,7 @@ public class ChestSpawnAnimation extends Animation
int i = MathHelper.floor(_centerLocation.getX());
int j = MathHelper.floor(_centerLocation.getY() - 0.20000000298023224D - 0.5);
int k = MathHelper.floor(_centerLocation.getZ());
((CraftWorld) _centerLocation.getWorld()).getHandle().triggerEffect(2006, i, j, k, MathHelper.f(60 - 3.0F));
((CraftWorld) _centerLocation.getWorld()).getHandle().triggerEffect(2006, new BlockPosition(i, j, k), MathHelper.f(60 - 3.0F));
}
finish();
}

View File

@ -6,7 +6,7 @@ import mineplex.core.common.util.NautHashMap;
import mineplex.core.recharge.Recharge;
import mineplex.core.timing.TimingManager;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class VisibilityData