Upgraded to latest spigot.

Fixed npcs being so loud.
Npcs are now ghosted automatically.

Added UUID on login.
This commit is contained in:
Jonathan Williams 2014-04-25 00:44:14 -07:00
parent 7fef4adbee
commit 9136fa0b15
175 changed files with 3574 additions and 2776 deletions

View File

@ -128,6 +128,9 @@
</target>
<target name ="ServerMonitor" description="ServerMonitor">
<jar jarfile="../bin/ServerMonitor.jar">
<fileset dir="../Mineplex.Core.Common/bin">
<include name="**/*.class"/>
</fileset>
<fileset dir="../Mineplex.ServerMonitor/bin">
<include name="**/*.class"/>
</fileset>
@ -138,6 +141,14 @@
<attribute name="Main-Class"
value="mineplex.servermonitor.ServerMonitor"/>
</manifest>
<zipfileset src="../Libraries/httpclient-4.2.jar" />
<zipfileset src="../Libraries/httpcore-4.2.jar" />
<zipfileset src="../Libraries/httpclient-cache-4.2.jar" />
<zipfileset src="../Libraries/httpmime-4.2.jar" />
<zipfileset src="../Libraries/gson-2.2.1.jar" />
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
</jar>
<copy file="../bin/ServerMonitor.jar" todir="../../Testing/ServerMonitor/"/>
</target>

View File

@ -13,7 +13,7 @@ import mineplex.core.itemstack.ItemStackFactory;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

View File

