修复了bukkit下消息提示报错问题
This commit is contained in:
parent
fbd47a49af
commit
dcf52b0954
@ -27,7 +27,7 @@ public enum Flag {
|
|||||||
CRAFT("craft", "使用工作台", "是否可以使用工作台", false, false, true),
|
CRAFT("craft", "使用工作台", "是否可以使用工作台", false, false, true),
|
||||||
CREEPER_EXPLODE("creeper_explode", "实体爆炸", "包含:苦力怕/凋零头颅/水晶爆炸", false, true, true),
|
CREEPER_EXPLODE("creeper_explode", "实体爆炸", "包含:苦力怕/凋零头颅/水晶爆炸", false, true, true),
|
||||||
COMPARER("comparer", "比较器交互", "是否可以与比较器交互", false, false, true),
|
COMPARER("comparer", "比较器交互", "是否可以与比较器交互", false, false, true),
|
||||||
DOOR("door", "门交互", "是否可以使用各种材质的门", false, false, true),
|
DOOR("door", "门交互", "是否可以使用各种材质的门(包括活板门)", false, false, true),
|
||||||
DYE("dye", "染色", "是否可以使用染料(对羊、狗项圈、猫项圈)染色", false, false, true),
|
DYE("dye", "染色", "是否可以使用染料(对羊、狗项圈、猫项圈)染色", false, false, true),
|
||||||
EGG("egg", "扔鸡蛋", "是否可以扔鸡蛋", false, false, true),
|
EGG("egg", "扔鸡蛋", "是否可以扔鸡蛋", false, false, true),
|
||||||
ENCHANT("enchant", "使用附魔台", "是否可以使用附魔台", false, false, true),
|
ENCHANT("enchant", "使用附魔台", "是否可以使用附魔台", false, false, true),
|
||||||
|
@ -5,6 +5,7 @@ import cn.lunadeer.dominion.Dominion;
|
|||||||
import cn.lunadeer.dominion.dtos.DominionDTO;
|
import cn.lunadeer.dominion.dtos.DominionDTO;
|
||||||
import cn.lunadeer.dominion.dtos.Flag;
|
import cn.lunadeer.dominion.dtos.Flag;
|
||||||
import cn.lunadeer.dominion.dtos.PlayerPrivilegeDTO;
|
import cn.lunadeer.dominion.dtos.PlayerPrivilegeDTO;
|
||||||
|
import cn.lunadeer.minecraftpluginutils.Notification;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.TextComponent;
|
import net.kyori.adventure.text.TextComponent;
|
||||||
import net.kyori.adventure.text.format.Style;
|
import net.kyori.adventure.text.format.Style;
|
||||||
@ -63,8 +64,7 @@ public class Apis {
|
|||||||
String.format("你没有 %s (%s) 权限", flag.getDisplayName(), flag.getDescription()),
|
String.format("你没有 %s (%s) 权限", flag.getDisplayName(), flag.getDescription()),
|
||||||
Style.style(TextColor.color(0xFF0000), TextDecoration.BOLD))
|
Style.style(TextColor.color(0xFF0000), TextDecoration.BOLD))
|
||||||
.hoverEvent(Component.text(flag.getDescription()));
|
.hoverEvent(Component.text(flag.getDescription()));
|
||||||
// Notification.error(player, msg);
|
Notification.actionBar(player, msg);
|
||||||
player.sendActionBar(msg);
|
|
||||||
if (event != null) {
|
if (event != null) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user