implements CommandCaller, OfflinePlotPlayer, if (message.isEmpty()) { return; } + // Replace placeholders, etc + 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 templates = Arrays.asList(replacements); templates.add(Templates.of(this, "prefix", TranslatableCaption.of("core.prefix"))); diff --git a/Core/src/main/java/com/plotsquared/core/plot/Plot.java b/Core/src/main/java/com/plotsquared/core/plot/Plot.java index 660bdf797..107e26bf6 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/Plot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Plot.java @@ -31,7 +31,7 @@ import com.google.common.collect.Sets; import com.google.inject.Inject; import com.plotsquared.core.PlotSquared; import com.plotsquared.core.command.Like; -import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.caption.CaptionUtility; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.configuration.ConfigurationUtil; import com.plotsquared.core.configuration.Settings; diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java index ea35257f0..6003e19a7 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java @@ -29,7 +29,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.plotsquared.core.collection.QuadMap; -import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.caption.CaptionUtility; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.configuration.ConfigurationNode; import com.plotsquared.core.configuration.ConfigurationSection; diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotAreaType.java b/Core/src/main/java/com/plotsquared/core/plot/PlotAreaType.java index 3e73dd2fb..7f8325015 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotAreaType.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotAreaType.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import javax.annotation.Nonnull; diff --git a/Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java b/Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java index cabe88b04..0376da696 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java @@ -27,7 +27,7 @@ package com.plotsquared.core.plot.comment; import com.google.common.annotations.Beta; import com.plotsquared.core.configuration.Settings; -import com.plotsquared.core.configuration.StaticCaption; +import com.plotsquared.core.configuration.caption.StaticCaption; import com.plotsquared.core.configuration.caption.TranslatableCaption; import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.plot.Plot; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java index 5f072dfe3..b8def8c93 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagParseException.java @@ -25,8 +25,8 @@ */ package com.plotsquared.core.plot.flag; -import com.plotsquared.core.configuration.Caption; -import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.caption.Caption; +import com.plotsquared.core.configuration.caption.CaptionUtility; public class FlagParseException extends Exception { diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java index b8507b982..57f17c0d6 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java @@ -26,7 +26,7 @@ package com.plotsquared.core.plot.flag; import com.google.common.base.Preconditions; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import javax.annotation.Nonnull; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeListFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeListFlag.java index 64bc26b98..a9a9282ff 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeListFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeListFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.FlagParseException; import com.plotsquared.core.util.BlockUtil; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/BooleanFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BooleanFlag.java index aed71fec4..89b509886 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/BooleanFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/BooleanFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.FlagParseException; import com.plotsquared.core.plot.flag.PlotFlag; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/DoubleFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/DoubleFlag.java index 11338ce9f..056a4c138 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/DoubleFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/DoubleFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.FlagParseException; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/IntegerFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/IntegerFlag.java index 393b222c3..14b3817ed 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/IntegerFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/IntegerFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.FlagParseException; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/ListFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/ListFlag.java index e7bcf716e..60395d491 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/ListFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/ListFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.PlotFlag; import com.plotsquared.core.util.StringMan; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java index b0a155e6d..34b8feb15 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/LongFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.FlagParseException; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/NonNegativeIntegerFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NonNegativeIntegerFlag.java index f057d3e12..c7bc6fd06 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/NonNegativeIntegerFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NonNegativeIntegerFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import javax.annotation.Nonnull; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java index 177062291..6f3ec45eb 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/NumberFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.FlagParseException; import com.plotsquared.core.plot.flag.PlotFlag; diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java index 054887104..6001de241 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/types/TimedFlag.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.plot.flag.types; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.plot.flag.FlagParseException; import com.plotsquared.core.plot.flag.PlotFlag; diff --git a/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java b/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java index ec871cdcb..2c50ee898 100644 --- a/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java +++ b/Core/src/main/java/com/plotsquared/core/setup/CommonSetupSteps.java @@ -26,7 +26,7 @@ package com.plotsquared.core.setup; import com.plotsquared.core.PlotSquared; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.configuration.caption.TranslatableCaption; import com.plotsquared.core.events.TeleportCause; import com.plotsquared.core.generator.GeneratorWrapper; diff --git a/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java b/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java index c04ae6c0d..c173a5f68 100644 --- a/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java +++ b/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java @@ -26,7 +26,7 @@ package com.plotsquared.core.util; import com.google.common.eventbus.EventBus; -import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.caption.CaptionUtility; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.configuration.Settings; import com.plotsquared.core.events.PlayerAutoPlotEvent; diff --git a/Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java b/Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java index d260b74bc..eac04929c 100644 --- a/Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java +++ b/Core/src/main/java/com/plotsquared/core/util/LegacyConverter.java @@ -26,7 +26,7 @@ package com.plotsquared.core.util; import com.plotsquared.core.PlotSquared; -import com.plotsquared.core.configuration.CaptionUtility; +import com.plotsquared.core.configuration.caption.CaptionUtility; import com.plotsquared.core.configuration.Captions; import com.plotsquared.core.configuration.ConfigurationSection; import com.plotsquared.core.player.ConsolePlayer; diff --git a/Core/src/main/java/com/plotsquared/core/util/MainUtil.java b/Core/src/main/java/com/plotsquared/core/util/MainUtil.java index e278307aa..c4631e760 100644 --- a/Core/src/main/java/com/plotsquared/core/util/MainUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/MainUtil.java @@ -25,24 +25,9 @@ */ package com.plotsquared.core.util; -import com.plotsquared.core.PlotSquared; -import com.plotsquared.core.command.Like; -import com.plotsquared.core.configuration.Caption; -import com.plotsquared.core.configuration.CaptionUtility; -import com.plotsquared.core.configuration.Captions; -import com.plotsquared.core.configuration.ConfigurationSection; -import com.plotsquared.core.configuration.Settings; -import com.plotsquared.core.configuration.caption.TranslatableCaption; -import com.plotsquared.core.database.DBFunc; -import com.plotsquared.core.location.Location; -import com.plotsquared.core.player.ConsolePlayer; -import com.plotsquared.core.player.PlotPlayer; -import com.plotsquared.core.util.task.TaskManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.Nonnull; - /** * plot functions * @deprecated Do not use diff --git a/Core/src/main/java/com/plotsquared/core/util/StringMan.java b/Core/src/main/java/com/plotsquared/core/util/StringMan.java index a6e6fcbfc..ad1e2e14c 100644 --- a/Core/src/main/java/com/plotsquared/core/util/StringMan.java +++ b/Core/src/main/java/com/plotsquared/core/util/StringMan.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.util; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import javax.annotation.Nonnull; import java.lang.reflect.Array; diff --git a/Core/src/main/java/com/plotsquared/core/util/WorldUtil.java b/Core/src/main/java/com/plotsquared/core/util/WorldUtil.java index 0cb676815..f02b1c19a 100644 --- a/Core/src/main/java/com/plotsquared/core/util/WorldUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/WorldUtil.java @@ -26,7 +26,7 @@ package com.plotsquared.core.util; import com.plotsquared.core.PlotSquared; -import com.plotsquared.core.configuration.Caption; +import com.plotsquared.core.configuration.caption.Caption; import com.plotsquared.core.location.Location; import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.plot.Plot;