Always call dismount events regardless of Vehicle or not

This commit is contained in:
md_5 2013-07-08 09:21:54 +10:00
parent 8674b1053d
commit 0bab96762d
7 changed files with 19 additions and 41 deletions

View File

@ -1,4 +1,4 @@
From 0fb748388764f2af006cbcf7ccc3ffab31d67f0c Mon Sep 17 00:00:00 2001
From 0f96805a0dee1a523dab9f3de7dbe365aa039ef3 Mon Sep 17 00:00:00 2001
From: Antony Riley <antony@cyberiantiger.org>
Date: Wed, 27 Mar 2013 01:41:54 +0200
Subject: [PATCH] Close Unloaded Save Files
@ -18,7 +18,7 @@ index 900ed68..829f4a3 100644
public static synchronized RegionFile a(File file1, int i, int j) {
File file2 = new File(file1, "region");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6e6fe1c..b49519a 100644
index 8148f9b..3addae3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer;
@ -30,7 +30,7 @@ index 6e6fe1c..b49519a 100644
import net.minecraft.server.ServerNBTManager;
import net.minecraft.server.WorldLoaderServer;
import net.minecraft.server.WorldManager;
@@ -811,6 +813,30 @@ public final class CraftServer implements Server {
@@ -813,6 +815,30 @@ public final class CraftServer implements Server {
worlds.remove(world.getName().toLowerCase());
console.worlds.remove(console.worlds.indexOf(handle));

View File

@ -1,4 +1,4 @@
From d7e7843516ef6d7256ec3ff874e3ede7c16922b3 Mon Sep 17 00:00:00 2001
From 72b6dbf8b063587dad4e70dfa15d6ce14347a52a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 16 Jun 2013 08:20:26 +1000
Subject: [PATCH] Do Not Search for Offline Players
@ -6,10 +6,10 @@ Subject: [PATCH] Do Not Search for Offline Players
By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b49519a..bcbf8d7 100644
index 3addae3..a1fe1f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1088,7 +1088,7 @@ public final class CraftServer implements Server {
@@ -1090,7 +1090,7 @@ public final class CraftServer implements Server {
}
public OfflinePlayer getOfflinePlayer(String name) {

View File

@ -1,14 +1,14 @@
From 773047f77ed882b4ea5e5b25598a216224050a39 Mon Sep 17 00:00:00 2001
From 3025731337f0e93defc178f6ffebc3308e722598 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:05:54 +1000
Subject: [PATCH] Allow Disabling of Command TabComplete
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bcbf8d7..def0519 100644
index a1fe1f2..f356538 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1355,7 +1355,7 @@ public final class CraftServer implements Server {
@@ -1357,7 +1357,7 @@ public final class CraftServer implements Server {
public List<String> tabCompleteCommand(Player player, String message) {
List<String> completions = null;
try {

View File

@ -1,4 +1,4 @@
From 6041ff35b3b180bb6b0c77b81143934f229005d5 Mon Sep 17 00:00:00 2001
From a78cb65a00236b38edcf758fb5d9834c26639fc1 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 19:21:58 +1000
Subject: [PATCH] Configurable Messages
@ -27,10 +27,10 @@ index 1276ec4..cbe823f 100644
event.disallow(PlayerLoginEvent.Result.ALLOWED, s2);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index def0519..58da9cb 100644
index f356538..100396f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -526,7 +526,7 @@ public final class CraftServer implements Server {
@@ -528,7 +528,7 @@ public final class CraftServer implements Server {
return true;
}

View File

@ -1,21 +1,21 @@
From 27928f3910adc76ee6a1b59a7c4d0d9f521260d0 Mon Sep 17 00:00:00 2001
From dc989aecc7c147d1b86e9c92739db6f996c9213a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 20:32:49 +1000
Subject: [PATCH] Entity Mount and Dismount Events
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 8fbf811..fe0b43a 100644
index 8fbf811..3b1d9e4 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1409,6 +1409,7 @@ public abstract class Entity {
if ((this.bukkitEntity instanceof LivingEntity) && (this.vehicle.getBukkitEntity() instanceof Vehicle)) {
VehicleExitEvent event = new VehicleExitEvent((Vehicle) this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
@@ -1411,6 +1411,7 @@ public abstract class Entity {
pluginManager.callEvent(event);
+ pluginManager.callEvent( new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ) ); // Spigot
}
// CraftBukkit end
+ pluginManager.callEvent( new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ) ); // Spigot
this.setPositionRotation(this.vehicle.locX, this.vehicle.boundingBox.b + (double) this.vehicle.length, this.vehicle.locZ, this.yaw, this.pitch);
this.vehicle.passenger = null;
@@ -1428,6 +1429,17 @@ public abstract class Entity {
}
}

View File

@ -1,4 +1,4 @@
From ebda44887d817a442cb4073d3ba3aaaf1fc22ae2 Mon Sep 17 00:00:00 2001
From e867d1a24268826a4ee4e655243c2cbfd73d4057 Mon Sep 17 00:00:00 2001
From: Phillip Schichtel <quick_wango@code-infection.de>
Date: Fri, 5 Jul 2013 21:55:00 +1000
Subject: [PATCH] Console Command Completion

View File

@ -1,22 +0,0 @@
From 60f414fa65a5d1d43bbc7174ab8f747ad49d1dc9 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 5 Jul 2013 21:55:00 +1000
Subject: [PATCH] Fix Entity Persistance
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index f913a40..a91c5d6 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -390,7 +390,7 @@ public abstract class EntityInsentient extends EntityLiving {
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
- if (d3 > 16384.0D) { // CraftBukkit - remove isTypeNotPersistent() check
+ if (this.isTypeNotPersistent() && d3 > 16384.0D) { // Spigot - md_5: I think CraftBukkit dun derped by altering this
this.die();
}
--
1.8.1.2