Mineplex2018-withcommit/Patches/Bukkit-Patches/0030-Mineplex-Entity-Changes.patch
2015-04-22 16:20:39 -04:00

90 lines
3.0 KiB
Diff

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