mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-26 17:18:43 +01:00
*Add console sender to nukkit chat
This commit is contained in:
parent
ce3e3be59e
commit
9897890e6a
@ -1,6 +1,7 @@
|
|||||||
package com.plotsquared.nukkit.listeners;
|
package com.plotsquared.nukkit.listeners;
|
||||||
|
|
||||||
import cn.nukkit.Player;
|
import cn.nukkit.Player;
|
||||||
|
import cn.nukkit.Server;
|
||||||
import cn.nukkit.block.Block;
|
import cn.nukkit.block.Block;
|
||||||
import cn.nukkit.command.CommandSender;
|
import cn.nukkit.command.CommandSender;
|
||||||
import cn.nukkit.entity.Entity;
|
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}"));
|
String newFormat = C.color(format.replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", "{%0}").replace("%msg%", "{%1}"));
|
||||||
event.setFormat(newFormat);
|
event.setFormat(newFormat);
|
||||||
|
recipients.add(Server.getInstance().getConsoleSender());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void blockDestroy(BlockBreakEvent event) {
|
public void blockDestroy(BlockBreakEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Location location = NukkitUtil.getLocation(event.getBlock().getLocation());
|
Location location = NukkitUtil.getLocation(event.getBlock().getLocation());
|
||||||
PlotArea area = location.getPlotArea();
|
PlotArea area = location.getPlotArea();
|
||||||
|
Loading…
Reference in New Issue
Block a user