测试完成聊天前缀
All checks were successful
Java CI-CD with Maven / build (push) Successful in 11m3s

This commit is contained in:
zhangyuheng 2024-08-11 12:00:40 +08:00
parent b44e5a658b
commit 6381d51950
3 changed files with 4 additions and 4 deletions

View File

@ -15,10 +15,10 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: "Set up Maven" - name: "Set up Maven"
uses: https://ssl.lunadeer.cn:14446/actions/setup-maven@v4 uses: https://ssl.lunadeer.cn:14446/actions/setup-maven@v4
- name: "Set up JDK 17" - name: "Set up JDK 21"
uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3 uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3
with: with:
java-version: '17' java-version: '21'
distribution: 'zulu' distribution: 'zulu'
cache: maven cache: maven
- name: "Build with Maven" - name: "Build with Maven"

View File

@ -80,7 +80,7 @@
<dependency> <dependency>
<groupId>io.papermc.paper</groupId> <groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId> <artifactId>paper-api</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version> <version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -11,7 +11,7 @@ public class ChatPrefixEvent implements Listener {
@EventHandler @EventHandler
public void onChat(AsyncPlayerChatEvent event) { public void onChat(AsyncPlayerChatEvent event) {
event.setCancelled(true); event.setCancelled(true);
String formated = PlaceholderAPI.setPlaceholders(event.getPlayer(), EssentialsD.config.getPrefixFormat()); String formated = PlaceholderAPI.setPlaceholders(event.getPlayer(), EssentialsD.config.getPrefixChatFormat());
formated += event.getMessage(); formated += event.getMessage();
EssentialsD.instance.getServer().broadcastMessage(formated); EssentialsD.instance.getServer().broadcastMessage(formated);
} }