Added support for MMOCores default actionbar

(MMOCore update will be out soon)
This commit is contained in:
Aria 2019-10-19 22:51:24 +02:00
parent 9ea1ba6795
commit eb73837fa4
2 changed files with 7 additions and 1 deletions

Binary file not shown.

View File

@ -1,9 +1,11 @@
package net.Indyuce.mmoitems.api.util.message;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmoitems.MMOItems;
public class PlayerMessage {
@ -34,8 +36,12 @@ public class PlayerMessage {
if (ChatColor.stripColor(message).equals(""))
return;
if (MMOItems.plugin.getConfig().getBoolean("action-bar-display." + actionBarBooleanPath))
if (MMOItems.plugin.getConfig().getBoolean("action-bar-display." + actionBarBooleanPath)) {
if(Bukkit.getPluginManager().isPluginEnabled("MMOCore"))
MMOCore.plugin.pauseDefaultActionBar(60);
MMOItems.plugin.getNMS().sendActionBar(player, message);
}
else
player.sendMessage(message);
}