mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-08-07 04:53:04 +00:00
Fixed messages-enabled not working
This commit is contained in:
parent
56569b11f1
commit
b5b87853f4
3 changed files with 20 additions and 1 deletions
|
@ -124,6 +124,9 @@ public class LocaleManager extends Manager {
|
|||
* @param stringPlaceholders The placeholders to apply
|
||||
*/
|
||||
public void sendMessage(CommandSender sender, String messageKey, StringPlaceholders stringPlaceholders) {
|
||||
if (!Setting.MESSAGES_ENABLED.getBoolean())
|
||||
return;
|
||||
|
||||
sender.sendMessage(this.getLocaleMessage("prefix") + this.getLocaleMessage(messageKey, stringPlaceholders));
|
||||
}
|
||||
|
||||
|
@ -135,6 +138,9 @@ public class LocaleManager extends Manager {
|
|||
* @param stringPlaceholders The placeholders to apply
|
||||
*/
|
||||
public void sendMessage(PPlayer pplayer, String messageKey, StringPlaceholders stringPlaceholders) {
|
||||
if (!Setting.MESSAGES_ENABLED.getBoolean())
|
||||
return;
|
||||
|
||||
pplayer.getUnderlyingExecutor().sendMessage(this.parsePlaceholders(pplayer.getPlayer(), this.getLocaleMessage("prefix") + this.getLocaleMessage(messageKey, stringPlaceholders)));
|
||||
}
|
||||
|
||||
|
@ -166,6 +172,9 @@ public class LocaleManager extends Manager {
|
|||
* @param stringPlaceholders The placeholders to apply
|
||||
*/
|
||||
public void sendSimpleMessage(CommandSender sender, String messageKey, StringPlaceholders stringPlaceholders) {
|
||||
if (!Setting.MESSAGES_ENABLED.getBoolean())
|
||||
return;
|
||||
|
||||
sender.sendMessage(this.getLocaleMessage(messageKey, stringPlaceholders));
|
||||
}
|
||||
|
||||
|
@ -177,6 +186,9 @@ public class LocaleManager extends Manager {
|
|||
* @param stringPlaceholders The placeholders to apply
|
||||
*/
|
||||
public void sendSimpleMessage(PPlayer pplayer, String messageKey, StringPlaceholders stringPlaceholders) {
|
||||
if (!Setting.MESSAGES_ENABLED.getBoolean())
|
||||
return;
|
||||
|
||||
pplayer.getUnderlyingExecutor().sendMessage(this.parsePlaceholders(pplayer.getPlayer(), this.getLocaleMessage(messageKey, stringPlaceholders)));
|
||||
}
|
||||
|
||||
|
@ -207,6 +219,9 @@ public class LocaleManager extends Manager {
|
|||
* @param message The message to send
|
||||
*/
|
||||
public void sendCustomMessage(CommandSender sender, String message) {
|
||||
if (!Setting.MESSAGES_ENABLED.getBoolean())
|
||||
return;
|
||||
|
||||
sender.sendMessage(message);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue