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.ShowStatus;
|
||||||
import de.steamwar.bausystem.tracer.trace.TNTFrame;
|
import de.steamwar.bausystem.tracer.trace.TNTFrame;
|
||||||
import de.steamwar.bausystem.tracer.trace.TNTTrace;
|
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.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.TNTPrimed;
|
import org.bukkit.entity.TNTPrimed;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
@ -70,6 +73,7 @@ public class TNTTracer15 {
|
|||||||
if (status == Status.IDLE) {
|
if (status == Status.IDLE) {
|
||||||
status = Status.RECORD;
|
status = Status.RECORD;
|
||||||
} else {
|
} else {
|
||||||
|
Bukkit.getOnlinePlayers().forEach(player -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§7Automatischer TNT-Tracer §8- §aAufnahme gestartet")));
|
||||||
status = Status.RECORD_AUTO;
|
status = Status.RECORD_AUTO;
|
||||||
}
|
}
|
||||||
task = Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), TNTTracer15::run, 1, 1);
|
task = Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), TNTTracer15::run, 1, 1);
|
||||||
@ -88,6 +92,7 @@ public class TNTTracer15 {
|
|||||||
status = Status.IDLE;
|
status = Status.IDLE;
|
||||||
}
|
}
|
||||||
if (status == Status.RECORD_AUTO) {
|
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;
|
status = Status.IDLE_AUTO;
|
||||||
}
|
}
|
||||||
if (task != null) task.cancel();
|
if (task != null) task.cancel();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren