From d629b1daf762471bc38f5efdabaf16a7184ead1a Mon Sep 17 00:00:00 2001 From: zhangyuheng Date: Fri, 12 Jul 2024 21:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eop=E5=8F=AF=E6=97=A0=E8=A7=86?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=9D=83=E9=99=90=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../cn/lunadeer/miniplayertitle/commands/TitleManage.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6b28504..d63d07b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cn.lunadeer MiniPlayerTitle - 4.3.0 + 4.3.1 jar MiniPlayerTitle diff --git a/src/main/java/cn/lunadeer/miniplayertitle/commands/TitleManage.java b/src/main/java/cn/lunadeer/miniplayertitle/commands/TitleManage.java index 2ae69e9..5f7c6e4 100644 --- a/src/main/java/cn/lunadeer/miniplayertitle/commands/TitleManage.java +++ b/src/main/java/cn/lunadeer/miniplayertitle/commands/TitleManage.java @@ -201,7 +201,10 @@ public class TitleManage { Notification.error(sender, "该命令只能由玩家执行"); return; } - if (!sender.hasPermission("mplt.custom")) return; + if (!sender.hasPermission("mplt.custom") || !sender.isOp()) { + Notification.error(sender, "你没有权限使用该命令"); + return; + } Player player = (Player) sender; if (!MiniPlayerTitle.config.isEnableCustom()) { Notification.error(sender, "自定义称号功能已关闭");