Begin implementation of CheckStyle style checking

This commit is contained in:
md_5
2019-04-23 14:00:30 +10:00
parent a2d787f6eb
commit 48c4c5ca81
28 changed files with 144 additions and 97 deletions

View File

@@ -279,16 +279,15 @@
this.releaseShoulderEntities();
- if (!this.isSpectator()) {
- this.d(damagesource);
- }
+ // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
+ if (!event.getKeepInventory()) {
+ this.inventory.clear();
+ }
+
+ this.setSpectatorTarget(this); // Remove spectated target
+ // CraftBukkit end
}
- this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.DEATH_COUNT, this.getName(), ScoreboardScore::incrementScore);
+ this.setSpectatorTarget(this); // Remove spectated target
+ // CraftBukkit end
+
+ // CraftBukkit - Get our scores instead
+ this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.DEATH_COUNT, this.getName(), ScoreboardScore::incrementScore);
EntityLiving entityliving = this.getKillingEntity();