From cf41a6add236b92530ba161561b0261878f5a10b Mon Sep 17 00:00:00 2001 From: garbagemule Date: Wed, 22 Jan 2014 13:59:17 +0100 Subject: [PATCH] Add per-arena setting: show-death-messages --- resources/res/settings.yml | 3 ++- src/com/garbagemule/MobArena/ArenaListener.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/res/settings.yml b/resources/res/settings.yml index 2d23419..7c6b3d4 100644 --- a/resources/res/settings.yml +++ b/resources/res/settings.yml @@ -37,4 +37,5 @@ display-timer-as-level: false use-scoreboards: true isolated-chat: false global-join-announce: false -global-end-announce: false \ No newline at end of file +global-end-announce: false +show-death-messages: true \ No newline at end of file diff --git a/src/com/garbagemule/MobArena/ArenaListener.java b/src/com/garbagemule/MobArena/ArenaListener.java index 105d448..01312c9 100644 --- a/src/com/garbagemule/MobArena/ArenaListener.java +++ b/src/com/garbagemule/MobArena/ArenaListener.java @@ -440,6 +440,9 @@ public class ArenaListener callKillEvent(player.getKiller(), player); } arena.playerDeath(player); + if (!arena.getSettings().getBoolean("show-death-messages", true)) { + event.setDeathMessage(null); + } } else if (arena.inSpec(player)) { event.getDrops().clear(); event.setDroppedExp(0);