mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Give ConsolePlayer the same treatment
This commit is contained in:
parent
186a810bf6
commit
5f76cc4f7b
@ -29,6 +29,7 @@ import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.command.RequiredType;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.events.TeleportCause;
|
||||
@ -140,10 +141,13 @@ public class ConsolePlayer extends PlotPlayer<Actor> {
|
||||
|
||||
@Override public void sendMessage(@Nonnull final Caption caption,
|
||||
@Nonnull final Template... replacements) {
|
||||
final String message = caption.getComponent(this);
|
||||
String message = caption.getComponent(this);
|
||||
if (message.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
message = CaptionUtility.format(this, message).
|
||||
/* Magic replacement characters */
|
||||
replace('\u2010', '%').replace('\u2020', '&').replace('\u2030', '&');
|
||||
// Create the template list, and add the prefix as a replacement
|
||||
final List<Template> templates = Arrays.asList(replacements);
|
||||
templates.add(Template.of("prefix", MINI_MESSAGE.parse(
|
||||
|
Loading…
Reference in New Issue
Block a user