Archiviert
13
0

Pull a series of CraftBukkit patches - see below for summary and credits:

Bukkit/CraftBukkit#1145 : @Zarius : Don't fire piston extend event twice
Bukkit/CraftBukkit#1174 : @millerkil : Prevent plugins causing ghost players
Bukkit/CraftBukkit#1177 : @jb-aero : Properly set ambient flag for potion effects
Dieser Commit ist enthalten in:
md_5 2013-07-05 12:17:22 +10:00
Ursprung 693b2872b1
Commit 3601ca3da5
3 geänderte Dateien mit 85 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,22 @@
From 3f3055e1d22a5e282a55b2e522c747ba02aee471 Mon Sep 17 00:00:00 2001
From: Zarius <zariust@gmail.com>
Date: Thu, 25 Apr 2013 03:08:24 +1000
Subject: [PATCH] Don't Fire PistonExtendEvent Twice
Set data earlier for BlockPiston when extending. Fixes BUKKIT-3523
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
index 2d9e766..b2c8499 100644
--- a/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
@@ -71,6 +71,7 @@ public class BlockPiston extends Block {
if (event.isCancelled()) {
return;
}
+ world.setData(i, j, k, i1 | 8, 2);
// CraftBukkit end
world.playNote(i, j, k, this.id, 0, i1);
--
1.8.1.2

Datei anzeigen

@ -0,0 +1,24 @@
From 43802c41faf4edae4752b4ab06cb36ab19ef2e35 Mon Sep 17 00:00:00 2001
From: Alex Ciuba <alexciuba@gmail.com>
Date: Tue, 11 Jun 2013 15:23:03 -0400
Subject: [PATCH] Prevent Ghost Players Caused by Plugins
Check if the player is still connected after firing event. Fixes BUKKIT-4327
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index cbe823f..f33fdc1 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -420,6 +420,9 @@ public abstract class PlayerList {
Player respawnPlayer = this.cserver.getPlayer(entityplayer1);
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
this.cserver.getPluginManager().callEvent(respawnEvent);
+ if (entityplayer.playerConnection.disconnected) {
+ return entityplayer;
+ }
location = respawnEvent.getRespawnLocation();
entityplayer.reset();
--
1.8.1.2

Datei anzeigen

@ -0,0 +1,39 @@
From 183a4c8ebcc8c7b52496fbe4cba25a8bb58e7676 Mon Sep 17 00:00:00 2001
From: Jim Bilbrey <jb_aero@verizon.net>
Date: Wed, 19 Jun 2013 05:38:05 -0400
Subject: [PATCH] Define Ambient Setting of Potion Effects
Use ambient setting of potion effects. Fixes BUKKIT-4357 and BUKKIT-3653
This changes livingEntity.addPotionEffect(PotionEffect, boolean) to
construct the MobEffect using the constructor that includes the ambient
setting as supplied by the PotionEffect
This also changes livingEntity.getActivePotionEffects() to construct the
PotionEffects using the ambient setting supplied by the MobEffects.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1d52866..9d9320f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -258,7 +258,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
removePotionEffect(effect.getType());
}
- getHandle().addEffect(new MobEffect(effect.getType().getId(), effect.getDuration(), effect.getAmplifier()));
+ getHandle().addEffect(new MobEffect(effect.getType().getId(), effect.getDuration(), effect.getAmplifier(), effect.isAmbient()));
return true;
}
@@ -284,7 +284,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (!(raw instanceof MobEffect))
continue;
MobEffect handle = (MobEffect) raw;
- effects.add(new PotionEffect(PotionEffectType.getById(handle.getEffectId()), handle.getDuration(), handle.getAmplifier()));
+ effects.add(new PotionEffect(PotionEffectType.getById(handle.getEffectId()), handle.getDuration(), handle.getAmplifier(), handle.isAmbient()));
}
return effects;
}
--
1.8.1.2