mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-02-11 03:29:53 +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
|
@ -10,7 +10,7 @@ sourceCompatibility = 1.8
|
|||
targetCompatibility = 1.8
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
group = 'dev.esophose'
|
||||
version = '7.7'
|
||||
version = '7.8'
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
=== v7.8 ===
|
||||
* Fixed the messages-enabled setting not working at all
|
||||
=== v7.7 ===
|
||||
* Fixed an error with the style 'blockplace'
|
||||
=== v7.6 ===
|
||||
+ Added style 'teleport' (Thanks HexedHero)
|
||||
* Fixed being able to take items out of GUI when opened from a separate GUI plugin
|
||||
|
|
|
@ -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…
Reference in a new issue