@ -4,8 +4,8 @@ import java.util.HashSet;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.CraftChunk;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.CraftChunk;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
public class BlockRegenerateData
{
@ -46,7 +46,7 @@ public class BlockRegenerateData
//if (_loc.getBlock().getType() == Material.CHEST)
// return;
net.minecraft.server.v1_7_R2.Chunk c = ((CraftChunk)_loc.getChunk()).getHandle();
net.minecraft.server.v1_7_R3.Chunk c = ((CraftChunk)_loc.getChunk()).getHandle();
c.a(_loc.getBlockX() & 0xF, _loc.getBlockY(), _loc.getBlockZ() & 0xF, _id, _data);
((CraftWorld)_loc.getChunk().getWorld()).getHandle().notify(_loc.getBlockX(), _loc.getBlockY(), _loc.getBlockZ());

View File

@ -5,7 +5,7 @@ import java.util.HashSet;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.CraftChunk;
import org.bukkit.craftbukkit.v1_7_R3.CraftChunk;
public class BlockRegenerateSet
{
@ -61,7 +61,7 @@ public class BlockRegenerateSet
{
for (Chunk chunk : _chunks)
{
net.minecraft.server.v1_7_R2.Chunk c = ((CraftChunk)chunk).getHandle();
net.minecraft.server.v1_7_R3.Chunk c = ((CraftChunk)chunk).getHandle();
c.initLighting();
}
}

View File

@ -7,7 +7,7 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilServer;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;

View File

@ -11,24 +11,24 @@ import mineplex.core.fakeEntity.FakeEntityManager;
import mineplex.core.fakeEntity.FakePlayer;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.updater.UpdateType;
import net.minecraft.server.v1_7_R2.EntityInsentient;
import net.minecraft.server.v1_7_R2.EntityLiving;
import net.minecraft.server.v1_7_R2.EntityPlayer;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet28EntityVelocity;
import net.minecraft.server.v1_7_R2.Packet31RelEntityMove;
import net.minecraft.server.v1_7_R2.Packet34EntityTeleport;
import net.minecraft.server.v1_7_R2.PathfinderGoalSelector;
import net.minecraft.server.v1_7_R3.EntityInsentient;
import net.minecraft.server.v1_7_R3.EntityLiving;
import net.minecraft.server.v1_7_R3.EntityPlayer;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet28EntityVelocity;
import net.minecraft.server.v1_7_R3.Packet31RelEntityMove;
import net.minecraft.server.v1_7_R3.Packet34EntityTeleport;
import net.minecraft.server.v1_7_R3.PathfinderGoalSelector;
import org.bukkit.Bukkit;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftAgeable;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftAgeable;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Item;

View File

@ -7,8 +7,8 @@ import org.bukkit.util.Vector;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.fakeEntity.FakeEntity;
import net.minecraft.server.v1_7_R2.EntityPlayer;
import net.minecraft.server.v1_7_R2.Packet28EntityVelocity;
import net.minecraft.server.v1_7_R3.EntityPlayer;
import net.minecraft.server.v1_7_R3.Packet28EntityVelocity;
public class UpdateThread extends Thread
{

View File

@ -2,7 +2,7 @@ package me.chiss.Core.Utility;
import java.util.HashMap;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftInventory;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftInventory;
import org.bukkit.inventory.ItemStack;
public class InventoryUtil

Binary file not shown.

View File

@ -20,7 +20,7 @@ public class FileUpdater implements Runnable
private boolean _needUpdate;
private boolean _enabled = true;
private int _timeTilRestart = 10;
private int _timeTilRestart = 5;
public FileUpdater(Plugin plugin)
{

View File

@ -23,6 +23,7 @@ public class PlayerStats implements Listener
@EventHandler
public void playerConnect(final PostLoginEvent event)
{
System.out.println(event.getPlayer().getUniqueId());
_plugin.getProxy().getScheduler().runAsync(_plugin, new Runnable()
{
public void run()

View File

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

View File

@ -10,24 +10,24 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import net.minecraft.server.v1_7_R2.Block;
import net.minecraft.server.v1_7_R2.ChunkCoordIntPair;
import net.minecraft.server.v1_7_R2.ChunkSection;
import net.minecraft.server.v1_7_R2.IContainer;
import net.minecraft.server.v1_7_R2.MinecraftServer;
import net.minecraft.server.v1_7_R2.PacketPlayOutMultiBlockChange;
import net.minecraft.server.v1_7_R2.PlayerChunkMap;
import net.minecraft.server.v1_7_R2.RegionFile;
import net.minecraft.server.v1_7_R3.Block;
import net.minecraft.server.v1_7_R3.ChunkCoordIntPair;
import net.minecraft.server.v1_7_R3.ChunkSection;
import net.minecraft.server.v1_7_R3.IContainer;
import net.minecraft.server.v1_7_R3.MinecraftServer;
import net.minecraft.server.v1_7_R3.PacketPlayOutMultiBlockChange;
import net.minecraft.server.v1_7_R3.PlayerChunkMap;
import net.minecraft.server.v1_7_R3.RegionFile;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_7_R2.CraftChunk;
import org.bukkit.craftbukkit.v1_7_R2.CraftServer;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.CraftChunk;
import org.bukkit.craftbukkit.v1_7_R3.CraftServer;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.world.WorldUnloadEvent;
@ -38,7 +38,7 @@ public class MapUtil
{
public static void ReplaceOreInChunk(Chunk chunk, Material replacee, Material replacer)
{
net.minecraft.server.v1_7_R2.Chunk c = ((CraftChunk)chunk).getHandle();
net.minecraft.server.v1_7_R3.Chunk c = ((CraftChunk)chunk).getHandle();
for(int x = 0; x < 16; x++)
{
@ -84,7 +84,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_7_R2.Chunk c = ((CraftChunk)chunk).getHandle();
net.minecraft.server.v1_7_R3.Chunk c = ((CraftChunk)chunk).getHandle();
c.a(x & 0xF, y, z & 0xF, Block.e(id), data);
((CraftWorld)world).getHandle().notify(x, y, z);
@ -129,9 +129,9 @@ public class MapUtil
return totalHeight / count;
}
public static void ResendChunksForNearbyPlayers(Collection<net.minecraft.server.v1_7_R2.Chunk> chunks)
public static void ResendChunksForNearbyPlayers(Collection<net.minecraft.server.v1_7_R3.Chunk> chunks)
{
for (net.minecraft.server.v1_7_R2.Chunk c : chunks)
for (net.minecraft.server.v1_7_R3.Chunk c : chunks)
{
for (Player player : Bukkit.getOnlinePlayers())
@ -148,14 +148,14 @@ public class MapUtil
}
}
public static net.minecraft.server.v1_7_R2.Chunk ChunkBlockChange(Location location, int id, byte data)
public static net.minecraft.server.v1_7_R3.Chunk ChunkBlockChange(Location location, int id, byte data)
{
return ChunkBlockChange(location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ(), id, data);
}
public static net.minecraft.server.v1_7_R2.Chunk ChunkBlockChange(World world, int x, int y, int z, int id, byte data)
public static net.minecraft.server.v1_7_R3.Chunk ChunkBlockChange(World world, int x, int y, int z, int id, byte data)
{
net.minecraft.server.v1_7_R2.Chunk c = ((CraftChunk)world.getChunkAt(x >> 4, z >> 4)).getHandle();
net.minecraft.server.v1_7_R3.Chunk c = ((CraftChunk)world.getChunkAt(x >> 4, z >> 4)).getHandle();
Block block = Block.e(id);
x = x & 0xF;
@ -184,7 +184,7 @@ public class MapUtil
return c;
}
public static void SendChunkForPlayer(net.minecraft.server.v1_7_R2.Chunk chunk, Player player)
public static void SendChunkForPlayer(net.minecraft.server.v1_7_R3.Chunk chunk, Player player)
{
SendChunkForPlayer(chunk.locX, chunk.locZ, player);
}
@ -217,11 +217,11 @@ public class MapUtil
Bukkit.getPluginManager().callEvent(new WorldUnloadEvent(((CraftWorld)world).getHandle().getWorld()));
Iterator<net.minecraft.server.v1_7_R2.Chunk> chunkIterator = ((CraftWorld)world).getHandle().chunkProviderServer.chunks.values().iterator();
Iterator<net.minecraft.server.v1_7_R3.Chunk> chunkIterator = ((CraftWorld)world).getHandle().chunkProviderServer.chunks.values().iterator();
while (chunkIterator.hasNext())
{
net.minecraft.server.v1_7_R2.Chunk chunk = chunkIterator.next();
net.minecraft.server.v1_7_R3.Chunk chunk = chunkIterator.next();
chunk.removeEntities();
}
@ -275,10 +275,10 @@ public class MapUtil
try
{
Field a = net.minecraft.server.v1_7_R2.RegionFileCache.class.getDeclaredField("a");
Field a = net.minecraft.server.v1_7_R3.RegionFileCache.class.getDeclaredField("a");
a.setAccessible(true);
regionfiles = (HashMap) a.get(null);
rafField = net.minecraft.server.v1_7_R2.RegionFile.class.getDeclaredField("c");
rafField = net.minecraft.server.v1_7_R3.RegionFile.class.getDeclaredField("c");
rafField.setAccessible(true);
}
catch (Throwable t)

View File

@ -3,18 +3,18 @@ package mineplex.core.common.util;
import java.lang.reflect.Field;
import java.util.HashMap;
import net.minecraft.server.v1_7_R2.DataWatcher;
import net.minecraft.server.v1_7_R2.EntityPlayer;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayInClientCommand;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R3.DataWatcher;
import net.minecraft.server.v1_7_R3.EntityPlayer;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayInClientCommand;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntityLiving;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

View File

@ -4,33 +4,32 @@ import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.LinkedList;
import net.minecraft.server.v1_7_R2.EntityBat;
import net.minecraft.server.v1_7_R2.EntityCreature;
import net.minecraft.server.v1_7_R2.EntityEnderDragon;
import net.minecraft.server.v1_7_R2.EntityHuman;
import net.minecraft.server.v1_7_R2.EntityInsentient;
import net.minecraft.server.v1_7_R2.EntityLiving;
import net.minecraft.server.v1_7_R2.Navigation;
import net.minecraft.server.v1_7_R2.PathfinderGoalLookAtPlayer;
import net.minecraft.server.v1_7_R2.PathfinderGoalMoveTowardsRestriction;
import net.minecraft.server.v1_7_R2.PathfinderGoalRandomLookaround;
import net.minecraft.server.v1_7_R2.PathfinderGoalSelector;
import net.minecraft.server.v1_7_R3.EntityBat;
import net.minecraft.server.v1_7_R3.EntityCreature;
import net.minecraft.server.v1_7_R3.EntityEnderDragon;
import net.minecraft.server.v1_7_R3.EntityHuman;
import net.minecraft.server.v1_7_R3.EntityInsentient;
import net.minecraft.server.v1_7_R3.Navigation;
import net.minecraft.server.v1_7_R3.PathfinderGoalLookAtPlayer;
import net.minecraft.server.v1_7_R3.PathfinderGoalMoveTowardsRestriction;
import net.minecraft.server.v1_7_R3.PathfinderGoalRandomLookaround;
import net.minecraft.server.v1_7_R3.PathfinderGoalSelector;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_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_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
public class UtilEnt
{

View File

@ -3,10 +3,10 @@ package mineplex.core.common.util;
import java.lang.reflect.Field;
import mineplex.core.common.util.UtilParticle.ParticleType;
import net.minecraft.server.v1_7_R2.PacketPlayOutWorldParticles;
import net.minecraft.server.v1_7_R3.PacketPlayOutWorldParticles;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class UtilParticle

View File

@ -9,7 +9,7 @@ import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

View File

@ -5,7 +5,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import net.minecraft.server.v1_7_R2.Chunk;
import net.minecraft.server.v1_7_R3.Chunk;
import org.bukkit.Location;
import org.bukkit.World;

View File

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

View File

@ -4,6 +4,7 @@ import java.sql.*;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.UUID;
import mineplex.core.account.event.AsyncClientLoadEvent;
import mineplex.core.account.event.ClientUnloadEvent;
@ -124,7 +125,7 @@ public class CoreClientManager implements Listener
{
try
{
LoadClient(Add(event.getName()), event.getAddress().getHostAddress());
LoadClient(Add(event.getName()), event.getUniqueId(), event.getAddress().getHostAddress());
}
catch(Exception exception)
{
@ -154,14 +155,14 @@ public class CoreClientManager implements Listener
}
}
private void LoadClient(CoreClient client, String ipAddress)
private void LoadClient(CoreClient client, UUID uuid, String ipAddress)
{
// Prep for mysql
ClientToken token = null;
Gson gson = new Gson();
String response = _repository.GetClient(client.GetPlayerName(), ipAddress);
String response = _repository.GetClient(client.GetPlayerName(), uuid, ipAddress);
token = gson.fromJson(response, ClientToken.class);
client.SetAccountId(token.AccountId);

View File

@ -1,5 +1,7 @@
package mineplex.core.account.repository;
import java.util.UUID;
import mineplex.core.account.repository.token.LoginToken;
import mineplex.core.account.repository.token.RankUpdateToken;
import mineplex.core.common.Rank;
@ -16,10 +18,11 @@ public class AccountRepository
_webAddress = webAddress;
}
public String GetClient(String name, String ipAddress)
public String GetClient(String name, UUID uuid, String ipAddress)
{
LoginToken token = new LoginToken();
token.Name = name;
token.Uuid = uuid.toString();
token.IpAddress = ipAddress;
return new JsonWebCall(_webAddress + "PlayerAccount/Login").ExecuteReturnStream(token);

View File

@ -5,4 +5,5 @@ public class LoginToken
public String Name;
public String IpAddress = "0.0.0.0";
public String MacAddress = "00-00-00-00-00-00-00-00";
public String Uuid;
}

View File

@ -8,7 +8,7 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.entity.Item;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -4,7 +4,7 @@ import java.util.HashMap;
import java.util.HashSet;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;

View File

@ -5,26 +5,26 @@ import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import net.minecraft.server.v1_7_R2.ChunkAddEntityEvent;
import net.minecraft.server.v1_7_R2.EntityPlayer;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutAnimation;
import net.minecraft.server.v1_7_R2.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R2.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_7_R2.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R2.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_7_R2.PacketPlayOutNamedSoundEffect;
import net.minecraft.server.v1_7_R3.ChunkAddEntityEvent;
import net.minecraft.server.v1_7_R3.EntityPlayer;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutAnimation;
import net.minecraft.server.v1_7_R3.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R3.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_7_R3.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R3.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_7_R3.PacketPlayOutNamedSoundEffect;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;

View File

@ -1,13 +1,13 @@
package mineplex.core.disguise.disguises;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import net.minecraft.server.v1_7_R2.DataWatcher;
import net.minecraft.server.v1_7_R2.Entity;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R3.DataWatcher;
import net.minecraft.server.v1_7_R3.Entity;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityMetadata;
public abstract class DisguiseBase
{

View File

@ -2,9 +2,9 @@ package mineplex.core.disguise.disguises;
import java.util.Random;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntity;
public class DisguiseBlock extends DisguiseBase
{

View File

@ -1,9 +1,9 @@
package mineplex.core.disguise.disguises;
import net.minecraft.server.v1_7_R2.EnumEntitySize;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R3.EnumEntitySize;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntityLiving;
public abstract class DisguiseCreature extends DisguiseInsentient
{

View File

@ -2,9 +2,9 @@ package mineplex.core.disguise.disguises;
import java.util.Arrays;
import net.minecraft.server.v1_7_R2.MobEffect;
import net.minecraft.server.v1_7_R2.MobEffectList;
import net.minecraft.server.v1_7_R2.PotionBrewer;
import net.minecraft.server.v1_7_R3.MobEffect;
import net.minecraft.server.v1_7_R3.MobEffectList;
import net.minecraft.server.v1_7_R3.PotionBrewer;
public class DisguiseEnderman extends DisguiseMonster
{

View File

@ -3,8 +3,8 @@ package mineplex.core.disguise.disguises;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityEquipment;
public abstract class DisguiseInsentient extends DisguiseLiving
{
@ -56,11 +56,11 @@ public abstract class DisguiseInsentient extends DisguiseLiving
public List<Packet> getArmorPackets()
{
List<PacketPlayOutEntityEquipment> p5 = new ArrayList<PacketPlayOutEntityEquipment>();
net.minecraft.server.v1_7_R2.ItemStack[] armorContents = Entity.getEquipment();
net.minecraft.server.v1_7_R3.ItemStack[] armorContents = Entity.getEquipment();
for (short i=0; i < armorContents.length; i++)
{
net.minecraft.server.v1_7_R2.ItemStack armorSlot = armorContents[i];
net.minecraft.server.v1_7_R3.ItemStack armorSlot = armorContents[i];
if (armorSlot != null)
{

View File

@ -1,9 +1,9 @@
package mineplex.core.disguise.disguises;
import net.minecraft.server.v1_7_R2.EnumEntitySize;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R3.EnumEntitySize;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntityLiving;
public class DisguiseMagmaCube extends DisguiseInsentient
{

View File

@ -1,8 +1,10 @@
package mineplex.core.disguise.disguises;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutNamedEntitySpawn;
import java.util.UUID;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutNamedEntitySpawn;
import net.minecraft.util.com.mojang.authlib.GameProfile;
public class DisguisePlayer extends DisguiseHuman
@ -26,7 +28,7 @@ public class DisguisePlayer extends DisguiseHuman
{
PacketPlayOutNamedEntitySpawn packet = new PacketPlayOutNamedEntitySpawn();
packet.a = Entity.getId();
packet.b = new GameProfile("1", _name);
packet.b = new GameProfile(UUID.randomUUID(), _name);
packet.c = MathHelper.floor(Entity.locX * 32.0D);
packet.d = MathHelper.floor(Entity.locY * 32.0D);
packet.e = MathHelper.floor(Entity.locZ * 32.0D);

View File

@ -1,9 +1,9 @@
package mineplex.core.disguise.disguises;
import net.minecraft.server.v1_7_R2.EnumEntitySize;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R3.EnumEntitySize;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntityLiving;
public class DisguiseSlime extends DisguiseInsentient
{

View File

@ -1,6 +1,6 @@
package mineplex.core.disguise.disguises;
import net.minecraft.server.v1_7_R2.BlockCloth;
import net.minecraft.server.v1_7_R3.BlockCloth;
public class DisguiseWolf extends DisguiseTameableAnimal
{

View File

@ -1,8 +1,8 @@
package mineplex.core.disguise.disguises;
import net.minecraft.server.v1_7_R2.Entity;
import net.minecraft.server.v1_7_R2.NBTTagCompound;
import net.minecraft.server.v1_7_R2.World;
import net.minecraft.server.v1_7_R3.Entity;
import net.minecraft.server.v1_7_R3.NBTTagCompound;
import net.minecraft.server.v1_7_R3.World;
public class DummyEntity extends Entity
{

View File

@ -2,22 +2,22 @@ package mineplex.core.fakeEntity;
import java.lang.reflect.Field;
import net.minecraft.server.v1_7_R2.BlockCloth;
import net.minecraft.server.v1_7_R2.DataWatcher;
import net.minecraft.server.v1_7_R2.Entity;
import net.minecraft.server.v1_7_R2.EntityLiving;
import net.minecraft.server.v1_7_R2.EntitySlime;
import net.minecraft.server.v1_7_R2.EnumEntitySize;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R2.PacketPlayOutAttachEntity;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R3.BlockCloth;
import net.minecraft.server.v1_7_R3.DataWatcher;
import net.minecraft.server.v1_7_R3.Entity;
import net.minecraft.server.v1_7_R3.EntityLiving;
import net.minecraft.server.v1_7_R3.EntitySlime;
import net.minecraft.server.v1_7_R3.EnumEntitySize;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R3.PacketPlayOutAttachEntity;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityMetadata;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.entity.EntityType;
public class FakeEntity

View File

@ -3,9 +3,9 @@ package mineplex.core.fakeEntity;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R3.Packet;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

View File

@ -1,9 +1,9 @@
package mineplex.core.fakeEntity;
import net.minecraft.server.v1_7_R2.EnumEntitySize;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R3.EnumEntitySize;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntity;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;

View File

@ -1,13 +1,13 @@
package mineplex.core.fakeEntity;
import net.minecraft.server.v1_7_R2.DataWatcher;
import net.minecraft.server.v1_7_R2.ItemStack;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R3.DataWatcher;
import net.minecraft.server.v1_7_R3.ItemStack;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutSpawnEntity;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.entity.EntityType;
public class FakeItemDrop extends FakeEntity
@ -75,7 +75,7 @@ public class FakeItemDrop extends FakeEntity
dataWatcher.a(1, Short.valueOf((short)300));
dataWatcher.a(8, Integer.valueOf(0));
dataWatcher.a(9, Byte.valueOf((byte) 0));
dataWatcher.a(10, new net.minecraft.server.v1_7_R2.ItemStack(_itemStack.getItem(), _itemStack.count));
dataWatcher.a(10, new net.minecraft.server.v1_7_R3.ItemStack(_itemStack.getItem(), _itemStack.count));
}
public void SetItemStack(org.bukkit.inventory.ItemStack itemStack)

View File

@ -1,17 +1,18 @@
package mineplex.core.fakeEntity;
import java.lang.reflect.Field;
import java.util.UUID;
import net.minecraft.server.v1_7_R2.DataWatcher;
import net.minecraft.server.v1_7_R2.EntitySlime;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_7_R3.DataWatcher;
import net.minecraft.server.v1_7_R3.EntitySlime;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutNamedEntitySpawn;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.entity.EntityType;
public class FakePlayer extends FakeEntity
@ -31,7 +32,7 @@ public class FakePlayer extends FakeEntity
{
PacketPlayOutNamedEntitySpawn packet = new PacketPlayOutNamedEntitySpawn();
packet.a = id;
packet.b = new GameProfile("1", _name);
packet.b = new GameProfile(UUID.randomUUID(), _name);
packet.c = MathHelper.floor(GetLocation().getX() * 32.0D);
packet.d = MathHelper.floor(GetLocation().getY() * 32.0D);
packet.e = MathHelper.floor(GetLocation().getZ() * 32.0D);

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_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;

View File

@ -2,12 +2,12 @@ package mineplex.core.memory;
import java.util.Iterator;
import net.minecraft.server.v1_7_R2.IInventory;
import net.minecraft.server.v1_7_R3.IInventory;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.HumanEntity;
import org.bukkit.plugin.java.JavaPlugin;

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_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.plugin.java.JavaPlugin;

View File

@ -1,9 +1,9 @@
package mineplex.core.npc;
import net.minecraft.server.v1_7_R2.EntityCreature;
import net.minecraft.server.v1_7_R3.EntityCreature;
import org.bukkit.entity.Entity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftCreature;
import org.bukkit.Location;
public class NpcEntry

View File

@ -11,15 +11,15 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.UUID;
import net.minecraft.server.v1_7_R2.EntityAgeable;
import net.minecraft.server.v1_7_R2.EntityInsentient;
import net.minecraft.server.v1_7_R3.EntityAgeable;
import net.minecraft.server.v1_7_R3.EntityInsentient;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World.Environment;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftAgeable;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftAgeable;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
@ -161,6 +161,8 @@ public class NpcManager extends MiniPlugin
{
_npcs.get(entity.getUniqueId().toString()).Name = ((LivingEntity)entity).getCustomName();
_npcs.get(entity.getUniqueId().toString()).Entity = entity;
UtilEnt.silence(entity, true);
UtilEnt.ghost(entity, true, false);
if (_npcs.get(entity.getUniqueId().toString()).Radius == 0)
{
@ -266,6 +268,7 @@ public class NpcManager extends MiniPlugin
if (entry.Radius == 0)
{
UtilEnt.Vegetate(entry.Entity);
UtilEnt.silence(entry.Entity, true);
}
if (save)
@ -323,6 +326,7 @@ public class NpcManager extends MiniPlugin
npc.Entity.setTicksLived(1);
((EntityInsentient)((CraftLivingEntity)npc.Entity).getHandle()).persistent = true;
UtilEnt.silence(npc.Entity, true);
if (!IsNpcChunkLoaded(npc.Entity) || !(npc.Entity instanceof CraftCreature))
{
@ -333,6 +337,9 @@ public class NpcManager extends MiniPlugin
{
String uuid = npc.Entity.getUniqueId().toString();
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[0].setDurability((short)0);
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[1].setDurability((short)0);
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[2].setDurability((short)0);
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[3].setDurability((short)0);
if (!_failedAttempts.containsKey(uuid))

View File

@ -2,7 +2,7 @@ package mineplex.core.packethandler;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R3.Packet;
public interface IPacketRunnable
{

View File

@ -5,9 +5,9 @@ import java.util.HashSet;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.NautHashMap;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R3.Packet;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -1,14 +1,14 @@
package mineplex.core.packethandler;
import net.minecraft.server.v1_7_R2.IPacketVerifier;
import net.minecraft.server.v1_7_R2.Packet;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R2.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_7_R2.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_7_R2.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_7_R3.IPacketVerifier;
import net.minecraft.server.v1_7_R3.Packet;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R3.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_7_R3.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_7_R3.PacketPlayOutEntityTeleport;
import net.minecraft.util.io.netty.util.concurrent.GenericFutureListener;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class PacketVerifier implements IPacketVerifier

View File

@ -16,13 +16,13 @@ import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilInv;
import mineplex.core.donation.DonationManager;
import mineplex.core.itemstack.ItemStackFactory;
import net.minecraft.server.v1_7_R2.EntityCreature;
import net.minecraft.server.v1_7_R2.EntityHuman;
import net.minecraft.server.v1_7_R2.EntityInsentient;
import net.minecraft.server.v1_7_R2.Navigation;
import net.minecraft.server.v1_7_R2.PathfinderGoalLookAtPlayer;
import net.minecraft.server.v1_7_R2.PathfinderGoalRandomLookaround;
import net.minecraft.server.v1_7_R2.PathfinderGoalSelector;
import net.minecraft.server.v1_7_R3.EntityCreature;
import net.minecraft.server.v1_7_R3.EntityHuman;
import net.minecraft.server.v1_7_R3.EntityInsentient;
import net.minecraft.server.v1_7_R3.Navigation;
import net.minecraft.server.v1_7_R3.PathfinderGoalLookAtPlayer;
import net.minecraft.server.v1_7_R3.PathfinderGoalRandomLookaround;
import net.minecraft.server.v1_7_R3.PathfinderGoalSelector;
@ -33,8 +33,8 @@ import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftCreature;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Creature;
import org.bukkit.entity.EntityType;

View File

@ -4,15 +4,15 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.minecraft.server.v1_7_R2.Block;
import net.minecraft.server.v1_7_R2.EntityPlayer;
import net.minecraft.server.v1_7_R2.Item;
import net.minecraft.server.v1_7_R2.Items;
import net.minecraft.server.v1_7_R2.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_7_R2.PacketPlayOutSetSlot;
import net.minecraft.server.v1_7_R3.Block;
import net.minecraft.server.v1_7_R3.EntityPlayer;
import net.minecraft.server.v1_7_R3.Item;
import net.minecraft.server.v1_7_R3.Items;
import net.minecraft.server.v1_7_R3.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_7_R3.PacketPlayOutSetSlot;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Player;
@ -116,7 +116,7 @@ public class PetPage extends ShopPageBase<PetManager, PetShop>
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_7_R2.ItemStack(Items.NAME_TAG)));
entityPlayer.playerConnection.sendPacket(new PacketPlayOutSetSlot(containerCounter, 0, new net.minecraft.server.v1_7_R3.ItemStack(Items.NAME_TAG)));
Shop.SetCurrentPageForPlayer(Player, petTagPage);
}

View File

@ -14,9 +14,9 @@ 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_7_R2.Item;
import net.minecraft.server.v1_7_R2.ItemStack;
import net.minecraft.server.v1_7_R2.Items;
import net.minecraft.server.v1_7_R3.Item;
import net.minecraft.server.v1_7_R3.ItemStack;
import net.minecraft.server.v1_7_R3.Items;
import org.bukkit.ChatColor;
import org.bukkit.Material;

View File

@ -7,19 +7,19 @@ import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.disguise.DisguiseManager;
import mineplex.core.disguise.disguises.DisguiseSquid;
import net.minecraft.server.v1_7_R2.AxisAlignedBB;
import net.minecraft.server.v1_7_R2.MathHelper;
import net.minecraft.server.v1_7_R2.MovingObjectPosition;
import net.minecraft.server.v1_7_R2.Vec3D;
import net.minecraft.server.v1_7_R3.AxisAlignedBB;
import net.minecraft.server.v1_7_R3.MathHelper;
import net.minecraft.server.v1_7_R3.MovingObjectPosition;
import net.minecraft.server.v1_7_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_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
@ -106,7 +106,7 @@ public class ProjectileUser
double distanceToEntity = 0.0D;
LivingEntity victim = null;
net.minecraft.server.v1_7_R2.Entity nmsEntity = ((CraftEntity)_thrown).getHandle();
net.minecraft.server.v1_7_R3.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);
@ -121,9 +121,9 @@ public class ProjectileUser
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(1.0D, 1.0D, 1.0D)))
{
if (entity instanceof net.minecraft.server.v1_7_R2.Entity)
if (entity instanceof net.minecraft.server.v1_7_R3.Entity)
{
Entity bukkitEntity = ((net.minecraft.server.v1_7_R2.Entity) entity).getBukkitEntity();
Entity bukkitEntity = ((net.minecraft.server.v1_7_R3.Entity) entity).getBukkitEntity();
if (bukkitEntity instanceof LivingEntity)
{

View File

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

View File

@ -90,7 +90,6 @@ public abstract class ShopBase<PluginType extends MiniPlugin> implements Listene
{
if (!OpenedShop.contains(player.getName()) && entity.isCustomNameVisible() && entity.getCustomName() != null && ChatColor.stripColor(entity.getCustomName()).equalsIgnoreCase(ChatColor.stripColor(Name)))
{
if (!CanOpenShop(player))
return false;

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_7_R2.IInventory;
import net.minecraft.server.v1_7_R3.IInventory;
public interface ISalesPackage
{

View File

@ -5,10 +5,10 @@ import java.util.List;
import mineplex.core.account.CoreClient;
import mineplex.core.common.util.InventoryUtil;
import net.minecraft.server.v1_7_R2.IInventory;
import net.minecraft.server.v1_7_R3.IInventory;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftInventory;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftInventory;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

View File

@ -1,11 +1,11 @@
package mineplex.core.shop.item;
import net.minecraft.server.v1_7_R2.NBTTagList;
import net.minecraft.server.v1_7_R2.NBTTagString;
import net.minecraft.server.v1_7_R3.NBTTagList;
import net.minecraft.server.v1_7_R3.NBTTagString;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.inventory.ItemStack;
public class ShopItem extends CraftItemStack
@ -100,8 +100,8 @@ public class ShopItem extends CraftItemStack
return false;
}
net.minecraft.server.v1_7_R2.ItemStack original = ((CraftItemStack)this).getHandle();
net.minecraft.server.v1_7_R2.ItemStack comparison = ((CraftItemStack)obj).getHandle();
net.minecraft.server.v1_7_R3.ItemStack original = ((CraftItemStack)this).getHandle();
net.minecraft.server.v1_7_R3.ItemStack comparison = ((CraftItemStack)obj).getHandle();
return original.tag == null || original.tag.equals(comparison.tag);
}

View File

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

View File

@ -1,8 +1,8 @@
package mineplex.core.shop.page;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftInventoryCustom;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftInventoryCustom;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;

View File

@ -34,6 +34,7 @@ import mineplex.hub.server.ServerManager;
import mineplex.minecraft.game.classcombat.Class.ClassManager;
import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
import mineplex.minecraft.game.classcombat.item.ItemFactory;
import mineplex.minecraft.game.classcombat.shop.ClassCombatShop;
import mineplex.minecraft.game.classcombat.shop.ClassShopManager;
import mineplex.minecraft.game.core.IRelation;
@ -97,12 +98,18 @@ public class Hub extends JavaPlugin implements INautilusPlugin, IRelation
DamageManager damage = new DamageManager(this, combatManager, npcManager, new DisguiseManager(this, packetHandler));
Fire fire = new Fire(this, conditionManager, damage);
Teleport teleport = new Teleport(this, clientManager, new Spawn(this));
Energy energy = new Energy(this);
SkillFactory skillManager = new SkillFactory(this, damage, this, combatManager, conditionManager, throwManager, blockRestore, fire, new Movement(this), teleport, new Energy(this), GetWebServerAddress());
SkillFactory skillManager = new SkillFactory(this, damage, this, combatManager, conditionManager, throwManager, blockRestore, fire, new Movement(this), teleport, energy, GetWebServerAddress());
ClassManager classManager = new ClassManager(this, clientManager, donationManager, skillManager, GetWebServerAddress());
ItemFactory itemFactory = new ItemFactory(this, blockRestore, classManager, conditionManager, damage, energy, fire, throwManager, GetWebServerAddress());
ClassShopManager shopManager = new ClassShopManager(this, classManager, skillManager, null);
new ClassCombatShop(shopManager, clientManager, donationManager, "Class Shop");
ClassShopManager shopManager = new ClassShopManager(this, classManager, skillManager, itemFactory);
new ClassCombatShop(shopManager, clientManager, donationManager, "Brute", classManager.GetClass("Brute"));
new ClassCombatShop(shopManager, clientManager, donationManager, "Mage", classManager.GetClass("Mage"));
new ClassCombatShop(shopManager, clientManager, donationManager, "Ranger", classManager.GetClass("Ranger"));
new ClassCombatShop(shopManager, clientManager, donationManager, "Knight", classManager.GetClass("Knight"));
new ClassCombatShop(shopManager, clientManager, donationManager, "Assassin", classManager.GetClass("Assassin"));
//Updates
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);

View File

@ -8,7 +8,7 @@ import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.entity.Egg;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
@ -21,7 +21,6 @@ import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
@ -44,7 +43,6 @@ import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
@ -435,7 +433,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
event.getPlayer().eject();
for (Player player : UtilServer.getPlayers())
player.getScoreboard().resetScores(event.getPlayer());
player.getScoreboard().resetScores(event.getPlayer().getName());
_scoreboards.remove(event.getPlayer());
@ -594,62 +592,62 @@ public class HubManager extends MiniClientPlugin<HubClient>
int line = 15;
obj.getScore(Bukkit.getOfflinePlayer(C.cGreen + C.Bold + "Gems")).setScore(line--);
obj.getScore(C.cGreen + C.Bold + "Gems").setScore(line--);
// Remove Old
player.getScoreboard().resetScores(Bukkit.getOfflinePlayer(Get(player.getName()).GetLastGemCount() + ""));
player.getScoreboard().resetScores(Get(player.getName()).GetLastGemCount() + "");
// Add New
obj.getScore(Bukkit.getOfflinePlayer(GetDonation().Get(player.getName()).GetGems() + "")).setScore(line--);
obj.getScore(GetDonation().Get(player.getName()).GetGems() + "").setScore(line--);
Get(player.getName()).SetLastGemCount(GetDonation().Get(player.getName()).GetGems());
//Space
obj.getScore(Bukkit.getOfflinePlayer(" ")).setScore(line--);
obj.getScore(" ").setScore(line--);
/*
//News
obj.getScore(Bukkit.getOfflinePlayer(C.cGray + C.Bold + "Latest News")).setScore(line--);
player.getScoreboard().resetScores(Bukkit.getOfflinePlayer(Get(player).GetNewsText(false)));
obj.getScore(Bukkit.getOfflinePlayer(Get(player).GetNewsText(true))).setScore(line--);
obj.getScore(C.cGray + C.Bold + "Latest News")).setScore(line--);
player.getScoreboard().resetScores(Get(player).GetNewsText(false)));
obj.getScore(Get(player).GetNewsText(true))).setScore(line--);
*/
//Stacker
obj.getScore(Bukkit.getOfflinePlayer(C.cGray + C.Bold + "Stacker")).setScore(line--);
player.getScoreboard().resetScores(Bukkit.getOfflinePlayer(Get(player).BestPig));
obj.getScore(C.cGray + C.Bold + "Stacker").setScore(line--);
player.getScoreboard().resetScores(Get(player).BestPig);
Get(player).BestPig = _pigStacker;
obj.getScore(Bukkit.getOfflinePlayer(Get(player).BestPig)).setScore(line--);
obj.getScore(Get(player).BestPig).setScore(line--);
//Space
obj.getScore(Bukkit.getOfflinePlayer(" ")).setScore(line--);
obj.getScore(" ").setScore(line--);
//Display Rank
if (GetClients().Get(player).GetRank().Has(Rank.HERO))
{
obj.getScore(Bukkit.getOfflinePlayer(C.cPurple + C.Bold + "Hero Rank")).setScore(line--);
obj.getScore(C.cPurple + C.Bold + "Hero Rank").setScore(line--);
player.getScoreboard().resetScores(Bukkit.getOfflinePlayer(Get(player).GetUltraText(false)));
obj.getScore(Bukkit.getOfflinePlayer(Get(player).GetUltraText(true))).setScore(line--);
player.getScoreboard().resetScores(Get(player).GetUltraText(false));
obj.getScore(Get(player).GetUltraText(true)).setScore(line--);
}
else if (GetClients().Get(player).GetRank().Has(Rank.ULTRA))
{
obj.getScore(Bukkit.getOfflinePlayer(C.cAqua + C.Bold + "Ultra Rank")).setScore(line--);
obj.getScore(C.cAqua + C.Bold + "Ultra Rank").setScore(line--);
player.getScoreboard().resetScores(Bukkit.getOfflinePlayer(Get(player).GetUltraText(false)));
obj.getScore(Bukkit.getOfflinePlayer(Get(player).GetUltraText(true))).setScore(line--);
player.getScoreboard().resetScores(Get(player).GetUltraText(false));
obj.getScore(Get(player).GetUltraText(true)).setScore(line--);
}
else
{
obj.getScore(Bukkit.getOfflinePlayer(C.cRed + C.Bold + "No Rank")).setScore(line--);
obj.getScore(C.cRed + C.Bold + "No Rank").setScore(line--);
player.getScoreboard().resetScores(Bukkit.getOfflinePlayer(Get(player).GetPurchaseText(false)));
obj.getScore(Bukkit.getOfflinePlayer(Get(player).GetPurchaseText(true))).setScore(line--);
player.getScoreboard().resetScores(Get(player).GetPurchaseText(false));
obj.getScore(Get(player).GetPurchaseText(true)).setScore(line--);
}
//Space
obj.getScore(Bukkit.getOfflinePlayer(" ")).setScore(line--);
obj.getScore(" ").setScore(line--);
//Display Staff
obj.getScore(Bukkit.getOfflinePlayer(C.cGold + C.Bold + "Online Staff")).setScore(line--);
obj.getScore(C.cGold + C.Bold + "Online Staff").setScore(line--);
String staff = "";
for (Player other : UtilServer.getPlayers())
{
@ -663,17 +661,17 @@ public class HubManager extends MiniClientPlugin<HubClient>
if (staff.length() == 0)
staff = "None";
player.getScoreboard().resetScores(Bukkit.getOfflinePlayer(Get(player).GetStaffText(false)));
player.getScoreboard().resetScores(Get(player).GetStaffText(false));
Get(player).StaffString = staff;
obj.getScore(Bukkit.getOfflinePlayer(Get(player).GetStaffText(true))).setScore(line--);
obj.getScore(Get(player).GetStaffText(true)).setScore(line--);
//Space
obj.getScore(Bukkit.getOfflinePlayer(" ")).setScore(line--);
obj.getScore(" ").setScore(line--);
//Website
obj.getScore(Bukkit.getOfflinePlayer(C.cYellow + C.Bold + "Website")).setScore(line--);
obj.getScore(Bukkit.getOfflinePlayer("www.mineplex.com")).setScore(line--);
obj.getScore(Bukkit.getOfflinePlayer("----------------")).setScore(line--);
obj.getScore(C.cYellow + C.Bold + "Website").setScore(line--);
obj.getScore("www.mineplex.com").setScore(line--);
obj.getScore("----------------").setScore(line--);
}
}

View File

@ -6,7 +6,7 @@ import java.util.HashSet;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -5,7 +5,7 @@ import mineplex.core.common.util.UtilEnt;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEnderDragon;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

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_7_R2.EntityCreature;
import net.minecraft.server.v1_7_R2.Navigation;
import net.minecraft.server.v1_7_R3.EntityCreature;
import net.minecraft.server.v1_7_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftCreature;
import org.bukkit.entity.Horse.Variant;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Player;

View File

@ -13,7 +13,7 @@ import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -55,7 +55,7 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
try
{
_itemMaxDurability = net.minecraft.server.v1_7_R2.Item.class.getDeclaredField("durability");
_itemMaxDurability = net.minecraft.server.v1_7_R3.Item.class.getDeclaredField("durability");
_itemMaxDurability.setAccessible(true);
}
catch (SecurityException e)
@ -191,7 +191,7 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
try
{
_itemMaxDurability.setInt(net.minecraft.server.v1_7_R2.Item.d(newItem.GetType().getId()), 56);
_itemMaxDurability.setInt(net.minecraft.server.v1_7_R3.Item.d(newItem.GetType().getId()), 56);
}
catch (IllegalArgumentException e)
{

View File

@ -3,7 +3,7 @@ package mineplex.minecraft.game.classcombat.item;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -7,7 +7,7 @@ import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;

View File

@ -7,7 +7,7 @@ import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;

View File

@ -4,7 +4,7 @@ import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerInteractEvent;

View File

@ -1,23 +1,55 @@
package mineplex.minecraft.game.classcombat.shop;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftInventory;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack;
import mineplex.core.account.CoreClientManager;
import mineplex.core.donation.DonationManager;
import mineplex.core.shop.ShopBase;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.core.common.CurrencyType;
import mineplex.core.common.util.NautHashMap;
import mineplex.minecraft.game.classcombat.Class.ClientClass;
import mineplex.minecraft.game.classcombat.Class.IPvpClass;
import mineplex.minecraft.game.classcombat.Class.PvpClass;
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
public class ClassCombatShop extends ShopBase<ClassShopManager>
{
private NautHashMap<String, ItemStack[]> _playerInventoryMap = new NautHashMap<String, ItemStack[]>();
private NautHashMap<String, ItemStack[]> _playerArmorMap = new NautHashMap<String, ItemStack[]>();
private IPvpClass _gameClass;
private boolean _takeAwayStuff;
public ClassCombatShop(ClassShopManager plugin, CoreClientManager clientManager, DonationManager donationManager, String name)
{
super(plugin, clientManager, donationManager, name, CurrencyType.Gems);
}
public ClassCombatShop(ClassShopManager plugin, CoreClientManager clientManager, DonationManager donationManager, String name, IPvpClass iPvpClass)
{
super(plugin, clientManager, donationManager, name, CurrencyType.Gems);
_gameClass = iPvpClass;
_takeAwayStuff = true;
}
protected void OpenShopForPlayer(Player player)
{
if (_gameClass != null)
Plugin.GetClassManager().Get(player).SetGameClass(_gameClass);
if (_takeAwayStuff)
{
_playerInventoryMap.put(player.getName(), player.getInventory().getContents());
_playerArmorMap.put(player.getName(), player.getInventory().getArmorContents());
}
}
public boolean attemptShopOpen(Player player)
{
if (!OpenedShop.contains(player.getName()))
@ -28,7 +60,7 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
OpenedShop.add(player.getName());
OpenShopForPlayer(player);
CustomBuildPage buildPage = new CustomBuildPage(Plugin, this, ClientManager, DonationManager, player);
if (!PlayerPageMap.containsKey(player.getName()))
@ -55,7 +87,16 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
clientClass.SaveActiveCustomBuild();
clientClass.SetActiveCustomBuild(clientClass.GetGameClass(), customBuild);
clientClass.EquipCustomBuild(customBuild, false);
}
if (_takeAwayStuff)
{
player.getInventory().clear();
player.getInventory().setContents(_playerInventoryMap.remove(player.getName()));
player.getInventory().setArmorContents(_playerArmorMap.remove(player.getName()));
((CraftPlayer)player).getHandle().updateInventory(((CraftPlayer)player).getHandle().defaultContainer);
}
}
@ -64,4 +105,11 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
{
return new CustomBuildPage(Plugin, this, ClientManager, DonationManager, player);
}
@EventHandler
public void clearPlayerFromMaps(PlayerQuitEvent event)
{
_playerInventoryMap.remove(event.getPlayer().getName());
_playerArmorMap.remove(event.getPlayer().getName());
}
}

View File

@ -3,9 +3,9 @@ package mineplex.minecraft.game.core.combat;
import java.util.HashSet;
import java.util.Iterator;
import net.minecraft.server.v1_7_R2.ItemStack;
import net.minecraft.server.v1_7_R3.ItemStack;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Fireball;
import org.bukkit.entity.LivingEntity;

View File

@ -19,7 +19,7 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
public class ConditionEffect implements Listener
{

View File

@ -17,16 +17,16 @@ import mineplex.core.disguise.DisguiseManager;
import mineplex.core.npc.NpcManager;
import mineplex.minecraft.game.core.combat.CombatManager;
import mineplex.minecraft.game.core.damage.compatibility.NpcProtectListener;
import net.minecraft.server.v1_7_R2.DamageSource;
import net.minecraft.server.v1_7_R2.EntityHuman;
import net.minecraft.server.v1_7_R2.EntityLiving;
import net.minecraft.server.v1_7_R3.DamageSource;
import net.minecraft.server.v1_7_R3.EntityHuman;
import net.minecraft.server.v1_7_R3.EntityLiving;
import org.bukkit.EntityEffect;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Fish;
import org.bukkit.entity.LivingEntity;

View File

@ -27,7 +27,7 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
public class Fire extends MiniPlugin
{

View File

@ -2,5 +2,9 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/gson-2.2.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpclient-4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpcore-4.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,225 +0,0 @@
package net.minecraft.server.v1_7_R2;
import java.util.Calendar;
import java.util.Random;
public class EntityBat
extends EntityAmbient
{
private ChunkCoordinates h;
public boolean Vegetated = false;
public EntityBat(World paramWorld)
{
super(paramWorld);
a(0.5F, 0.9F);
setStartled(true);
}
protected void c()
{
super.c();
this.datawatcher.a(16, new Byte((byte)0));
}
protected float be()
{
return 0.1F;
}
protected float bf()
{
return super.bf() * 0.95F;
}
protected String t()
{
if ((isStartled()) && (this.random.nextInt(4) != 0)) {
return null;
}
return "mob.bat.idle";
}
protected String aS()
{
return "mob.bat.hurt";
}
protected String aT()
{
return "mob.bat.death";
}
public boolean R()
{
return false;
}
protected void o(Entity paramEntity) {}
protected void bn() {}
protected void aC()
{
super.aC();
getAttributeInstance(GenericAttributes.a).setValue(6.0D);
}
public boolean isStartled()
{
return (this.datawatcher.getByte(16) & 0x1) != 0;
}
public void setStartled(boolean paramBoolean)
{
int i = this.datawatcher.getByte(16);
if (paramBoolean) {
this.datawatcher.watch(16, Byte.valueOf((byte)(i | 0x1)));
} else {
this.datawatcher.watch(16, Byte.valueOf((byte)(i & 0xFFFFFFFE)));
}
}
protected boolean bj()
{
return true;
}
public void h()
{
super.h();
if (Vegetated)
return;
if (isStartled())
{
this.motX = (this.motY = this.motZ = 0.0D);
this.locY = (MathHelper.floor(this.locY) + 1.0D - this.length);
}
else
{
this.motY *= 0.6000000238418579D;
}
}
protected void bm()
{
super.bm();
if (Vegetated)
return;
if (isStartled())
{
if (!this.world.getType(MathHelper.floor(this.locX), (int)this.locY + 1, MathHelper.floor(this.locZ)).r())
{
setStartled(false);
this.world.a(null, 1015, (int)this.locX, (int)this.locY, (int)this.locZ, 0);
}
else
{
if (this.random.nextInt(200) == 0) {
this.aO = this.random.nextInt(360);
}
if (this.world.findNearbyPlayer(this, 4.0D) != null)
{
setStartled(false);
this.world.a(null, 1015, (int)this.locX, (int)this.locY, (int)this.locZ, 0);
}
}
}
else
{
if ((this.h != null) && ((!this.world.isEmpty(this.h.x, this.h.y, this.h.z)) || (this.h.y < 1))) {
this.h = null;
}
if ((this.h == null) || (this.random.nextInt(30) == 0) || (this.h.e((int)this.locX, (int)this.locY, (int)this.locZ) < 4.0F)) {
this.h = new ChunkCoordinates((int)this.locX + this.random.nextInt(7) - this.random.nextInt(7), (int)this.locY + this.random.nextInt(6) - 2, (int)this.locZ + this.random.nextInt(7) - this.random.nextInt(7));
}
double d1 = this.h.x + 0.5D - this.locX;
double d2 = this.h.y + 0.1D - this.locY;
double d3 = this.h.z + 0.5D - this.locZ;
this.motX += (Math.signum(d1) * 0.5D - this.motX) * 0.1000000014901161D;
this.motY += (Math.signum(d2) * 0.699999988079071D - this.motY) * 0.1000000014901161D;
this.motZ += (Math.signum(d3) * 0.5D - this.motZ) * 0.1000000014901161D;
float f1 = (float)(Math.atan2(this.motZ, this.motX) * 180.0D / 3.141592741012573D) - 90.0F;
float f2 = MathHelper.g(f1 - this.yaw);
this.be = 0.5F;
this.yaw += f2;
if ((this.random.nextInt(100) == 0) && (this.world.getType(MathHelper.floor(this.locX), (int)this.locY + 1, MathHelper.floor(this.locZ)).r())) {
setStartled(true);
}
}
}
protected boolean g_()
{
return false;
}
protected void b(float paramFloat) {}
protected void a(double paramDouble, boolean paramBoolean) {}
public boolean ay()
{
return true;
}
public boolean damageEntity(DamageSource paramDamageSource, float paramFloat)
{
if (isInvulnerable()) {
return false;
}
if ((!this.world.isStatic) &&
(isStartled() &&
!Vegetated)) {
setStartled(false);
}
return super.damageEntity(paramDamageSource, paramFloat);
}
public void a(NBTTagCompound paramNBTTagCompound)
{
super.a(paramNBTTagCompound);
this.datawatcher.watch(16, Byte.valueOf(paramNBTTagCompound.getByte("BatFlags")));
}
public void b(NBTTagCompound paramNBTTagCompound)
{
super.b(paramNBTTagCompound);
paramNBTTagCompound.setByte("BatFlags", this.datawatcher.getByte(16));
}
public boolean canSpawn()
{
int i = MathHelper.floor(this.boundingBox.b);
if (i >= 63) {
return false;
}
int j = MathHelper.floor(this.locX);
int k = MathHelper.floor(this.locZ);
int m = this.world.getLightLevel(j, i, k);
int n = 4;
Calendar localCalendar = this.world.V();
if (((localCalendar.get(2) + 1 == 10) && (localCalendar.get(5) >= 20)) || ((localCalendar.get(2) + 1 == 11) && (localCalendar.get(5) <= 3))) {
n = 7;
} else if (this.random.nextBoolean()) {
return false;
}
if (m > this.random.nextInt(n)) {
return false;
}
return super.canSpawn();
}
}

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.ArrayList;
import java.util.Arrays;
@ -56,7 +56,7 @@ public class Chunk {
this.heightMap = new int[256];
for (int k = 0; k < this.entitySlices.length; ++k) {
this.entitySlices[k] = new org.bukkit.craftbukkit.v1_7_R2.util.UnsafeList(); // CraftBukkit - ArrayList -> UnsafeList
this.entitySlices[k] = new org.bukkit.craftbukkit.v1_7_R3.util.UnsafeList(); // CraftBukkit - ArrayList -> UnsafeList
}
Arrays.fill(this.b, -999);
@ -64,7 +64,7 @@ public class Chunk {
// CraftBukkit start
if (!(this instanceof EmptyChunk)) {
this.bukkitChunk = new org.bukkit.craftbukkit.v1_7_R2.CraftChunk(this);
this.bukkitChunk = new org.bukkit.craftbukkit.v1_7_R3.CraftChunk(this);
}
}
@ -492,17 +492,12 @@ public class Chunk {
}
}
// CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer
if (!this.world.isStatic && (!this.world.callingPlaceEvent || (block instanceof BlockContainer))) {
// CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled.
if (!this.world.isStatic && (!this.world.captureBlockStates || block instanceof BlockContainer)) {
block.onPlace(this.world, l1, j, i2);
}
if (block instanceof IContainer) {
// CraftBukkit start - Don't create tile entity if placement failed
if (this.getType(i, j, k) != block) {
return false;
}
// CraftBukkit end
tileentity = this.e(i, j, k);
if (tileentity == null) {
@ -513,13 +508,6 @@ public class Chunk {
if (tileentity != null) {
tileentity.u();
}
// Spigot start
if ( tileentity instanceof TileEntitySkull )
{
org.spigotmc.HeadConverter.convertHead( (TileEntitySkull) tileentity );
}
// Spigot end
}
this.n = true;
@ -616,7 +604,7 @@ public class Chunk {
Bukkit.getLogger().warning("Entity is at " + entity.locX + "," + entity.locZ + " (chunk " + i + "," + j + ") but was stored in chunk " + this.locX + "," + this.locZ);
// CraftBukkit end
}
ChunkAddEntityEvent event = new ChunkAddEntityEvent(entity.bukkitEntity);
Bukkit.getServer().getPluginManager().callEvent(event);
@ -740,7 +728,7 @@ public class Chunk {
// CraftBukkit start
} else {
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.x + "," + tileentity.y + "," + tileentity.z
+ " (" + org.bukkit.craftbukkit.v1_7_R2.util.CraftMagicNumbers.getMaterial(getType(i, j, k)) + ") where there was no entity tile!");
+ " (" + org.bukkit.craftbukkit.v1_7_R3.util.CraftMagicNumbers.getMaterial(getType(i, j, k)) + ") where there was no entity tile!");
System.out.println("Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16));
new Exception().printStackTrace();
// CraftBukkit end
@ -785,7 +773,7 @@ public class Chunk {
// Spigot Start
if ( tileentity instanceof IInventory )
{
for ( org.bukkit.craftbukkit.v1_7_R2.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.v1_7_R2.entity.CraftHumanEntity>( (List) ( (IInventory) tileentity ).getViewers() ) )
for ( org.bukkit.craftbukkit.v1_7_R3.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.v1_7_R3.entity.CraftHumanEntity>( (List) ( (IInventory) tileentity ).getViewers() ) )
{
h.getHandle().closeInventory();
}
@ -803,7 +791,7 @@ public class Chunk {
// Spigot Start
if ( entity instanceof IInventory )
{
for ( org.bukkit.craftbukkit.v1_7_R2.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.v1_7_R2.entity.CraftHumanEntity>( (List) ( (IInventory) entity ).getViewers() ) )
for ( org.bukkit.craftbukkit.v1_7_R3.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.v1_7_R3.entity.CraftHumanEntity>( (List) ( (IInventory) entity ).getViewers() ) )
{
h.getHandle().closeInventory();
}

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.io.IOException;
import java.util.ArrayList;
@ -8,6 +8,7 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import net.minecraft.util.com.google.common.collect.Lists;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -15,10 +16,10 @@ import org.apache.logging.log4j.Logger;
import java.util.Random;
import org.bukkit.Server;
import org.bukkit.craftbukkit.v1_7_R2.chunkio.ChunkIOExecutor;
import org.bukkit.craftbukkit.v1_7_R2.util.LongHash;
import org.bukkit.craftbukkit.v1_7_R2.util.LongHashSet;
import org.bukkit.craftbukkit.v1_7_R2.util.LongObjectHashMap;
import org.bukkit.craftbukkit.v1_7_R3.chunkio.ChunkIOExecutor;
import org.bukkit.craftbukkit.v1_7_R3.util.LongHash;
import org.bukkit.craftbukkit.v1_7_R3.util.LongHashSet;
import org.bukkit.craftbukkit.v1_7_R3.util.LongObjectHashMap;
import org.bukkit.event.world.ChunkUnloadEvent;
// CraftBukkit end
@ -143,6 +144,7 @@ public class ChunkProviderServer implements IChunkProvider {
}
if (chunk == null) {
org.bukkit.craftbukkit.v1_7_R3.SpigotTimings.syncChunkLoadTimer.startTiming(); // Spigot
chunk = this.loadChunk(i, j);
if (chunk == null) {
if (this.chunkProvider == null) {
@ -177,6 +179,7 @@ public class ChunkProviderServer implements IChunkProvider {
}
// CraftBukkit end
chunk.a(this, this, i, j);
org.bukkit.craftbukkit.v1_7_R3.SpigotTimings.syncChunkLoadTimer.stopTiming(); // Spigot
}
return chunk;
@ -327,12 +330,15 @@ public class ChunkProviderServer implements IChunkProvider {
ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
chunk.removeEntities();
this.saveChunk(chunk);
this.saveChunkNOP(chunk);
if (chunk != null) {
chunk.removeEntities();
this.saveChunk(chunk);
this.saveChunkNOP(chunk);
this.chunks.remove(chunkcoordinates); // CraftBukkit
}
// this.unloadQueue.remove(olong);
// this.chunks.remove(olong.longValue());
this.chunks.remove(chunkcoordinates); // CraftBukkit
}
}
// CraftBukkit end

View File

@ -1,8 +1,8 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
// CraftBukkit start
import java.util.List;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftHumanEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity;
// CraftBukkit end
@ -43,11 +43,16 @@ public class ContainerAnvilInventory extends InventorySubcontainer { // CraftBuk
public ContainerAnvilInventory(ContainerAnvil containeranvil, String s, boolean flag, int i) {
super(s, flag, i);
this.a = containeranvil;
this.setMaxStackSize(1); // CraftBukkit
}
// CraftBukkit start - override inherited maxStack from InventorySubcontainer
public int getMaxStackSize() {
return maxStack;
}
// CraftBukkit end
public void update() {
super.update();
this.a.a((IInventory) this);
}
}
}

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.List;
import java.util.Random;
@ -11,18 +11,20 @@ import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.TravelAgent;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Hanging;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Painting;
import org.bukkit.entity.Vehicle;
import org.spigotmc.CustomTimingsHandler; // Spigot
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.painting.PaintingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
import org.bukkit.event.vehicle.VehicleEnterEvent;
import org.bukkit.event.vehicle.VehicleExitEvent;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.EntityDamageByBlockEvent;
import org.bukkit.event.entity.EntityDamageEvent;
@ -114,7 +116,7 @@ public abstract class Entity {
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
// Spigot start
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.v1_7_R2.SpigotTimings.getEntityTimings(this); // Spigot
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.v1_7_R3.SpigotTimings.getEntityTimings(this); // Spigot
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
public long activatedTick = 0;
@ -444,7 +446,7 @@ public abstract class Entity {
return;
}
// CraftBukkit end
org.bukkit.craftbukkit.v1_7_R2.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
org.bukkit.craftbukkit.v1_7_R3.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
if (this.X) {
this.boundingBox.d(d0, d1, d2);
this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D;
@ -755,7 +757,7 @@ public abstract class Entity {
this.world.methodProfiler.b();
}
org.bukkit.craftbukkit.v1_7_R2.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
org.bukkit.craftbukkit.v1_7_R3.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
}
protected String G() {
@ -1253,7 +1255,7 @@ public abstract class Entity {
if (bworld == null) {
EntityPlayer entityPlayer = (EntityPlayer) this;
bworld = ((org.bukkit.craftbukkit.v1_7_R2.CraftServer) server).getServer().getWorldServer(entityPlayer.dimension).getWorld();
bworld = ((org.bukkit.craftbukkit.v1_7_R3.CraftServer) server).getServer().getWorldServer(entityPlayer.dimension).getWorld();
}
this.spawnIn(bworld == null ? null : ((CraftWorld) bworld).getHandle());
@ -1473,11 +1475,11 @@ public abstract class Entity {
this.vehicle = null;
} else {
// CraftBukkit start
if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle) && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4)) {
if ((this.bukkitEntity instanceof LivingEntity) && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4)) {
// It's possible to move from one vehicle to another. We need to check if they're already in a vehicle, and fire an exit event if they are.
VehicleExitEvent exitEvent = null;
if (this.vehicle != null && this.vehicle.getBukkitEntity() instanceof Vehicle) {
exitEvent = new VehicleExitEvent((Vehicle) this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
exitEvent = new VehicleExitEvent(this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
pluginManager.callEvent(exitEvent);
if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
@ -1631,16 +1633,27 @@ public abstract class Entity {
final org.bukkit.entity.Entity stormBukkitEntity = entitylightning.getBukkitEntity();
final PluginManager pluginManager = Bukkit.getPluginManager();
if (thisBukkitEntity instanceof Painting) {
PaintingBreakByEntityEvent event = new PaintingBreakByEntityEvent((Painting) thisBukkitEntity, stormBukkitEntity);
pluginManager.callEvent(event);
if (thisBukkitEntity instanceof Hanging) {
HangingBreakByEntityEvent hangingEvent = new HangingBreakByEntityEvent((Hanging) thisBukkitEntity, stormBukkitEntity);
PaintingBreakByEntityEvent paintingEvent = null;
if (event.isCancelled()) {
if (thisBukkitEntity instanceof Painting) {
paintingEvent = new PaintingBreakByEntityEvent((Painting) thisBukkitEntity, stormBukkitEntity);
}
pluginManager.callEvent(hangingEvent);
if (paintingEvent != null) {
paintingEvent.setCancelled(hangingEvent.isCancelled());
pluginManager.callEvent(paintingEvent);
}
if (hangingEvent.isCancelled() || (paintingEvent != null && paintingEvent.isCancelled())) {
return;
}
}
EntityDamageEvent event = org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory.callEntityDamageEvent(entitylightning, this, EntityDamageEvent.DamageCause.LIGHTNING, 5D);
EntityDamageEvent event = org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callEntityDamageEvent(entitylightning, this, EntityDamageEvent.DamageCause.LIGHTNING, 5D);
if (event.isCancelled()) {
return;
}
@ -1814,7 +1827,7 @@ public abstract class Entity {
Location exit = exitWorld != null ? minecraftserver.getPlayerList().calculateTarget(enter, minecraftserver.getWorldServer(i)) : null;
boolean useTravelAgent = exitWorld != null && !(this.dimension == 1 && exitWorld.dimension == 1); // don't use agent for custom worlds or return from THE_END
TravelAgent agent = exit != null ? (TravelAgent) ((CraftWorld) exit.getWorld()).getHandle().getTravelAgent() : org.bukkit.craftbukkit.v1_7_R2.CraftTravelAgent.DEFAULT; // return arbitrary TA to compensate for implementation dependent plugins
TravelAgent agent = exit != null ? (TravelAgent) ((CraftWorld) exit.getWorld()).getHandle().getTravelAgent() : org.bukkit.craftbukkit.v1_7_R3.CraftTravelAgent.DEFAULT; // return arbitrary TA to compensate for implementation dependent plugins
EntityPortalEvent event = new EntityPortalEvent(this.getBukkitEntity(), enter, exit, agent);
event.useTravelAgent(useTravelAgent);
event.getEntity().getServer().getPluginManager().callEvent(event);

View File

@ -0,0 +1,251 @@
package net.minecraft.server.v1_7_R3;
import java.util.Calendar;
import java.util.Random;
public class EntityBat extends EntityAmbient
{
private ChunkCoordinates h;
public boolean Vegetated = false;
public EntityBat(World paramWorld)
{
super(paramWorld);
a(0.5F, 0.9F);
setStartled(true);
}
protected void c()
{
super.c();
this.datawatcher.a(16, new Byte((byte) 0));
}
protected float be()
{
return 0.1F;
}
protected float bf()
{
return super.bf() * 0.95F;
}
protected String t()
{
if ((isStartled()) && (this.random.nextInt(4) != 0))
{
return null;
}
return "mob.bat.idle";
}
protected String aS()
{
return "mob.bat.hurt";
}
protected String aT()
{
return "mob.bat.death";
}
public boolean R()
{
return false;
}
protected void o(Entity paramEntity)
{
}
protected void bn()
{
}
protected void aC()
{
super.aC();
getAttributeInstance(GenericAttributes.a).setValue(6.0D);
}
public boolean isStartled()
{
return (this.datawatcher.getByte(16) & 0x1) != 0;
}
public void setStartled(boolean paramBoolean)
{
int i = this.datawatcher.getByte(16);
if (paramBoolean)
{
this.datawatcher.watch(16, Byte.valueOf((byte) (i | 0x1)));
}
else
{
this.datawatcher.watch(16, Byte.valueOf((byte) (i & 0xFFFFFFFE)));
}
}
protected boolean bj()
{
return true;
}
public void h()
{
super.h();
if (Vegetated)
return;
if (isStartled())
{
this.motX = (this.motY = this.motZ = 0.0D);
this.locY = (MathHelper.floor(this.locY) + 1.0D - this.length);
}
else
{
this.motY *= 0.6000000238418579D;
}
}
protected void bm()
{
super.bm();
if (Vegetated)
return;
if (isStartled())
{
if (!this.world.getType(MathHelper.floor(this.locX), (int) this.locY + 1, MathHelper.floor(this.locZ)).r())
{
setStartled(false);
this.world.a(null, 1015, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
}
else
{
if (this.random.nextInt(200) == 0)
{
this.aO = this.random.nextInt(360);
}
if (this.world.findNearbyPlayer(this, 4.0D) != null)
{
setStartled(false);
this.world.a(null, 1015, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
}
}
}
else
{
if ((this.h != null) && ((!this.world.isEmpty(this.h.x, this.h.y, this.h.z)) || (this.h.y < 1)))
{
this.h = null;
}
if ((this.h == null) || (this.random.nextInt(30) == 0)
|| (this.h.e((int) this.locX, (int) this.locY, (int) this.locZ) < 4.0F))
{
this.h = new ChunkCoordinates((int) this.locX + this.random.nextInt(7) - this.random.nextInt(7),
(int) this.locY + this.random.nextInt(6) - 2, (int) this.locZ + this.random.nextInt(7)
- this.random.nextInt(7));
}
double d1 = this.h.x + 0.5D - this.locX;
double d2 = this.h.y + 0.1D - this.locY;
double d3 = this.h.z + 0.5D - this.locZ;
this.motX += (Math.signum(d1) * 0.5D - this.motX) * 0.1000000014901161D;
this.motY += (Math.signum(d2) * 0.699999988079071D - this.motY) * 0.1000000014901161D;
this.motZ += (Math.signum(d3) * 0.5D - this.motZ) * 0.1000000014901161D;
float f1 = (float) (Math.atan2(this.motZ, this.motX) * 180.0D / 3.141592741012573D) - 90.0F;
float f2 = MathHelper.g(f1 - this.yaw);
this.be = 0.5F;
this.yaw += f2;
if ((this.random.nextInt(100) == 0)
&& (this.world.getType(MathHelper.floor(this.locX), (int) this.locY + 1,
MathHelper.floor(this.locZ)).r()))
{
setStartled(true);
}
}
}
protected boolean g_()
{
return false;
}
protected void b(float paramFloat)
{
}
protected void a(double paramDouble, boolean paramBoolean)
{
}
public boolean ay()
{
return true;
}
public boolean damageEntity(DamageSource paramDamageSource, float paramFloat)
{
if (isInvulnerable())
{
return false;
}
if ((!this.world.isStatic) && (isStartled() && !Vegetated))
{
setStartled(false);
}
return super.damageEntity(paramDamageSource, paramFloat);
}
public void a(NBTTagCompound paramNBTTagCompound)
{
super.a(paramNBTTagCompound);
this.datawatcher.watch(16, Byte.valueOf(paramNBTTagCompound.getByte("BatFlags")));
}
public void b(NBTTagCompound paramNBTTagCompound)
{
super.b(paramNBTTagCompound);
paramNBTTagCompound.setByte("BatFlags", this.datawatcher.getByte(16));
}
public boolean canSpawn()
{
int i = MathHelper.floor(this.boundingBox.b);
if (i >= 63)
{
return false;
}
int j = MathHelper.floor(this.locX);
int k = MathHelper.floor(this.locZ);
int m = this.world.getLightLevel(j, i, k);
int n = 4;
Calendar localCalendar = this.world.V();
if (((localCalendar.get(2) + 1 == 10) && (localCalendar.get(5) >= 20))
|| ((localCalendar.get(2) + 1 == 11) && (localCalendar.get(5) <= 3)))
{
n = 7;
}
else if (this.random.nextBoolean())
{
return false;
}
if (m > this.random.nextInt(n))
{
return false;
}
return super.canSpawn();
}
}

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
public class EntityBlaze extends EntityMonster {
@ -132,11 +132,11 @@ public class EntityBlaze extends EntityMonster {
int j = this.random.nextInt(2 + i);
if (j > 0) {
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.v1_7_R2.util.CraftMagicNumbers.getMaterial(Items.BLAZE_ROD), j));
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.v1_7_R3.util.CraftMagicNumbers.getMaterial(Items.BLAZE_ROD), j));
}
}
org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory.callEntityDeathEvent(this, loot);
org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callEntityDeathEvent(this, loot);
// CraftBukkit end
}

View File

@ -1,11 +1,11 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.Iterator;
import java.util.List;
// CraftBukkit start
import org.bukkit.block.BlockState;
import org.bukkit.craftbukkit.v1_7_R2.util.BlockStateListPopulator;
import org.bukkit.craftbukkit.v1_7_R3.util.BlockStateListPopulator;
import org.bukkit.event.entity.EntityCreatePortalEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
@ -137,7 +137,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
d2 = this.locZ + (this.bj - this.locZ) / (double) this.bg;
d3 = MathHelper.g(this.bk - (double) this.yaw);
this.yaw = (float) ((double) this.yaw + d3 / (double) this.bg);
this.pitch = (float) ((double) this.pitch + (this.bm - (double) this.pitch) / (double) this.bg);
this.pitch = (float) ((double) this.pitch + (this.bl - (double) this.pitch) / (double) this.bg);
--this.bg;
this.setPosition(d0, d1, d2);
this.b(this.yaw, this.pitch);
@ -402,7 +402,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
if (event.getTarget() == null) {
this.bD = null;
} else {
this.bD = ((org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity) event.getTarget()).getHandle();
this.bD = ((org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity) event.getTarget()).getHandle();
}
}
// CraftBukkit end
@ -442,7 +442,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
// CraftBukkit start - Create a list to hold all the destroyed blocks
List<org.bukkit.block.Block> destroyedBlocks = new java.util.ArrayList<org.bukkit.block.Block>();
org.bukkit.craftbukkit.v1_7_R2.CraftWorld craftWorld = this.world.getWorld();
org.bukkit.craftbukkit.v1_7_R3.CraftWorld craftWorld = this.world.getWorld();
// CraftBukkit end
for (int k1 = i; k1 <= l; ++k1) {
@ -490,7 +490,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
int blockY = block.getY();
int blockZ = block.getZ();
Block nmsBlock = org.bukkit.craftbukkit.v1_7_R2.util.CraftMagicNumbers.getBlock(blockId);
Block nmsBlock = org.bukkit.craftbukkit.v1_7_R3.util.CraftMagicNumbers.getBlock(blockId);
if (nmsBlock.a(explosionSource)) {
nmsBlock.dropNaturally(this.world, blockX, blockY, blockZ, block.getData(), event.getYield(), 0);
}
@ -565,7 +565,14 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
}
if (this.bB == 1) {
this.world.b(1018, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
// Spigot start
if(this.world.spigotConfig.dragonDeathSoundRadius > 0){
this.world.getServer().getHandle().sendPacketNearby((int) this.locX, (int) this.locY, (int) this.locZ, this.world.spigotConfig.dragonDeathSoundRadius, this.dimension, new PacketPlayOutWorldEvent(1018, (int) this.locX, (int) this.locY, (int) this.locZ, 0, true));
}
else {
this.world.b(1018, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
}
// Spigot end
}
}

View File

@ -1,10 +1,10 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.UUID;
// CraftBukkit start
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory;
import org.bukkit.event.entity.EntityTeleportEvent;
// CraftBukkit end
@ -314,7 +314,7 @@ public class EntityEnderman extends EntityMonster {
int count = this.random.nextInt(2 + i);
if (count > 0) {
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.v1_7_R2.util.CraftMagicNumbers.getMaterial(item), count));
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.v1_7_R3.util.CraftMagicNumbers.getMaterial(item), count));
}
CraftEventFactory.callEntityDeathEvent(this, loot);

View File

@ -1,11 +1,11 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.ArrayList;
import java.util.Iterator;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory;
import org.bukkit.event.entity.EntityDamageEvent;
// CraftBukkit end
@ -97,6 +97,7 @@ public class EntityFallingBlock extends Entity {
}
this.world.setAir(i, j, k);
world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, i, j, k); // Spigot
}
if (this.onGround) {
@ -112,6 +113,7 @@ public class EntityFallingBlock extends Entity {
}
this.world.setTypeAndData(i, j, k, this.id, this.data, 3);
// CraftBukkit end
world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, i, j, k); // Spigot
if (this.id instanceof BlockFalling) {
((BlockFalling) this.id).a(this.world, i, j, k, this.data);

View File

@ -1,8 +1,8 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.event.entity.EntityTargetEvent;
// CraftBukkit end
@ -232,7 +232,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
loot.add(CraftItemStack.asNewCraftStack(Items.SULPHUR, j));
}
org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory.callEntityDeathEvent(this, loot);
org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callEntityDeathEvent(this, loot);
// CraftBukkit end
}

View File

@ -1,12 +1,14 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.Iterator;
import java.util.List;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory;
import org.bukkit.event.entity.EntityDamageEvent;
// CraftBukkit end
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
public class EntityHorse extends EntityAnimal implements IInventoryListener {
@ -140,11 +142,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return this.cb();
}
public String getOwnerName() {
public String getOwnerUUID() {
return this.datawatcher.getString(21);
}
public void setOwnerName(String s) {
public void setOwnerUUID(String s) {
this.datawatcher.watch(21, s);
}
@ -604,7 +606,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
this.heal(f);
this.heal(f, RegainReason.EATING); // CraftBukkit
flag = true;
}
@ -723,7 +725,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
super.e();
if (!this.world.isStatic) {
if (this.random.nextInt(900) == 0 && this.deathTicks == 0) {
this.heal(1.0F);
this.heal(1.0F, RegainReason.REGEN); // CraftBukkit
}
if (!this.cm() && this.passenger == null && this.random.nextInt(300) == 0 && this.world.getType(MathHelper.floor(this.locX), MathHelper.floor(this.locY) - 1, MathHelper.floor(this.locZ)) == Blocks.GRASS) {
@ -878,7 +880,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
public boolean h(EntityHuman entityhuman) {
this.setOwnerName(entityhuman.getName());
this.setOwnerUUID(entityhuman.getUniqueID().toString());
this.setTame(true);
return true;
}
@ -961,7 +963,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
nbttagcompound.setInt("Variant", this.getVariant());
nbttagcompound.setInt("Temper", this.getTemper());
nbttagcompound.setBoolean("Tame", this.isTame());
nbttagcompound.setString("OwnerName", this.getOwnerName());
nbttagcompound.setString("OwnerUUID", this.getOwnerUUID());
nbttagcompound.setInt("Bukkit.MaxDomestication", this.maxDomestication); // CraftBukkit
if (this.hasChest()) {
NBTTagList nbttaglist = new NBTTagList();
@ -1000,9 +1002,17 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
this.setVariant(nbttagcompound.getInt("Variant"));
this.setTemper(nbttagcompound.getInt("Temper"));
this.setTame(nbttagcompound.getBoolean("Tame"));
if (nbttagcompound.hasKeyOfType("OwnerName", 8)) {
this.setOwnerName(nbttagcompound.getString("OwnerName"));
if (nbttagcompound.hasKeyOfType("OwnerUUID", 8)) {
this.setOwnerUUID(nbttagcompound.getString("OwnerUUID"));
}
// Spigot start
else if (nbttagcompound.hasKey("OwnerName")) {
String owner = nbttagcompound.getString("OwnerName");
if (owner != null && !owner.isEmpty()) {
this.setOwnerUUID(NameReferencingFileConverter.a(owner));
}
}
// Spigot end
// CraftBukkit start
if (nbttagcompound.hasKey("Bukkit.MaxDomestication")) {
this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication");
@ -1189,7 +1199,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
power = 0.4F + 0.4F * (float) i / 90.0F;
}
org.bukkit.event.entity.HorseJumpEvent event = org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory.callHorseJumpEvent(this, power);
org.bukkit.event.entity.HorseJumpEvent event = org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callHorseJumpEvent(this, power);
if (!event.isCancelled()) {
this.bI = true;
this.cU();

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.Collection;
import java.util.Iterator;
@ -9,9 +9,9 @@ import net.minecraft.util.com.google.common.base.Charsets;
import net.minecraft.util.com.mojang.authlib.GameProfile;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftHumanEntity;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftItem;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftHumanEntity;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftItem;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.player.PlayerBedEnterEvent;
@ -78,7 +78,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
ChunkCoordinates chunkcoordinates = world.getSpawn();
this.setPositionRotation((double) chunkcoordinates.x + 0.5D, (double) (chunkcoordinates.y + 1), (double) chunkcoordinates.z + 0.5D, 0.0F, 0.0F);
this.az = 180.0F;
this.aZ = 180.0F;
this.maxFireTicks = 20;
}
@ -190,7 +190,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
if (d0 < -d3) {
this.bu = this.by = this.locX;
this.bu = this.bx = this.locX;
}
if (d2 < -d3) {
@ -198,7 +198,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
if (d1 < -d3) {
this.bv = this.bz = this.locY;
this.bv = this.by = this.locY;
}
this.bx += d0 * 0.25D;
@ -277,6 +277,10 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
// Update client
if (this instanceof EntityPlayer) {
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.a((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
// Spigot Start
((EntityPlayer) this).getBukkitEntity().updateInventory();
((EntityPlayer) this).getBukkitEntity().updateScaledHealth();
// Spigot End
}
return;
}
@ -323,12 +327,13 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
public void setPassengerOf(Entity entity) {
// CraftBukkit end
if (this.vehicle != null && entity == null) {
world.getServer().getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ) ); // Spigot
// CraftBukkit start - use parent method instead to correctly fire VehicleExitEvent
Entity originalVehicle = this.vehicle;
// First statement moved down, second statement handled in parent method.
/*
if (!this.world.isStatic) {
this.l(this.vehicle);
this.m(this.vehicle);
}
if (this.vehicle != null) {
@ -402,7 +407,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.i((float) attributeinstance.getValue());
float f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
// CraftBukkit - Math -> TrigMath
float f1 = (float) org.bukkit.craftbukkit.v1_7_R2.TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F;
float f1 = (float) org.bukkit.craftbukkit.v1_7_R3.TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F;
if (f > 0.1F) {
f = 0.1F;
@ -429,7 +434,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
List list = this.world.getEntities(this, axisalignedbb);
if (list != null) {
if (list != null && this.R()) { // Spigot: Add this.R() condition
for (int i = 0; i < list.size(); ++i) {
Entity entity = (Entity) list.get(i);
@ -912,8 +917,15 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
int j = EnchantmentManager.getFireAspectEnchantmentLevel(this);
if (entity instanceof EntityLiving && j > 0 && !entity.isBurning()) {
flag1 = true;
entity.setOnFire(1);
// CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 1);
org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
if (!combustEvent.isCancelled()) {
flag1 = true;
entity.setOnFire(combustEvent.getDuration());
}
// CraftBukkit end
}
boolean flag2 = entity.damageEntity(DamageSource.playerAttack(this), f);
@ -1564,7 +1576,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
public static UUID a(GameProfile gameprofile) {
UUID uuid = UtilUUID.b(gameprofile.getId());
UUID uuid = gameprofile.getId();
if (uuid == null) {
uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + gameprofile.getName()).getBytes(Charsets.UTF_8));

View File

@ -1,11 +1,11 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory;
import org.bukkit.event.entity.EntityUnleashEvent;
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
// CraftBukkit end
@ -153,7 +153,7 @@ public abstract class EntityInsentient extends EntityLiving {
public void h() {
super.h();
if (!this.world.isStatic) {
this.bJ();
this.bL();
}
}
@ -187,7 +187,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
if (j > 0) {
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.v1_7_R2.util.CraftMagicNumbers.getMaterial(item), j));
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.v1_7_R3.util.CraftMagicNumbers.getMaterial(item), j));
}
}
@ -198,7 +198,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (k < 5) {
ItemStack itemstack = this.getRareDrop(k <= 0 ? 1 : 0);
if (itemstack != null) {
loot.add(org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack.asCraftMirror(itemstack));
loot.add(org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack.asCraftMirror(itemstack));
}
}
}
@ -421,6 +421,12 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.a("checkDespawn");
this.w();
this.world.methodProfiler.b();
// Spigot Start
if ( this.fromMobSpawner )
{
return;
}
// Spigot End
this.world.methodProfiler.a("sensing");
this.bq.a();
this.world.methodProfiler.b();
@ -808,7 +814,7 @@ public abstract class EntityInsentient extends EntityLiving {
return true;
}
if (entityhuman.getName().equalsIgnoreCase(((EntityTameableAnimal) this).getOwnerName())) {
if (entityhuman.getName().equalsIgnoreCase(((EntityTameableAnimal) this).getName())) {
// CraftBukkit start - fire PlayerLeashEntityEvent
if (CraftEventFactory.callPlayerLeashEntityEvent(this, entityhuman, entityhuman).isCancelled()) {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutAttachEntity(1, this, this.getLeashHolder()));

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.util.Collection;
import java.util.HashMap;
@ -8,7 +8,7 @@ import java.util.Random;
import java.util.UUID;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent;
// CraftBukkit end
@ -78,7 +78,13 @@ public abstract class EntityLiving extends Entity {
public int expToDrop;
public int maxAirTicks = 300;
// CraftBukkit end
// Spigot start
public void inactiveTick()
{
super.inactiveTick();
++this.aU; // Above all the floats
}
// Spigot en
public boolean ghost;
public EntityLiving(World world) {
@ -617,7 +623,7 @@ public abstract class EntityLiving extends Entity {
public void setHealth(float f) {
// CraftBukkit start - Handle scaled health
if (this instanceof EntityPlayer) {
org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
// Squeeze
if (f < 0.0F) {
player.setRealHealth(0.0D);
@ -1317,7 +1323,7 @@ public abstract class EntityLiving extends Entity {
f3 = 1.0F;
f2 = (float) Math.sqrt((double) f) * 3.0F;
// CraftBukkit - Math -> TrigMath
f1 = (float) org.bukkit.craftbukkit.v1_7_R2.TrigMath.atan2(d1, d0) * 180.0F / 3.1415927F - 90.0F;
f1 = (float) org.bukkit.craftbukkit.v1_7_R3.TrigMath.atan2(d1, d0) * 180.0F / 3.1415927F - 90.0F;
}
if (this.aD > 0.0F) {
@ -1409,7 +1415,7 @@ public abstract class EntityLiving extends Entity {
double d3 = MathHelper.g(this.bk - (double) this.yaw);
this.yaw = (float) ((double) this.yaw + d3 / (double) this.bg);
this.pitch = (float) ((double) this.pitch + (this.bm - (double) this.pitch) / (double) this.bg);
this.pitch = (float) ((double) this.pitch + (this.bl - (double) this.pitch) / (double) this.bg);
--this.bg;
this.setPosition(d0, d1, d2);
this.b(this.yaw, this.pitch);
@ -1485,8 +1491,10 @@ public abstract class EntityLiving extends Entity {
protected void bn() {
List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
if (list != null && !list.isEmpty()) {
if (this.R() && list != null && !list.isEmpty()) { // Spigot: Add this.R() condition
numCollisions -= world.spigotConfig.maxCollisionsPerEntity; // Spigot
for (int i = 0; i < list.size(); ++i) {
if (numCollisions > world.spigotConfig.maxCollisionsPerEntity) { break; } // Spigot
Entity entity = (Entity) list.get(i);
// TODO better check now?
@ -1496,10 +1504,13 @@ public abstract class EntityLiving extends Entity {
}
// CraftBukkit end
if (entity.R() && R()) {
if (entity.R()) {
entity.numCollisions++; // Spigot
numCollisions++; // Spigot
this.o(entity);
}
}
numCollisions = 0; // Spigot
}
}

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import java.io.IOException;
import java.util.ArrayList;
@ -19,10 +19,10 @@ import org.apache.logging.log4j.Logger;
// CraftBukkit start
import org.bukkit.Bukkit;
import org.bukkit.WeatherType;
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R3.inventory.CraftItemStack;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
// CraftBukkit end
@ -61,7 +61,26 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public int newTotalExp = 0;
public boolean keepLevel = false;
public double maxHealthCache;
public boolean joining = true;
public int lastPing = -1; // Spigot
// CraftBukkit end
// Spigot start
public boolean collidesWithEntities = true;
/*
@Override
public boolean Q()
{
return this.collidesWithEntities && super.Q();
}
*/
@Override
public boolean R()
{
return this.collidesWithEntities && super.R();
}
// Spigot end
public boolean spectating; // Mineplex
@ -83,7 +102,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
this.server = minecraftserver;
this.bO = minecraftserver.getPlayerList().i(this.getName());
this.bO = minecraftserver.getPlayerList().a((EntityHuman) this);
this.W = 0.0F;
this.height = 0.0F;
this.setPositionRotation((double) i + 0.5D, (double) k, (double) j + 0.5D, 0.0F, 0.0F);
@ -161,6 +180,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void h() {
// CraftBukkit start
if (this.joining) {
this.joining = false;
}
// CraftBukkit end
this.playerInteractManager.a();
--this.invulnerableTicks;
if (this.noDamageTicks > 0) {
@ -194,7 +219,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
Chunk chunk;
while (iterator1.hasNext() && arraylist.size() < PacketPlayOutMapChunkBulk.c()) {
while (iterator1.hasNext() && arraylist.size() < this.world.spigotConfig.maxBulkChunk) { // Spigot
ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) iterator1.next();
if (chunkcoordintpair != null) {
@ -230,7 +255,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
if (this.bX > 0L && this.server.getIdleTimeout() > 0 && MinecraftServer.aq() - this.bX > (long) (this.server.getIdleTimeout() * 1000 * 60)) {
if (this.bX > 0L && this.server.getIdleTimeout() > 0 && MinecraftServer.ar() - this.bX > (long) (this.server.getIdleTimeout() * 1000 * 60)) {
this.playerConnection.disconnect("You have been idle for too long!");
}
}
@ -373,7 +398,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (deathMessage.equals(deathmessage)) {
this.server.getPlayerList().sendMessage(chatmessage);
} else {
this.server.getPlayerList().sendMessage(org.bukkit.craftbukkit.v1_7_R2.util.CraftChatMessage.fromString(deathMessage));
this.server.getPlayerList().sendMessage(org.bukkit.craftbukkit.v1_7_R3.util.CraftChatMessage.fromString(deathMessage));
}
}
@ -423,7 +448,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return false;
} else {
// CraftBukkit - this.server.getPvP() -> this.world.pvpMode
boolean flag = this.server.W() && this.world.pvpMode && "fall".equals(damagesource.translationIndex);
boolean flag = this.server.X() && this.world.pvpMode && "fall".equals(damagesource.translationIndex);
if (!flag && this.invulnerableTicks > 0 && damagesource != DamageSource.OUT_OF_WORLD) {
return false;
@ -528,7 +553,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void a(boolean flag, boolean flag1, boolean flag2) {
if (this.fauxSleeping && !this.sleeping) return; // CraftBukkit - Can't leave bed if not in one!
if (!this.sleeping) return; // CraftBukkit - Can't leave bed if not in one!
if (this.isSleeping()) {
this.r().getTracker().sendPacketToEntity(this, new PacketPlayOutAnimation(this, 2));
@ -624,7 +649,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerChest(this.inventory, iinventory));
if(container == null) return;
if (container == null) {
iinventory.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
this.nextContainerCounter();
@ -637,7 +665,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void openHopper(TileEntityHopper tileentityhopper) {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, tileentityhopper));
if(container == null) return;
if (container == null) {
tileentityhopper.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
this.nextContainerCounter();
@ -650,7 +681,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void openMinecartHopper(EntityMinecartHopper entityminecarthopper) {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, entityminecarthopper));
if(container == null) return;
if (container == null) {
entityminecarthopper.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
this.nextContainerCounter();
@ -663,7 +697,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void openFurnace(TileEntityFurnace tileentityfurnace) {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerFurnace(this.inventory, tileentityfurnace));
if(container == null) return;
if (container == null) {
tileentityfurnace.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
this.nextContainerCounter();
@ -676,7 +713,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void openDispenser(TileEntityDispenser tileentitydispenser) {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerDispenser(this.inventory, tileentitydispenser));
if(container == null) return;
if (container == null) {
tileentitydispenser.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
this.nextContainerCounter();
@ -689,7 +729,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void openBrewingStand(TileEntityBrewingStand tileentitybrewingstand) {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBrewingStand(this.inventory, tileentitybrewingstand));
if(container == null) return;
if (container == null) {
tileentitybrewingstand.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
this.nextContainerCounter();
@ -702,7 +745,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void openBeacon(TileEntityBeacon tileentitybeacon) {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBeacon(this.inventory, tileentitybeacon));
if(container == null) return;
if (container == null) {
tileentitybeacon.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
this.nextContainerCounter();
@ -745,7 +791,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void openHorseInventory(EntityHorse entityhorse, IInventory iinventory) {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHorse(this.inventory, iinventory, entityhorse));
if(container == null) return;
if (container == null) {
iinventory.l_(); // Should be closeContainer
return;
}
// CraftBukkit end
if (this.activeContainer != this.defaultContainer) {
@ -928,7 +977,19 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public boolean a(int i, String s) {
return "seed".equals(s) && !this.server.W() ? true : (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) ? (this.server.getPlayerList().isOp(this.getName()) ? this.server.l() >= i : false) : true);
if ("seed".equals(s) && !this.server.X()) {
return true;
} else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s)) {
if (this.server.getPlayerList().isOp(this.getProfile())) {
OpListEntry oplistentry = (OpListEntry) this.server.getPlayerList().getOPs().get(this.getProfile());
return oplistentry != null ? oplistentry.a() >= i : this.server.l() >= i;
} else {
return false;
}
} else {
return true;
}
}
public String s() {
@ -949,7 +1010,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.bV = packetplayinsettings.e();
this.bW = packetplayinsettings.f();
if (this.server.M() && this.server.L().equals(this.getName())) {
if (this.server.N() && this.server.M().equals(this.getName())) {
this.server.a(packetplayinsettings.g());
}
@ -969,7 +1030,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void v() {
this.bX = MinecraftServer.aq();
this.bX = MinecraftServer.ar();
}
public ServerStatisticManager getStatisticManager() {

View File

@ -1,8 +1,8 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.entity.SlimeSplitEvent;
// CraftBukkit end
@ -150,7 +150,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
} else {
this.bc = false;
if (this.onGround) {
this.bd = this.bf = 0.0F;
this.bd = this.be = 0.0F;
}
}
}

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit
@ -74,9 +74,9 @@ public class EntityTNTPrimed extends Entity {
// CraftBukkit start
// float f = 4.0F;
org.bukkit.craftbukkit.v1_7_R2.CraftServer server = this.world.getServer();
org.bukkit.craftbukkit.v1_7_R3.CraftServer server = this.world.getServer();
ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity.getEntity(server, this));
ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.v1_7_R3.entity.CraftEntity.getEntity(server, this));
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
public class FoodMetaData {
@ -29,7 +29,7 @@ public class FoodMetaData {
// CraftBukkit start
int oldFoodLevel = foodLevel;
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, itemfood.getNutrition(itemstack) + oldFoodLevel);
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, itemfood.getNutrition(itemstack) + oldFoodLevel);
if (!event.isCancelled()) {
this.eat(event.getFoodLevel() - oldFoodLevel, itemfood.getSaturationModifier(itemstack));
@ -49,7 +49,7 @@ public class FoodMetaData {
this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F);
} else if (enumdifficulty != EnumDifficulty.PEACEFUL) {
// CraftBukkit start
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, Math.max(this.foodLevel - 1, 0));
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, Math.max(this.foodLevel - 1, 0));
if (!event.isCancelled()) {
this.foodLevel = event.getFoodLevel();

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
public interface IPacketVerifier
{

View File

@ -1,4 +1,4 @@
package net.minecraft.server.v1_7_R2;
package net.minecraft.server.v1_7_R3;
public class PacketPlayInCloseWindow
extends Packet

Some files were not shown because too many files have changed in this diff Show More