修改警告提示位置
All checks were successful
Java CI-CD with Maven / build (push) Successful in 6m26s

This commit is contained in:
zhangyuheng 2024-05-30 11:05:04 +08:00
parent 17bb269f76
commit 3038fc6e3c
2 changed files with 8 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>LiteWorldEdit</artifactId>
<version>2.4.3.4</version>
<version>2.4.3.5</version>
<packaging>jar</packaging>
<name>LiteWorldEdit</name>

View File

@ -2,6 +2,11 @@ package cn.lunadeer.liteworldedit;
import cn.lunadeer.liteworldedit.Jobs.Job;
import cn.lunadeer.liteworldedit.Jobs.JobErrCode;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.format.TextDecoration;
import org.bukkit.entity.Player;
public class Task implements Runnable {
@ -40,7 +45,8 @@ public class Task implements Runnable {
}
Player player = job.get_creator();
if (re.canContinue()) {
Notification.titleWarn(player, "警告", re.getMessage());
TextComponent warn = Component.text("警告:" + re.getMessage(), Style.style(TextColor.color(TextColor.color(255, 185, 69)), TextDecoration.BOLD));
player.sendActionBar(warn);
job = this.xPlayer.popJob();
if (job == null) {
return;