From 9897890e6acfad843196a583ca5f6b5dbc80ce88 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 9 Jun 2018 15:49:54 +1000 Subject: [PATCH] *Add console sender to nukkit chat --- .../java/com/plotsquared/nukkit/listeners/PlayerEvents.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Nukkit/src/main/java/com/plotsquared/nukkit/listeners/PlayerEvents.java b/Nukkit/src/main/java/com/plotsquared/nukkit/listeners/PlayerEvents.java index 5df6618f0..0fef4ef4d 100644 --- a/Nukkit/src/main/java/com/plotsquared/nukkit/listeners/PlayerEvents.java +++ b/Nukkit/src/main/java/com/plotsquared/nukkit/listeners/PlayerEvents.java @@ -1,6 +1,7 @@ package com.plotsquared.nukkit.listeners; import cn.nukkit.Player; +import cn.nukkit.Server; import cn.nukkit.block.Block; import cn.nukkit.command.CommandSender; import cn.nukkit.entity.Entity; @@ -588,10 +589,11 @@ public class PlayerEvents extends PlotListener implements Listener { } String newFormat = C.color(format.replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", "{%0}").replace("%msg%", "{%1}")); event.setFormat(newFormat); + recipients.add(Server.getInstance().getConsoleSender()); } -@EventHandler(priority = EventPriority.LOWEST) -public void blockDestroy(BlockBreakEvent event) { + @EventHandler(priority = EventPriority.LOWEST) + public void blockDestroy(BlockBreakEvent event) { Player player = event.getPlayer(); Location location = NukkitUtil.getLocation(event.getBlock().getLocation()); PlotArea area = location.getPlotArea();