feat: optimize changelog
This commit is contained in:
parent
72cf4a2b44
commit
6f2557f897
1 changed files with 30 additions and 8 deletions
|
@ -1,5 +1,7 @@
|
|||
package de.cliffbreak.varo.listeners;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -15,6 +17,7 @@ import de.cliffbreak.varo.uitls.MessageUtils;
|
|||
public class PlayerJoinQuitListener implements Listener {
|
||||
|
||||
private final Varo plugin;
|
||||
private int task;
|
||||
|
||||
public PlayerJoinQuitListener(final Varo plugin) {
|
||||
this.plugin = plugin;
|
||||
|
@ -33,14 +36,33 @@ public class PlayerJoinQuitListener implements Listener {
|
|||
Bukkit.broadcast(
|
||||
MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server betreten.", true));
|
||||
e.getPlayer().sendMessage("\n§7§l#### §9Cliffbreak.de - §lVaro §r§9Changelog §7§l####\n \n"
|
||||
+ " §cWarning: §r§c Plugin is running in DEBUG mode!\n "
|
||||
+ "\n §7• §r§lADD: §rRedesigned Chat with Timestamp"
|
||||
+ "\n §7• §r§lADD: §rHover over Playername for Details (Team)"
|
||||
+ "\n §7• §r§lADD: §rControl Difficulty and Gamerules by the Plugin"
|
||||
+ "\n §7• §r§lADD: §rCustom Dynamic ServerListEntry" + "\n §7• §r§lADD: §r1.8 Health Regeneration"
|
||||
+ "\n §7• §r§lADD: §rBan Player on Death" + "\n §7• §r§lADD: §r/varo Command for Admins"
|
||||
+ "\n §7• §r§lFIX: §rOnly kick player after Entity isn't ticking anymore"
|
||||
+ "\n §7• §r§lFIX: §rCheck for Ban in AsyncPreLoginEvent");
|
||||
+ " §cWarning: §r§c Plugin is running in DEBUG mode!\n ");
|
||||
|
||||
final Stack<String> changes = new Stack<String>();
|
||||
|
||||
changes.push(" §7• §r§lFIX: §rCheck for Ban in AsyncPreLoginEvent");
|
||||
changes.push(" §7• §r§lFIX: §rOnly kick player after Entity isn't ticking anymore");
|
||||
changes.push(" §7• §r§lADD: §r/varo Command for Admins");
|
||||
changes.push(" §7• §r§lADD: §rBan Player on Death");
|
||||
changes.push(" §7• §r§lADD: §r1.8 Health Regeneration");
|
||||
changes.push(" §7• §r§lADD: §rCustom Dynamic ServerListEntry");
|
||||
changes.push(" §7• §r§lADD: §rControl Difficulty and Gamerules by the Plugin");
|
||||
changes.push(" §7• §r§lADD: §rHover over Playername for Details (Team)");
|
||||
changes.push(" §7• §r§lADD: §rRedesigned Chat with Timestamp");
|
||||
|
||||
this.task = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
e.getPlayer().sendMessage(changes.pop());
|
||||
if (changes.empty())
|
||||
stopScheduler();
|
||||
}
|
||||
}, 20, 20);
|
||||
}
|
||||
|
||||
private void stopScheduler() {
|
||||
Bukkit.getScheduler().cancelTask(this.task);
|
||||
}
|
||||
|
||||
@EventHandler()
|
||||
|
|
Loading…
Reference in a new issue