163 lines
3.8 KiB
Diff
163 lines
3.8 KiB
Diff
From 8d364bbf8ea9d6632348ca84c5b075bcbe78098b Mon Sep 17 00:00:00 2001
|
|
From: Shaun Bennett <shaun@mineplex.com>
|
|
Date: Sat, 29 Nov 2014 23:14:25 -0600
|
|
Subject: [PATCH] Mineplex Changes
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
|
|
index 364451b..31dfe8e 100644
|
|
--- a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
|
|
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
|
|
@@ -1,21 +1,24 @@
|
|
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 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;
|
|
}
|
|
|
|
/**
|
|
@@ -35,6 +38,11 @@ public class VehicleExitEvent extends VehicleEvent implements Cancellable {
|
|
this.cancelled = cancel;
|
|
}
|
|
|
|
+ public Entity getVehicle()
|
|
+ {
|
|
+ return vehicle;
|
|
+ }
|
|
+
|
|
@Override
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
diff --git a/src/main/java/org/bukkit/event/world/ChunkAddEntityEvent.java b/src/main/java/org/bukkit/event/world/ChunkAddEntityEvent.java
|
|
new file mode 100644
|
|
index 0000000..6a2b07a
|
|
--- /dev/null
|
|
+++ b/src/main/java/org/bukkit/event/world/ChunkAddEntityEvent.java
|
|
@@ -0,0 +1,35 @@
|
|
+package org.bukkit.event.world;
|
|
+
|
|
+import org.bukkit.entity.Entity;
|
|
+import org.bukkit.event.Event;
|
|
+import org.bukkit.event.HandlerList;
|
|
+
|
|
+/**
|
|
+ * Created by Shaun on 11/29/2014.
|
|
+ */
|
|
+public class ChunkAddEntityEvent extends Event
|
|
+{
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
+ private Entity _entity;
|
|
+
|
|
+ public ChunkAddEntityEvent(Entity entity)
|
|
+ {
|
|
+ _entity = entity;
|
|
+ }
|
|
+
|
|
+ public HandlerList getHandlers()
|
|
+ {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ public static HandlerList getHandlerList()
|
|
+ {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ public Entity getEntity()
|
|
+ {
|
|
+ return _entity;
|
|
+ }
|
|
+
|
|
+}
|
|
diff --git a/src/main/java/org/bukkit/event/world/ChunkPreLoadEvent.java b/src/main/java/org/bukkit/event/world/ChunkPreLoadEvent.java
|
|
new file mode 100644
|
|
index 0000000..6764e30
|
|
--- /dev/null
|
|
+++ b/src/main/java/org/bukkit/event/world/ChunkPreLoadEvent.java
|
|
@@ -0,0 +1,62 @@
|
|
+package org.bukkit.event.world;
|
|
+
|
|
+import org.bukkit.World;
|
|
+import org.bukkit.event.Cancellable;
|
|
+import org.bukkit.event.Event;
|
|
+import org.bukkit.event.HandlerList;
|
|
+
|
|
+/**
|
|
+ * Created by Shaun on 11/29/2014.
|
|
+ */
|
|
+public class ChunkPreLoadEvent extends Event implements Cancellable
|
|
+{
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
+ private boolean _cancelled;
|
|
+ private World _world;
|
|
+ private int _x;
|
|
+ private int _z;
|
|
+
|
|
+ public ChunkPreLoadEvent(World world, int x, int z)
|
|
+ {
|
|
+ _world = world;
|
|
+ _x = x;
|
|
+ _z = z;
|
|
+ }
|
|
+
|
|
+ public HandlerList getHandlers()
|
|
+ {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ public static HandlerList getHandlerList()
|
|
+ {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ public World getWorld()
|
|
+ {
|
|
+ return _world;
|
|
+ }
|
|
+
|
|
+ public int getX()
|
|
+ {
|
|
+ return _x;
|
|
+ }
|
|
+
|
|
+ public int getZ()
|
|
+ {
|
|
+ return _z;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean isCancelled()
|
|
+ {
|
|
+ return _cancelled;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setCancelled(boolean cancel)
|
|
+ {
|
|
+ _cancelled = cancel;
|
|
+ }
|
|
+}
|
|
--
|
|
1.9.4.msysgit.0
|
|
|