Update to Minecraft 1.12

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-06-08 18:00:00 +10:00
parent 7b45ff54ad
commit ea595a5dcf
32 changed files with 65 additions and 98 deletions

View File

@@ -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 @@