mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Tweak nukkit plot chat
This commit is contained in:
parent
9ed5847c0a
commit
ce3e3be59e
@ -111,7 +111,9 @@ public class ExpireManager {
|
||||
.text("\n - ").color("$3").text("Remind later (/plot set keep 1d)").color("$2").suggest("/plot set keep 1d")
|
||||
.tooltip("/plot set keep 1d")
|
||||
.text("\n - ").color("$3").text("Keep this (/plot set keep true)").color("$2").suggest("/plot set keep true")
|
||||
.tooltip("/plot set keep true");
|
||||
.tooltip("/plot set keep true")
|
||||
.text("\n - ").color("$3").text("Don't show me this").color("$2").suggest("/plot toggle clear-confirmation")
|
||||
.tooltip("/plot toggle clear-confirmation");
|
||||
msg.send(pp);
|
||||
}
|
||||
});
|
||||
|
@ -564,8 +564,10 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
if (plot == null) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
String message = event.getMessage();
|
||||
if (plotPlayer.hasPermission("plots.chat.color")) {
|
||||
event.setMessage(C.color(message));
|
||||
}
|
||||
String format = C.PLOT_CHAT_FORMAT.s();
|
||||
String sender = event.getPlayer().getDisplayName();
|
||||
PlotId id = plot.getId();
|
||||
@ -584,11 +586,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
String partial = C.color(format.replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", sender));
|
||||
String full = partial.replace("%msg%", message);
|
||||
for (CommandSender receiver : recipients) {
|
||||
receiver.sendMessage(full);
|
||||
}
|
||||
String newFormat = C.color(format.replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", "{%0}").replace("%msg%", "{%1}"));
|
||||
event.setFormat(newFormat);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
|
Loading…
Reference in New Issue
Block a user