mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Because some plugins do stupid things.
This commit is contained in:
parent
365abaaa8f
commit
30f5c761d9
@ -59,9 +59,15 @@ public class PlayerListener implements Listener {
|
|||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onPlayerDeathHighest(PlayerDeathEvent event) {
|
public void onPlayerDeathLowest(PlayerDeathEvent event) {
|
||||||
String deathMessage = event.getDeathMessage();
|
String deathMessage = event.getDeathMessage();
|
||||||
|
|
||||||
|
if (deathMessage == null) {
|
||||||
|
mcMMO.p.getLogger().severe("You have another plugin causing null death messages. mcMMO cannot process this death message.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
deathMessage.replaceAll("(?:\u00A7(?:[0-9A-FK-ORa-fk-or]){1}(?:[\u2764\u25A0]{1,10})){1,2}", "a mob");
|
deathMessage.replaceAll("(?:\u00A7(?:[0-9A-FK-ORa-fk-or]){1}(?:[\u2764\u25A0]{1,10})){1,2}", "a mob");
|
||||||
event.setDeathMessage(deathMessage);
|
event.setDeathMessage(deathMessage);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user