summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPlayer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityPlayer.patch')
-rw-r--r--nms-patches/EntityPlayer.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch
index 32668f0a..b0f91e15 100644
--- a/nms-patches/EntityPlayer.patch
+++ b/nms-patches/EntityPlayer.patch
@@ -175,7 +175,7 @@
this.playerConnection.sendPacket(new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, flag));
- if (flag) {
-- ScoreboardTeamBase scoreboardteambase = this.aW();
+- ScoreboardTeamBase scoreboardteambase = this.aY();
+ // CraftBukkit start - fire PlayerDeathEvent
+ if (this.dead) {
+ return;
@@ -205,7 +205,7 @@
+
+ if (deathMessage != null && deathMessage.length() > 0 && flag) { // TODO: allow plugins to override?
+ if (deathMessage.equals(deathmessage)) {
-+ ScoreboardTeamBase scoreboardteambase = this.aW();
++ ScoreboardTeamBase scoreboardteambase = this.aY();
+
+ if (scoreboardteambase != null && scoreboardteambase.getDeathMessageVisibility() != ScoreboardTeamBase.EnumNameTagVisibility.ALWAYS) {
+ if (scoreboardteambase.getDeathMessageVisibility() == ScoreboardTeamBase.EnumNameTagVisibility.HIDE_FOR_OTHER_TEAMS) {
@@ -224,7 +224,7 @@
this.releaseShoulderEntities();
- if (!this.world.getGameRules().getBoolean("keepInventory") && !this.isSpectator()) {
-- this.cT();
+- this.cV();
- this.inventory.o();
+ // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
+ if (!event.getKeepInventory()) {
@@ -287,7 +287,7 @@
- private Collection<ScoreboardObjective> E(Entity entity) {
+ private Collection<ScoreboardScore> E(Entity entity) { // CraftBukkit
- String s = entity instanceof EntityHuman ? entity.getName() : entity.bl();
+ String s = entity instanceof EntityHuman ? entity.getName() : entity.bn();
ScoreboardTeam scoreboardteam = this.getScoreboard().getPlayerTeam(this.getName());
@@ -420,7 +539,10 @@