mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-26 15:33:56 +00:00
Alter config options for EssentialsX Spawn listeners (#1491)
* Add spawn-join-listener-priority setting * Make "none" an option for priority settings * Register each listener with separate priorities * Add note to spawn-join-listener priority Warns about effect on spawn-on-join
This commit is contained in:
parent
b34697040a
commit
ed5aa1f469
4 changed files with 46 additions and 15 deletions
|
@ -961,9 +961,10 @@ public class Settings implements net.ess3.api.ISettings {
|
|||
return config.getBoolean("disable-item-pickup-while-afk", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventPriority getRespawnPriority() {
|
||||
String priority = config.getString("respawn-listener-priority", "normal").toLowerCase(Locale.ENGLISH);
|
||||
private EventPriority getPriority(String priority) {
|
||||
if ("none".equals(priority)) {
|
||||
return null;
|
||||
}
|
||||
if ("lowest".equals(priority)) {
|
||||
return EventPriority.LOWEST;
|
||||
}
|
||||
|
@ -982,6 +983,18 @@ public class Settings implements net.ess3.api.ISettings {
|
|||
return EventPriority.NORMAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventPriority getRespawnPriority() {
|
||||
String priority = config.getString("respawn-listener-priority", "normal").toLowerCase(Locale.ENGLISH);
|
||||
return getPriority(priority);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventPriority getSpawnJoinPriority() {
|
||||
String priority = config.getString("spawn-join-listener-priority", "normal").toLowerCase(Locale.ENGLISH);
|
||||
return getPriority(priority);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTpaAcceptCancellation() {
|
||||
return config.getLong("tpa-accept-cancellation", 120);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue