mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-02-09 00:51:29 +01:00
Report Spigot health error to admins.
Using the new `mobarena.admin.errors` permission, this commit provides server owners with a way to make the infamous Spigot health error much more visible by sending the error message to any "admins" online when the error occurs. Closes #764
This commit is contained in:
parent
7ef7707886
commit
6a428166e5
@ -244,6 +244,11 @@ public class MASpawnThread implements Runnable
|
||||
} else {
|
||||
e.setCustomName("SPIGOT ERROR");
|
||||
}
|
||||
for (Player p : plugin.getServer().getOnlinePlayers()) {
|
||||
if (p.hasPermission("mobarena.admin.errors")) {
|
||||
arena.getMessenger().tell(p, "Failed to set boss health (" + health + ") in arena " + arena.configName() + " (wave " + wave + ") because Spigot 'maxHealth' is too low. See console for details.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Switch on the type.
|
||||
|
Loading…
Reference in New Issue
Block a user