Update patches and cb.jar

This commit is contained in:
libraryaddict 2015-10-21 05:05:27 +13:00
parent 07f032a5d2
commit 8ceb69513a
11 changed files with 1550 additions and 457 deletions

View File

@ -0,0 +1,46 @@
From 0b2e6d55efca6de55c7e6dc48de65c7c4ffb6166 Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 21 Oct 2015 04:37:32 +1300
Subject: [PATCH] Change VehicleExitEvent to support non-vechicles
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
index 364451b..9d36cad 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
@@ -1,21 +1,29 @@
package org.bukkit.event.vehicle;
+import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Vehicle;
import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Raised when a living entity exits a vehicle.
*/
-public class VehicleExitEvent extends VehicleEvent implements Cancellable {
+public class VehicleExitEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
private final LivingEntity exited;
+ private final Entity vehicle;
- public VehicleExitEvent(final Vehicle vehicle, final LivingEntity exited) {
- super(vehicle);
+ public VehicleExitEvent(final Entity vehicle, final LivingEntity exited) {
this.exited = exited;
+ this.vehicle = vehicle;
+ }
+
+ public Entity getVehicle()
+ {
+ return vehicle;
}
/**
--
1.9.5.msysgit.0

View File

@ -1,89 +0,0 @@
From 95da114a0184f29b4765b90e81c5a5d3be025a08 Mon Sep 17 00:00:00 2001
From: Shaun Bennett <phination@me.com>
Date: Tue, 21 Apr 2015 19:12:35 -0400
Subject: [PATCH] Mineplex - Entity Changes
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 48e2508..a94867b 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -215,7 +215,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
- *
+ *
* @return damage taken since the last no damage ticks time period
*/
@Deprecated
@@ -232,7 +232,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
- *
+ *
* @param damage amount of damage
*/
@Deprecated
@@ -392,4 +392,20 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource {
* @return whether the operation was successful
*/
public boolean setLeashHolder(Entity holder);
+
+ public boolean shouldBreakLeash();
+
+ public void setShouldBreakLeash(boolean shouldBreakLeash);
+
+ public boolean shouldPullWhileLeashed();
+
+ public void setPullWhileLeashed(boolean pullWhileLeashed);
+
+ public boolean isVegetated();
+
+ public void setVegetated(boolean vegetated);
+
+ public boolean isGhost();
+
+ public void setGhost(boolean ghost);
}
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
index 364451b..9d36cad 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
@@ -1,21 +1,29 @@
package org.bukkit.event.vehicle;
+import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Vehicle;
import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Raised when a living entity exits a vehicle.
*/
-public class VehicleExitEvent extends VehicleEvent implements Cancellable {
+public class VehicleExitEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
private final LivingEntity exited;
+ private final Entity vehicle;
- public VehicleExitEvent(final Vehicle vehicle, final LivingEntity exited) {
- super(vehicle);
+ public VehicleExitEvent(final Entity vehicle, final LivingEntity exited) {
this.exited = exited;
+ this.vehicle = vehicle;
+ }
+
+ public Entity getVehicle()
+ {
+ return vehicle;
}
/**
--
2.3.5

View File

@ -0,0 +1,34 @@
From c465eb8207feeb742f11eee16e7e1f44b0e3f33c Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 21 Oct 2015 04:38:17 +1300
Subject: [PATCH] Change LivingEntity to support Mineplex calls
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 48e2508..fb623ae 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -392,4 +392,20 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource {
* @return whether the operation was successful
*/
public boolean setLeashHolder(Entity holder);
+
+ public boolean shouldBreakLeash();
+
+ public void setShouldBreakLeash(boolean shouldBreakLeash);
+
+ public boolean shouldPullWhileLeashed();
+
+ public void setPullWhileLeashed(boolean pullWhileLeashed);
+
+ public boolean isVegetated();
+
+ public void setVegetated(boolean vegetated);
+
+ public boolean isGhost();
+
+ public void setGhost(boolean ghost);
}
--
1.9.5.msysgit.0

View File

@ -1,22 +0,0 @@
From d9962d706bd608053c454e7b3c4561eb0ea7acaf Mon Sep 17 00:00:00 2001
From: Shaun Bennett <phination@me.com>
Date: Sun, 19 Apr 2015 02:01:08 -0400
Subject: [PATCH] Mineplex - Ignore EULA
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 86ff385..95ff1d4 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -133,7 +133,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
System.err.println( "If you do not agree to the above EULA please stop your server and remove this flag immediately." );
}
// Spigot End
- if (!this.p.a() && !eulaAgreed) { // Spigot
+ if (false && !this.p.a() && !eulaAgreed) { // Spigot
DedicatedServer.LOGGER.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
this.p.b();
return false;
--
2.3.5

View File

@ -0,0 +1,353 @@
From 97a412e3bbb4bf718e132b2f8c779b434b772e05 Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 21 Oct 2015 04:45:17 +1300
Subject: [PATCH] Add Mineplex packetlisteners
diff --git a/src/main/java/com/mineplex/spigot/IPacketVerifier.java b/src/main/java/com/mineplex/spigot/IPacketVerifier.java
new file mode 100644
index 0000000..f86dfd1
--- /dev/null
+++ b/src/main/java/com/mineplex/spigot/IPacketVerifier.java
@@ -0,0 +1,8 @@
+package com.mineplex.spigot;
+
+import net.minecraft.server.Packet;
+
+public interface IPacketVerifier
+{
+ public boolean handlePacket(Packet packet);
+}
\ No newline at end of file
diff --git a/src/main/java/com/mineplex/spigot/PacketProcessor.java b/src/main/java/com/mineplex/spigot/PacketProcessor.java
new file mode 100644
index 0000000..5695899
--- /dev/null
+++ b/src/main/java/com/mineplex/spigot/PacketProcessor.java
@@ -0,0 +1,250 @@
+package com.mineplex.spigot;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.HashMap;
+import io.netty.util.concurrent.GenericFutureListener;
+
+import net.minecraft.server.NetworkManager;
+import net.minecraft.server.IChatBaseComponent;
+
+import net.minecraft.server.Packet;
+import net.minecraft.server.PacketListenerPlayIn;
+import net.minecraft.server.IUpdatePlayerListBox;
+import net.minecraft.server.PlayerConnection;
+import net.minecraft.server.PacketPlayInChat;
+import net.minecraft.server.PacketPlayInTabComplete;
+import net.minecraft.server.PacketPlayInClientCommand;
+import net.minecraft.server.PacketPlayInSettings;
+import net.minecraft.server.PacketPlayInTransaction;
+import net.minecraft.server.PacketPlayInEnchantItem;
+import net.minecraft.server.PacketPlayInWindowClick;
+import net.minecraft.server.PacketPlayInCloseWindow;
+import net.minecraft.server.PacketPlayInCustomPayload;
+import net.minecraft.server.PacketPlayInUseEntity;
+import net.minecraft.server.PacketPlayInKeepAlive;
+import net.minecraft.server.PacketPlayInFlying;
+import net.minecraft.server.PacketPlayInAbilities;
+import net.minecraft.server.PacketPlayInBlockDig;
+import net.minecraft.server.PacketPlayInEntityAction;
+import net.minecraft.server.PacketPlayInSteerVehicle;
+import net.minecraft.server.PacketPlayInHeldItemSlot;
+import net.minecraft.server.PacketPlayInSetCreativeSlot;
+import net.minecraft.server.PacketPlayInUpdateSign;
+import net.minecraft.server.PacketPlayInBlockPlace;
+import net.minecraft.server.PacketPlayInSpectate;
+import net.minecraft.server.PacketPlayInResourcePackStatus;
+import net.minecraft.server.PacketPlayInArmAnimation;
+
+public class PacketProcessor implements PacketListenerPlayIn, IUpdatePlayerListBox
+{
+ private IPacketVerifier _packetVerifier;
+ private PlayerConnection _packetListener;
+ private static volatile HashMap<Class, Boolean> _listenedPackets = new HashMap<Class, Boolean>();
+
+ public PacketProcessor(PlayerConnection packetListener)
+ {
+ _packetListener = packetListener;
+ }
+
+ public void setPacketVerifier(IPacketVerifier verifier)
+ {
+ _packetVerifier = verifier;
+ }
+
+ public void c()
+ {
+ _packetListener.c();
+ }
+
+ public static void addPacket(Class packetClass, boolean forceMainThread)
+ {
+ _listenedPackets.put(packetClass, forceMainThread);
+ }
+
+ public static void removePacket(Class packetClass)
+ {
+ _listenedPackets.remove(packetClass);
+ }
+
+ public void processOutgoingPacket(Packet packet, NetworkManager networkManager)
+ {
+ if (!_listenedPackets.containsKey(packet.getClass()))
+ {
+ networkManager.handle(packet);
+ return;
+ }
+
+ boolean addDefaultPacket = true;
+
+ if (_packetVerifier != null)
+ {
+ if (!_packetVerifier.handlePacket(packet))
+ {
+ addDefaultPacket = false;
+ }
+ }
+
+ if (addDefaultPacket)
+ {
+ networkManager.handle(packet);
+ }
+ }
+
+ public void processIncomingPacket(final Packet packet)
+ {
+ if (!_listenedPackets.containsKey(packet.getClass()))
+ {
+ packet.a(_packetListener);
+ return;
+ }
+
+ if (!_packetListener.player.u().isMainThread() && _listenedPackets.get(packet.getClass()))
+ {
+ _packetListener.player.u().postToMainThread(new Runnable()
+ {
+ public void run()
+ {
+ processIncomingPacket(packet);
+ }
+ });
+
+ return;
+ }
+
+ boolean addDefaultPacket = true;
+
+ if (_packetVerifier != null)
+ {
+ if (!_packetVerifier.handlePacket(packet))
+ {
+ addDefaultPacket = false;
+ }
+ }
+
+ if (addDefaultPacket)
+ {
+ packet.a(_packetListener);
+ }
+ }
+
+ public void a(PacketPlayInChat packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInTabComplete packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInClientCommand packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInSettings packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInTransaction packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInEnchantItem packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInWindowClick packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInCloseWindow packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInCustomPayload packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInUseEntity packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInKeepAlive packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInFlying packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInAbilities packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInBlockDig packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInEntityAction packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInSteerVehicle packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInHeldItemSlot packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInSetCreativeSlot packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInUpdateSign packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInBlockPlace packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInSpectate packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInResourcePackStatus packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(PacketPlayInArmAnimation packet)
+ {
+ processIncomingPacket(packet);
+ }
+
+ public void a(IChatBaseComponent packet)
+ {
+ _packetListener.a(packet);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 9d23c6c..83a600c 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -27,6 +27,8 @@ import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
+import com.mineplex.spigot.PacketProcessor;
+
public class NetworkManager extends SimpleChannelInboundHandler<Packet> {
private static final Logger g = LogManager.getLogger();
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5740e49..5edef3e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -62,6 +62,8 @@ import org.bukkit.inventory.InventoryView;
import org.bukkit.util.NumberConversions;
// CraftBukkit end
+import com.mineplex.spigot.PacketProcessor;
+
public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerListBox {
private static final Logger c = LogManager.getLogger();
@@ -87,15 +89,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
private boolean checkMovement = true;
private boolean processedDisconnect; // CraftBukkit - added
+ public PacketProcessor PacketVerifier;
+
public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) {
this.minecraftServer = minecraftserver;
this.networkManager = networkmanager;
- networkmanager.a((PacketListener) this);
this.player = entityplayer;
entityplayer.playerConnection = this;
// CraftBukkit start - add fields and methods
this.server = minecraftserver.server;
+
+
+ PacketVerifier = new PacketProcessor(this);
+ networkmanager.a(PacketVerifier);
}
private final org.bukkit.craftbukkit.CraftServer server;
@@ -904,7 +911,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
try {
- this.networkManager.handle(packet);
+ PacketVerifier.processOutgoingPacket(packet, networkManager);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Sending packet");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Packet being sent");
@@ -1408,9 +1415,12 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
if (this.player.dead) return; // CraftBukkit
PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.u());
- CraftEventFactory.handleInventoryCloseEvent(this.player); // CraftBukkit
+ if (packetplayinclosewindow.id == player.activeContainer.windowId)
+ {
+ CraftEventFactory.handleInventoryCloseEvent(this.player); // CraftBukkit
- this.player.p();
+ this.player.p();
+ }
}
public void a(PacketPlayInWindowClick packetplayinwindowclick) {
--
1.9.5.msysgit.0

View File

@ -1,14 +1,14 @@
From 1ef159639f4e89be93c2dc0235097a587c8c5f5d Mon Sep 17 00:00:00 2001
From: Shaun Bennett <phination@me.com>
Date: Tue, 21 Apr 2015 19:56:41 -0400
Subject: [PATCH] Mineplex - Item/Inventory Changes
From 251376d9f0a36844f72d955fbc9334c34d8294a5 Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 21 Oct 2015 04:50:19 +1300
Subject: [PATCH] Inventory changes
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index a8028e3..5f62731 100644
index e9a3c50..9fd6359 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -437,8 +437,8 @@ public class CraftInventory implements Inventory {
@@ -441,8 +441,8 @@ public class CraftInventory implements Inventory {
return InventoryType.ENCHANTING;
} else if (inventory instanceof TileEntityBrewingStand) {
return InventoryType.BREWING;
@ -242,7 +242,7 @@ index 23f05f4..fdaf026 100644
return handle != null ? CraftMagicNumbers.getId(handle.getItem()) : 0;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/MinecraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/MinecraftInventory.java
new file mode 100644
index 0000000..d90d218
index 0000000..f0d8f81
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/MinecraftInventory.java
@@ -0,0 +1,177 @@
@ -423,7 +423,6 @@ index 0000000..d90d218
+ return new ChatComponentText(title);
+ }
+}
\ No newline at end of file
--
2.3.5
1.9.5.msysgit.0

View File

@ -1,26 +0,0 @@
From b09aac2ab0ed33d0b67b1bb0d4ab686bdcce0762 Mon Sep 17 00:00:00 2001
From: Shaun Bennett <phination@me.com>
Date: Tue, 21 Apr 2015 19:58:54 -0400
Subject: [PATCH] Mineplex - World Changes
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index db0697b..35b216b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1114,9 +1114,9 @@ public class CraftWorld implements World {
( (EntityOcelot) entity ).spawnBonus = false;
}
// Spigot end
- if (entity instanceof EntityInsentient) {
- ((EntityInsentient) entity).prepare(getHandle().E(new BlockPosition(entity)), (GroupDataEntity) null);
- }
+// if (entity instanceof EntityInsentient) {
+// ((EntityInsentient) entity).prepare(getHandle().E(new BlockPosition(entity)), (GroupDataEntity) null);
+// }
world.addEntity(entity, reason);
return (T) entity.getBukkitEntity();
--
2.3.5

View File

@ -1,21 +1,20 @@
From a253848782274cb79da16e13e8b5560fa2754a54 Mon Sep 17 00:00:00 2001
From: Shaun Bennett <phination@me.com>
Date: Tue, 21 Apr 2015 19:12:35 -0400
Subject: [PATCH] Mineplex - Entity Changes
From 2cd75b80dd6039fb20279d0d17a5429323ec2c18 Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 21 Oct 2015 04:56:35 +1300
Subject: [PATCH] Modifications to entities
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d6bef0b..c683d78 100644
index e345dd7..ee19bd6 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -124,6 +124,20 @@ public abstract class Entity implements ICommandListener {
public void inactiveTick() { }
// Spigot end
@@ -137,6 +137,31 @@ public abstract class Entity implements ICommandListener {
this.die();
}
+ // Mineplex
+ private boolean _silent;
+ private boolean _invisible;
+
+
+ public boolean isSilent()
+ {
+ return _silent;
@ -26,10 +25,22 @@ index d6bef0b..c683d78 100644
+ _silent = silent;
+ }
+
public int getId() {
return this.id;
}
@@ -683,7 +697,9 @@ public abstract class Entity implements ICommandListener {
+ public boolean isMineplexInvisible()
+ {
+ return _invisible;
+ }
+
+ public void setMineplexInvisible(boolean invisible)
+ {
+ _invisible = invisible;
+
+ setInvisible(isMineplexInvisible() || isInvisible());
+ }
+
public Entity(World world) {
this.id = Entity.entityCount++;
this.j = 1.0D;
@@ -684,7 +709,9 @@ public abstract class Entity implements ICommandListener {
this.makeSound(this.P(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
}
@ -40,32 +51,28 @@ index d6bef0b..c683d78 100644
block.a(this.world, blockposition, this); // CraftBukkit moved from above
}
}
@@ -785,7 +801,7 @@ public abstract class Entity implements ICommandListener {
@@ -786,7 +813,7 @@ public abstract class Entity implements ICommandListener {
}
public void makeSound(String s, float f, float f1) {
- if (!this.R()) {
+ if (!isSilent() || !this.R()) {
+ if (!isSilent() && !this.R()) {
this.world.makeSound(this, s, f, f1);
}
@@ -1536,8 +1552,8 @@ public abstract class Entity implements ICommandListener {
@@ -1537,8 +1564,8 @@ public abstract class Entity implements ICommandListener {
if (entity == null) {
if (this.vehicle != null) {
// CraftBukkit start
- if ((this.bukkitEntity instanceof LivingEntity) && (this.vehicle.getBukkitEntity() instanceof Vehicle)) {
- VehicleExitEvent event = new VehicleExitEvent((Vehicle) this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
+ if (this.bukkitEntity instanceof LivingEntity) {
+ if ((this.bukkitEntity instanceof LivingEntity)) {
+ VehicleExitEvent event = new VehicleExitEvent(this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
pluginManager.callEvent(event);
if (event.isCancelled() || vehicle != originalVehicle) {
@@ -1553,11 +1569,11 @@ public abstract class Entity implements ICommandListener {
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, true)) {
+ if ((this.bukkitEntity instanceof LivingEntity) && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4, true)) {
@@ -1557,8 +1584,8 @@ public abstract class Entity implements ICommandListener {
if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle) && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4, true)) {
// 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) {
@ -75,30 +82,9 @@ index d6bef0b..c683d78 100644
pluginManager.callEvent(exitEvent);
if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
@@ -1679,9 +1695,20 @@ public abstract class Entity implements ICommandListener {
}
public void setInvisible(boolean flag) {
+ if (isMineplexInvisible() && !flag)
+ return;
+
this.b(5, flag);
}
+ public boolean isMineplexInvisible() {
+ return _invisible;
+ }
+
+ public void setMineplexInvisible(boolean flag) {
+ _invisible = flag;
+ }
+
public void f(boolean flag) {
this.b(4, flag);
}
diff --git a/src/main/java/net/minecraft/server/EntityBat.java b/src/main/java/net/minecraft/server/EntityBat.java
new file mode 100644
index 0000000..bffd3dc
index 0000000..c078fa6
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EntityBat.java
@@ -0,0 +1,206 @@
@ -308,9 +294,10 @@ index 0000000..bffd3dc
+ return this.length / 2.0F;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java
new file mode 100644
index 0000000..53da5c2
index 0000000..a759e00
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EntityBlaze.java
@@ -0,0 +1,207 @@
@ -336,9 +323,9 @@ index 0000000..53da5c2
+
+ protected void initAttributes() {
+ super.initAttributes();
+ this.getAttributeInstance(GenericAttributes.e).setValue(6.0D);
+ this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
+ this.getAttributeInstance(GenericAttributes.b).setValue(48.0D);
+ this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(6.0D);
+ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.23000000417232513D);
+ this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(48.0D);
+ }
+
+ protected void h() {
@ -521,12 +508,13 @@ index 0000000..53da5c2
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 4bdcfc6..9539b66 100644
index d246ae7..ed7f549 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -60,6 +60,18 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
super.h();
@@ -51,6 +51,18 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
this.ah = true;
}
+ public void setTargetBlock(int x, int y, int z) {
@ -534,16 +522,16 @@ index 4bdcfc6..9539b66 100644
+ this.a = x;
+ this.b = y;
+ this.c = z;
+ this.bA = null;
+ this.target = null;
+ }
+
+ public void setTargetEntity(Entity e) {
+ this.bA = e;
+ this.target = e;
+ }
+
public double[] b(int i, float f) {
if (this.getHealth() <= 0.0F) {
f = 0.0F;
protected void initAttributes() {
super.initAttributes();
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(200.0D);
@@ -170,7 +182,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
this.c += this.random.nextGaussian() * 2.0D;
}
@ -563,7 +551,7 @@ index 4bdcfc6..9539b66 100644
this.a(this.world.getEntities(this, this.bt.getBoundingBox().grow(4.0D, 2.0D, 4.0D).c(0.0D, -2.0D, 0.0D)));
this.b(this.world.getEntities(this, this.bn.getBoundingBox().grow(1.0D, 1.0D, 1.0D)));
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index ce91553..59ada33 100644
index 7a42040..d3403a1 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -17,6 +17,8 @@ public class EntityFallingBlock extends Entity {
@ -575,32 +563,25 @@ index ce91553..59ada33 100644
public EntityFallingBlock(World world) {
super(world);
}
@@ -42,7 +44,7 @@ public class EntityFallingBlock extends Entity {
@@ -42,7 +44,15 @@ public class EntityFallingBlock extends Entity {
protected void h() {}
public boolean ad() {
- return !this.dead;
+ return !this.dead && !spectating;
}
public void t_() {
@@ -219,6 +221,14 @@ public class EntityFallingBlock extends Entity {
}
+ }
+
+ @Override
+ public boolean damageEntity(DamageSource damagesource, float f)
+ {
+ CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f);
+
+ return true;
+ }
+
public void a(boolean flag) {
this.hurtEntities = flag;
}
public void t_() {
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index 688099f..404dda2 100644
index f131419..f293118 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -125,6 +125,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
@ -614,7 +595,7 @@ index 688099f..404dda2 100644
this.datawatcher.watch(16, Integer.valueOf(j | i));
} else {
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index d73395a..7a9eacb 100644
index eb54e7f..66c3d0c 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -133,7 +133,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -627,63 +608,25 @@ index d73395a..7a9eacb 100644
this.b(itemstack, 5);
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 9621ce0..463d578 100644
index a8a327d..b7647bc 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -35,6 +35,10 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -34,6 +34,10 @@ public abstract class EntityInsentient extends EntityLiving {
private Entity bp;
private NBTTagCompound bq;
+ private boolean _vegetated;
+ private boolean _shouldBreakLeash;
+ private boolean _pullWhileLeashed;
+ private boolean _shouldBreakLeash = true;
+ private boolean _pullWhileLeashed = true;
+
public EntityInsentient(World world) {
super(world);
this.goalSelector = new PathfinderGoalSelector(world != null && world.methodProfiler != null ? world.methodProfiler : null);
@@ -53,6 +57,11 @@ public abstract class EntityInsentient extends EntityLiving {
// CraftBukkit start - default persistance to type's persistance value
@@ -53,6 +57,32 @@ public abstract class EntityInsentient extends EntityLiving {
this.persistent = !isTypeNotPersistent();
// CraftBukkit end
+
+ // Mineplex
+ _vegetated = false;
+ _shouldBreakLeash = true;
+ _pullWhileLeashed = true;
}
protected void initAttributes() {
@@ -149,7 +158,7 @@ public abstract class EntityInsentient extends EntityLiving {
public void K() {
super.K();
this.world.methodProfiler.a("mobBaseTick");
- if (this.isAlive() && this.random.nextInt(1000) < this.a_++) {
+ if (this.isAlive() && !isSilent() && this.random.nextInt(1000) < this.a_++) {
this.a_ = -this.w();
this.x();
}
@@ -771,7 +780,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
public final boolean e(EntityHuman entityhuman) {
- if (this.cc() && this.getLeashHolder() == entityhuman) {
+ if (this.cc() && this.getLeashHolder() == entityhuman && _shouldBreakLeash) {
// CraftBukkit start - fire PlayerUnleashEntityEvent
if (CraftEventFactory.callPlayerUnleashEntityEvent(this, entityhuman).isCancelled()) {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutAttachEntity(1, this, this.getLeashHolder()));
@@ -836,7 +845,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
public void unleash(boolean flag, boolean flag1) {
- if (this.bo) {
+ if (this.bo && _shouldBreakLeash) {
this.bo = false;
this.bp = null;
if (!this.world.isClientSide && flag1) {
@@ -936,6 +945,32 @@ public abstract class EntityInsentient extends EntityLiving {
return this.datawatcher.getByte(15) != 0;
}
+
+ public void setVegetated(boolean flag) {
+ _vegetated = flag;
+ }
@ -709,24 +652,60 @@ index 9621ce0..463d578 100644
+ public boolean shouldPullWhileLeashed() {
+ return _pullWhileLeashed;
+ }
+
public static enum EnumEntityPositionType {
ON_GROUND, IN_AIR, IN_WATER;
protected void initAttributes() {
super.initAttributes();
@@ -148,7 +178,7 @@ public abstract class EntityInsentient extends EntityLiving {
public void K() {
super.K();
this.world.methodProfiler.a("mobBaseTick");
- if (this.isAlive() && this.random.nextInt(1000) < this.a_++) {
+ if (!isSilent() && this.isAlive() && this.random.nextInt(1000) < this.a_++) {
this.a_ = -this.w();
this.x();
}
@@ -770,7 +800,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
public final boolean e(EntityHuman entityhuman) {
- if (this.cc() && this.getLeashHolder() == entityhuman) {
+ if (this.cc() && this.getLeashHolder() == entityhuman && _shouldBreakLeash) {
// CraftBukkit start - fire PlayerUnleashEntityEvent
if (CraftEventFactory.callPlayerUnleashEntityEvent(this, entityhuman).isCancelled()) {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutAttachEntity(1, this, this.getLeashHolder()));
@@ -835,7 +865,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
public void unleash(boolean flag, boolean flag1) {
- if (this.bo) {
+ if (this.bo && _shouldBreakLeash) {
this.bo = false;
this.bp = null;
if (!this.world.isClientSide && flag1) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 99b120a..12d735d 100644
index 3c852fd..b861dbe 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -97,6 +97,8 @@ public abstract class EntityLiving extends Entity {
}
// Spigot end
+ private boolean _ghost;
+
public void G() {
@@ -101,6 +101,18 @@ public abstract class EntityLiving extends Entity {
this.damageEntity(DamageSource.OUT_OF_WORLD, Float.MAX_VALUE);
}
@@ -1782,7 +1784,7 @@ public abstract class EntityLiving extends Entity {
+ private boolean _ghost;
+
+ public boolean isGhost()
+ {
+ return _ghost;
+ }
+
+ public void setGhost(boolean ghost)
+ {
+ _ghost = ghost;
+ }
+
public EntityLiving(World world) {
super(world);
this.initAttributes();
@@ -1783,7 +1795,7 @@ public abstract class EntityLiving extends Entity {
}
public boolean ad() {
@ -735,30 +714,16 @@ index 99b120a..12d735d 100644
}
public boolean ae() {
@@ -1836,4 +1838,12 @@ public abstract class EntityLiving extends Entity {
protected void bP() {
this.updateEffects = true;
}
+
+ public boolean isGhost() {
+ return _ghost;
+ }
+
+ public void setGhost(boolean ghost) {
+ _ghost = ghost;
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 3854edf..c52d591 100644
index 3810f86..44ac587 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -65,10 +65,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -65,10 +65,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// Spigot start
public boolean collidesWithEntities = true;
+ // Mineplex
+ public boolean spectating;
+
+
@Override
public boolean ad()
{
@ -768,20 +733,19 @@ index 3854edf..c52d591 100644
@Override
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 2d22327..3aa9467 100644
index 2d22327..83e71c1 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -9,6 +9,9 @@ public class EntityTNTPrimed extends Entity {
@@ -9,6 +9,8 @@ public class EntityTNTPrimed extends Entity {
public float yield = 4; // CraftBukkit - add field
public boolean isIncendiary = false; // CraftBukkit - add field
+ // Mineplex
+ public boolean spectating;
+
public EntityTNTPrimed(World world) {
super(world);
this.k = true;
@@ -37,7 +40,7 @@ public class EntityTNTPrimed extends Entity {
@@ -37,7 +39,7 @@ public class EntityTNTPrimed extends Entity {
}
public boolean ad() {
@ -790,77 +754,103 @@ index 2d22327..3aa9467 100644
}
public void t_() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 49c7fa6..0cd36e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -836,7 +836,7 @@ public class CraftWorld implements World {
public <T> void playEffect(Location loc, Effect effect, T data, int radius) {
if (data != null) {
- Validate.isTrue(data.getClass().isAssignableFrom(effect.getData()), "Wrong kind of data for this effect!");
+ Validate.isTrue(data.getClass().equals(effect.getData()), "Wrong kind of data for this effect!");
} else {
Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!");
}
@@ -1122,10 +1122,6 @@ public class CraftWorld implements World {
public <T extends Entity> T addEntity(net.minecraft.server.Entity entity, SpawnReason reason) throws IllegalArgumentException {
Preconditions.checkArgument(entity != null, "Cannot spawn null entity");
- if (entity instanceof EntityInsentient) {
- ((EntityInsentient) entity).prepare(getHandle().E(new BlockPosition(entity)), (GroupDataEntity) null);
- }
-
world.addEntity(entity, reason);
return (T) entity.getBukkitEntity();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 5317cff..3ab939f 100644
index 5317cff..60e8584 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -461,6 +461,54 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return true;
@@ -74,6 +74,46 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
}
+ @Override
+ public boolean shouldBreakLeash()
+ {
+ return ((EntityInsentient) getHandle()).shouldBreakLeash();
+ }
+
+ @Override
+ public void setShouldBreakLeash(boolean shouldBreakLeash)
+ {
+ ((EntityInsentient) getHandle()).setShouldBreakLeash(shouldBreakLeash);
+ }
+
+ @Override
+ public boolean shouldPullWhileLeashed()
+ {
+ return ((EntityInsentient) getHandle()).shouldPullWhileLeashed();
+ }
+
+ @Override
+ public void setPullWhileLeashed(boolean pullWhileLeashed)
+ {
+ ((EntityInsentient) getHandle()).setPullWhileLeashed(pullWhileLeashed);
+ }
+
+ @Override
+ public boolean isVegetated()
+ {
+ return ((EntityInsentient) getHandle()).isVegetated();
+ }
+
+ @Override
+ public void setVegetated(boolean vegetated)
+ {
+ ((EntityInsentient) getHandle()).setVegetated(vegetated);
+ }
+
+ @Override
+ public boolean isGhost()
+ {
+ return getHandle().isGhost();
+ }
+
+ @Override
+ public void setGhost(boolean ghost)
+ {
+ getHandle().setGhost(ghost);
+ }
+
@Deprecated
public int _INVALID_getLastDamage() {
return NumberConversions.ceil(getLastDamage());
public double getHealth() {
return Math.min(Math.max(0, getHandle().getHealth()), getMaxHealth());
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 06e014c..0adc2a9 100644
index 29082aa..2d508b0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -874,10 +874,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -325,7 +325,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public <T> void playEffect(Location loc, Effect effect, T data) {
if (data != null) {
- Validate.isTrue(data.getClass().isAssignableFrom(effect.getData()), "Wrong kind of data for this effect!");
+ Validate.isTrue(data.getClass().equals(effect.getData()), "Wrong kind of data for this effect!");
} else {
Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!");
}
@@ -870,10 +870,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void hidePlayer(Player player) {
+ hidePlayer(player, false, true);
+ }
+
+ public void hidePlayer(Player player, boolean override, boolean hideList) {
+ public void hidePlayer(Player player, boolean override, boolean hideList)
+ {
Validate.notNull(player, "hidden player cannot be null");
if (getHandle().playerConnection == null) return;
if (equals(player)) return;
@ -869,7 +859,7 @@ index 06e014c..0adc2a9 100644
hiddenPlayers.add(player.getUniqueId());
//remove this player from the hidden player's EntityTrackerEntry
@@ -889,7 +893,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -885,7 +890,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
//remove the hidden player from this player user list
@ -879,23 +869,22 @@ index 06e014c..0adc2a9 100644
}
@Override
@@ -1336,13 +1341,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1363,13 +1369,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public boolean getCollidesWithEntities()
{
- return getHandle().collidesWithEntities;
+ return !getHandle().spectating;
+// return getHandle().collidesWithEntities;
}
@Override
public void setCollidesWithEntities(boolean collides)
{
- getHandle().collidesWithEntities = collides;
+ getHandle().spectating = !collides;
+ getHandle().spectating = collides;
getHandle().k = collides; // First boolean of Entity
}
--
2.3.5
1.9.5.msysgit.0

View File

@ -1,7 +1,7 @@
From a5eac8e0980212f40add58f975a652313d6a1a3d Mon Sep 17 00:00:00 2001
From: Shaun Bennett <phination@me.com>
Date: Sun, 19 Apr 2015 01:54:13 -0400
Subject: [PATCH] Mineplex - Chunk Changes
From 2cb042088947c79ccde8d49ad957a861120ba57d Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 21 Oct 2015 04:57:46 +1300
Subject: [PATCH] Add Mineplex chunk events, misc modifications.
diff --git a/src/main/java/com/mineplex/spigot/ChunkAddEntityEvent.java b/src/main/java/com/mineplex/spigot/ChunkAddEntityEvent.java
@ -43,7 +43,7 @@ index 0000000..3f16935
+}
diff --git a/src/main/java/com/mineplex/spigot/ChunkPreLoadEvent.java b/src/main/java/com/mineplex/spigot/ChunkPreLoadEvent.java
new file mode 100644
index 0000000..21d75c7
index 0000000..564efe6
--- /dev/null
+++ b/src/main/java/com/mineplex/spigot/ChunkPreLoadEvent.java
@@ -0,0 +1,60 @@
@ -99,7 +99,7 @@ index 0000000..21d75c7
+ @Override
+ public HandlerList getHandlers()
+ {
+ return null;
+ return handlers;
+ }
+
+ public static HandlerList getHandlerList()
@ -108,7 +108,7 @@ index 0000000..21d75c7
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index d5922fe..0a0e778 100644
index 022ba31..464d0c2 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -11,6 +11,8 @@ import java.util.Map;
@ -142,7 +142,7 @@ index d5922fe..0a0e778 100644
this.done = flag;
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 74710f9..b0d132f 100644
index 975d666..a55bd6c 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -8,6 +8,8 @@ import java.util.Iterator;
@ -230,6 +230,54 @@ index 74710f9..b0d132f 100644
if (server != null) {
/*
* If it's a new world, the first few chunks are generated inside
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index c30867d..b86369b 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -132,7 +132,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
System.err.println( "If you do not agree to the above EULA please stop your server and remove this flag immediately." );
}
// Spigot End
- if (!this.p.a() && !eulaAgreed) { // Spigot
+ if (false && !this.p.a() && !eulaAgreed) { // Spigot
DedicatedServer.LOGGER.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
this.p.b();
return false;
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index 4f280dd..73a288c 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -59,7 +59,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
this.A();
}
- private void A() {
+ public void A() {
if (this.i && this.j > 0 && !this.world.isClientSide && this.k > 0) {
double d0 = (double) (this.j * 10 + 10);
byte b0 = 0;
@@ -94,7 +94,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
}
- private void B() {
+ public void B() {
int i = this.j;
int j = this.position.getX();
int k = this.position.getY();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2759425..f57c785 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -412,7 +412,7 @@ public final class CraftServer implements Server {
int delta = Integer.MAX_VALUE;
for (Player player : getOnlinePlayers()) {
if (player.getName().toLowerCase().startsWith(lowerName)) {
- int curDelta = Math.abs(player.getName().length() - lowerName.length());
+ int curDelta = player.getName().length() - lowerName.length();
if (curDelta < delta) {
found = player;
delta = curDelta;
--
2.3.5
1.9.5.msysgit.0

Binary file not shown.