mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-04-06 13:30:43 +08:00
Add config for use of Paper chat events (#6050)
adds a config option to disable the use of paper chat events while other plugins learn how to join the 21st century. re #6048 re #6051
This commit is contained in:
parent
196a2a19c4
commit
8313d522dc
@ -56,6 +56,8 @@ public interface ISettings extends IConf {
|
||||
|
||||
boolean isChatQuestionEnabled();
|
||||
|
||||
boolean isUsePaperChatEvent();
|
||||
|
||||
BigDecimal getCommandCost(IEssentialsCommand cmd);
|
||||
|
||||
BigDecimal getCommandCost(String label);
|
||||
|
@ -266,6 +266,11 @@ public class Settings implements net.ess3.api.ISettings {
|
||||
return config.getBoolean("chat.question-enabled", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsePaperChatEvent() {
|
||||
return config.getBoolean("chat.paper-chat-events", true);
|
||||
}
|
||||
|
||||
public boolean _isTeleportSafetyEnabled() {
|
||||
return config.getBoolean("teleport-safety", true);
|
||||
}
|
||||
|
@ -988,6 +988,12 @@ chat:
|
||||
# Whether chat questions should be enabled or not.
|
||||
question-enabled: true
|
||||
|
||||
# Whether EssentialsX should use Paper's modern chat event system in 1.16.5+.
|
||||
# This is required for modern chat features such as hover events and click events.
|
||||
# If you're experiencing issues with other plugins that use the chat event system, you can disable this.
|
||||
# You must restart your server after changing this setting.
|
||||
paper-chat-events: true
|
||||
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
# | EssentialsX Protect | #
|
||||
|
@ -34,7 +34,7 @@ public class EssentialsChat extends JavaPlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_16_5_R01) && VersionUtil.isPaper()) {
|
||||
if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_16_5_R01) && VersionUtil.isPaper() && ess.getSettings().isUsePaperChatEvent()) {
|
||||
final PaperChatHandler paperHandler = new PaperChatHandler((Essentials) ess, this);
|
||||
paperHandler.registerListeners();
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user