Automatischer TNT Tracer Messages
Dieser Commit ist enthalten in:
Ursprung
0cf208af2e
Commit
44a6156dec
@ -5,8 +5,11 @@ import de.steamwar.bausystem.tracer.trace.ShowManager;
|
||||
import de.steamwar.bausystem.tracer.trace.ShowStatus;
|
||||
import de.steamwar.bausystem.tracer.trace.TNTFrame;
|
||||
import de.steamwar.bausystem.tracer.trace.TNTTrace;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
@ -70,6 +73,7 @@ public class TNTTracer15 {
|
||||
if (status == Status.IDLE) {
|
||||
status = Status.RECORD;
|
||||
} else {
|
||||
Bukkit.getOnlinePlayers().forEach(player -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§7Automatischer TNT-Tracer §8- §aAufnahme gestartet")));
|
||||
status = Status.RECORD_AUTO;
|
||||
}
|
||||
task = Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), TNTTracer15::run, 1, 1);
|
||||
@ -88,6 +92,7 @@ public class TNTTracer15 {
|
||||
status = Status.IDLE;
|
||||
}
|
||||
if (status == Status.RECORD_AUTO) {
|
||||
Bukkit.getOnlinePlayers().forEach(player -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§7Automatischer TNT-Tracer §8- §aAufnahme gestoppt")));
|
||||
status = Status.IDLE_AUTO;
|
||||
}
|
||||
if (task != null) task.cancel();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren