Small TraceChange & Restart auf 3 Uhr
Dieser Commit ist enthalten in:
Ursprung
1b9afcd5da
Commit
758153f5b9
@ -115,34 +115,34 @@ public class BauSystem extends JavaPlugin implements Listener {
|
|||||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, () -> {
|
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, () -> {
|
||||||
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
|
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
|
||||||
Date d = new Date();
|
Date d = new Date();
|
||||||
if (df.format(d).equalsIgnoreCase("23:55:00")) {
|
if (df.format(d).equalsIgnoreCase("02:55:00")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 5 Minuten neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 5 Minuten neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:00")) {
|
if (df.format(d).equalsIgnoreCase("02:59:00")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 1 Minute neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 1 Minute neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:30")) {
|
if (df.format(d).equalsIgnoreCase("02:59:30")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 30 Sekunden neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 30 Sekunden neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:50")) {
|
if (df.format(d).equalsIgnoreCase("02:59:50")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 10 Sekunden neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 10 Sekunden neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:55")) {
|
if (df.format(d).equalsIgnoreCase("02:59:55")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 5 Sekunden neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 5 Sekunden neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:56")) {
|
if (df.format(d).equalsIgnoreCase("02:59:56")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 4 Sekunden neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 4 Sekunden neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:57")) {
|
if (df.format(d).equalsIgnoreCase("02:59:57")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 3 Sekunden neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 3 Sekunden neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:58")) {
|
if (df.format(d).equalsIgnoreCase("02:59:58")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 2 Sekunden neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 2 Sekunden neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("23:59:59")) {
|
if (df.format(d).equalsIgnoreCase("02:59:59")) {
|
||||||
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 1 Sekunde neu");
|
Bukkit.broadcastMessage(PREFIX + "Der Server startet in 1 Sekunde neu");
|
||||||
}
|
}
|
||||||
if (df.format(d).equalsIgnoreCase("00:00:00")) {
|
if (df.format(d).equalsIgnoreCase("03:00:00")) {
|
||||||
Bukkit.spigot().restart();
|
Bukkit.spigot().restart();
|
||||||
}
|
}
|
||||||
}, 20L, 20L);
|
}, 20L, 20L);
|
||||||
|
@ -68,6 +68,7 @@ public class CommandBau {
|
|||||||
p.sendMessage("§6/bau togglereplace §7- Darf ein Spieler in einer Region replacen");
|
p.sendMessage("§6/bau togglereplace §7- Darf ein Spieler in einer Region replacen");
|
||||||
p.sendMessage("§6/bau togglechgm §7- Darf ein Spieler seinen Spielmodus ändern");
|
p.sendMessage("§6/bau togglechgm §7- Darf ein Spieler seinen Spielmodus ändern");
|
||||||
p.sendMessage("§6/nv §7- Aktiviert/Deaktiviert Nachtsicht");
|
p.sendMessage("§6/nv §7- Aktiviert/Deaktiviert Nachtsicht");
|
||||||
|
p.sendMessage("§6/trace §7- Gibt einen Überblick über die Funktionen des TNT-Tracers");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(name = "bau.home", aliases = "gs.home", inGameOnly = true)
|
@Command(name = "bau.home", aliases = "gs.home", inGameOnly = true)
|
||||||
|
@ -45,9 +45,11 @@ public class TNTTracer implements Listener, Runnable {
|
|||||||
|
|
||||||
public void end(){
|
public void end(){
|
||||||
stop();
|
stop();
|
||||||
|
if(!printed){
|
||||||
locations.clear();
|
locations.clear();
|
||||||
allTracer.remove(world);
|
allTracer.remove(world);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void show(){
|
public void show(){
|
||||||
stop();
|
stop();
|
||||||
@ -74,6 +76,7 @@ public class TNTTracer implements Listener, Runnable {
|
|||||||
continue;
|
continue;
|
||||||
b.setType(Material.AIR);
|
b.setType(Material.AIR);
|
||||||
}
|
}
|
||||||
|
printed = false;
|
||||||
end();
|
end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren