From a335b7611198c3167605904185438505d6e3d588 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 3 May 2020 20:54:40 +0200 Subject: [PATCH] refactor: remove debug messages --- .../listeners/EntityRegainHealthListener.java | 5 ----- .../varo/listeners/PlayerJoinQuitListener.java | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/varo/src/main/java/de/cliffbreak/varo/listeners/EntityRegainHealthListener.java b/varo/src/main/java/de/cliffbreak/varo/listeners/EntityRegainHealthListener.java index 92eada3..99f2af4 100644 --- a/varo/src/main/java/de/cliffbreak/varo/listeners/EntityRegainHealthListener.java +++ b/varo/src/main/java/de/cliffbreak/varo/listeners/EntityRegainHealthListener.java @@ -5,16 +5,11 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityRegainHealthEvent; -import de.cliffbreak.varo.uitls.MessageUtils; - public class EntityRegainHealthListener implements Listener { @EventHandler() public void onEntityRegainHealth(EntityRegainHealthEvent e) { if (e.getEntity() instanceof Player) { - Player p = (Player) e.getEntity(); - p.sendMessage(MessageUtils.getRichTextComponent("Amount: ", e.getAmount() + "", true)); - p.sendMessage(MessageUtils.getRichTextComponent("Saturation: ", p.getSaturation() + "", true)); if (e.isFastRegen()) { e.setAmount(0.13d); } diff --git a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java index 7e91145..9cbb411 100644 --- a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java +++ b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java @@ -9,19 +9,26 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.server.ServerListPingEvent; +import de.cliffbreak.varo.Varo; import de.cliffbreak.varo.uitls.MessageUtils; public class PlayerJoinQuitListener implements Listener { + private final Varo plugin; + + public PlayerJoinQuitListener(final Varo plugin) { + this.plugin = plugin; + } + @EventHandler() - public void onPlayerQuit(PlayerQuitEvent e) { + public void onPlayerQuit(final PlayerQuitEvent e) { e.setQuitMessage(null); Bukkit.broadcast( MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server verlassen.", true)); } @EventHandler() - public void onPlayerJoin(PlayerJoinEvent e) { + public void onPlayerJoin(final PlayerJoinEvent e) { e.setJoinMessage(null); Bukkit.broadcast( MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server betreten.", true)); @@ -30,11 +37,14 @@ public class PlayerJoinQuitListener implements Listener { + "\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: §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"); } @EventHandler() - public void onServerListPing(ServerListPingEvent event) { + public void onServerListPing(final ServerListPingEvent event) { if (event instanceof PaperServerListPingEvent) { handlePaperServerListPing((PaperServerListPingEvent) event); } else {