made SignEditListener formatting consistent and optimized ReportJoinListener to handle admin notifications asynchronously

This commit is contained in:
2025-12-23 19:14:53 +01:00
parent 2209b42766
commit 85065bcc73
2 changed files with 6 additions and 2 deletions

View File

@@ -1,7 +1,9 @@
package eu.mhsl.craftattack.spawn.common.appliances.metaGameplay.report.listeners;
import eu.mhsl.craftattack.spawn.common.appliances.metaGameplay.report.Report;
import eu.mhsl.craftattack.spawn.core.Main;
import eu.mhsl.craftattack.spawn.core.appliance.ApplianceListener;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent;
@@ -9,6 +11,9 @@ public class ReportJoinListener extends ApplianceListener<Report> {
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
if(!event.getPlayer().hasPermission("admin")) return;
this.getAppliance().sendReportsInfo(event.getPlayer());
Bukkit.getScheduler().runTaskAsynchronously(
Main.instance(),
() -> this.getAppliance().sendReportsInfo(event.getPlayer())
);
}
}

View File

@@ -25,7 +25,6 @@ class SignEditListener extends ApplianceListener<AntiIllegalSignCharacters> {
(int)'€', (int)'°', (int)'µ'
);
@EventHandler
public void onSignEdit(SignChangeEvent event) {
for (int i = 0; i < 4; i++) {