refactor: remove debug messages

This commit is contained in:
Simon Giesel 2020-05-03 20:54:40 +02:00
parent db397894ed
commit a335b76111
2 changed files with 14 additions and 9 deletions

View file

@ -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);
}

View file

@ -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 {