mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-23 14:03:43 +00:00
Add option to disable custom server-full message (#3899)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This commit is contained in:
parent
817585a9a6
commit
e287600c34
4 changed files with 14 additions and 1 deletions
|
@ -473,9 +473,11 @@ public class EssentialsPlayerListener implements Listener {
|
||||||
event.allow();
|
event.allow();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (ess.getSettings().isCustomServerFullMessage()) {
|
||||||
event.disallow(Result.KICK_FULL, tl("serverFull"));
|
event.disallow(Result.KICK_FULL, tl("serverFull"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||||
public void onPlayerTeleport(final PlayerTeleportEvent event) {
|
public void onPlayerTeleport(final PlayerTeleportEvent event) {
|
||||||
|
|
|
@ -285,6 +285,8 @@ public interface ISettings extends IConf {
|
||||||
|
|
||||||
String getCustomQuitMessage();
|
String getCustomQuitMessage();
|
||||||
|
|
||||||
|
boolean isCustomServerFullMessage();
|
||||||
|
|
||||||
boolean isNotifyNoNewMail();
|
boolean isNotifyNoNewMail();
|
||||||
|
|
||||||
boolean isDropItemsIfFull();
|
boolean isDropItemsIfFull();
|
||||||
|
|
|
@ -1276,6 +1276,11 @@ public class Settings implements net.ess3.api.ISettings {
|
||||||
return isCustomQuitMessage;
|
return isCustomQuitMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCustomServerFullMessage() {
|
||||||
|
return config.getBoolean("use-custom-server-full-message", true);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getJoinQuitMessagePlayerCount() {
|
public int getJoinQuitMessagePlayerCount() {
|
||||||
return config.getInt("hide-join-quit-messages-above", -1);
|
return config.getInt("hide-join-quit-messages-above", -1);
|
||||||
|
|
|
@ -500,6 +500,10 @@ allow-silent-join-quit: false
|
||||||
custom-join-message: "none"
|
custom-join-message: "none"
|
||||||
custom-quit-message: "none"
|
custom-quit-message: "none"
|
||||||
|
|
||||||
|
# Should Essentials override the vanilla "Server Full" message with its own from the language file?
|
||||||
|
# Set to false to keep the vanilla message.
|
||||||
|
use-custom-server-full-message: true
|
||||||
|
|
||||||
# You can disable join and quit messages when the player count reaches a certain limit.
|
# You can disable join and quit messages when the player count reaches a certain limit.
|
||||||
# When the player count is below this number, join/quit messages will always be shown.
|
# When the player count is below this number, join/quit messages will always be shown.
|
||||||
# Set this to -1 to always show join and quit messages regardless of player count.
|
# Set this to -1 to always show join and quit messages regardless of player count.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue