Fix compile errors

This commit is contained in:
Alexander Brandes
2023-01-08 10:36:41 +01:00
parent 3198c3b081
commit 7135bdd6aa
9 changed files with 39 additions and 56 deletions

View File

@ -28,7 +28,6 @@ import com.plotsquared.core.generator.HybridUtils;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.expiration.ExpireManager;
import com.plotsquared.core.plot.expiration.PlotAnalysis;
import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag;

View File

@ -304,14 +304,14 @@ public class Merge extends SubCommand {
if (!force && this.econHandler.getMoney(player) < price) {
player.sendMessage(
TranslatableCaption.of("economy.cannot_afford_merge"),
Template.of("money", this.econHandler.format(price))
TagResolver.resolver("money", Tag.inserting(Component.text(this.econHandler.format(price))))
);
return false;
}
this.econHandler.withdrawMoney(player, price);
player.sendMessage(
TranslatableCaption.of("economy.removed_balance"),
Template.of("money", this.econHandler.format(price))
TagResolver.resolver("money", Tag.inserting(Component.text(this.econHandler.format(price))))
);
}
player.sendMessage(TranslatableCaption.of("merge.success_merge"));

View File

@ -40,6 +40,7 @@ import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.expiration.ExpireManager;
import com.plotsquared.core.plot.expiration.PlotAnalysis;
import com.plotsquared.core.plot.flag.FlagContainer;
import com.plotsquared.core.plot.flag.GlobalFlagContainer;
@ -2823,7 +2824,8 @@ public class Plot {
ComponentLike members = PlayerManager.getPlayerList(this.getMembers(), player);
ComponentLike denied = PlayerManager.getPlayerList(this.getDenied(), player);
ComponentLike seen;
if (Settings.Enabled_Components.PLOT_EXPIRY && ExpireManager.IMP != null) {
ExpireManager expireManager = PlotSquared.platform().expireManager();
if (Settings.Enabled_Components.PLOT_EXPIRY && expireManager != null) {
if (this.isOnline()) {
seen = TranslatableCaption.of("info.now").toComponent(player);
} else {

View File

@ -657,8 +657,10 @@ public abstract class PlotArea implements ComponentLike {
if (!buildRangeContainsY(y) && !Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
player.sendMessage(
TranslatableCaption.of("height.height_limit"),
Template.of("minHeight", String.valueOf(minBuildHeight)),
Template.of("maxHeight", String.valueOf(maxBuildHeight))
TagResolver.builder()
.tag("minHeight", Tag.inserting(Component.text(minBuildHeight)))
.tag("maxHeight",
Tag.inserting(Component.text(maxBuildHeight))).build()
);
// Return true if "failed" as the method will always be inverted otherwise
return true;

View File

@ -18,7 +18,7 @@
*/
package com.plotsquared.core.queue;
import com.intellectualsites.annotations.DoNotUse;
import com.intellectualsites.annotations.NotPublic;
import com.plotsquared.core.location.Location;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.function.pattern.Pattern;
@ -36,8 +36,10 @@ import org.checkerframework.checker.nullness.qual.Nullable;
* The min and max points of this queue are offset according to the minimum point given in the constructor, and the offsets set
* in {@link BlockArrayCacheScopedQueueCoordinator#setOffsetX(int)} and
* {@link BlockArrayCacheScopedQueueCoordinator#setOffsetZ(int)}
*
* Internal use only. Subject to change at any time and created for specific use cases.
*/
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to change at any time and created for specific use cases.")
@NotPublic
public class BlockArrayCacheScopedQueueCoordinator extends ZeroedDelegateScopedQueueCoordinator {
private final BlockState[][][] blockStates;

View File

@ -338,8 +338,10 @@ public class EventDispatcher {
.hasPermission(player, Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
player.sendMessage(
TranslatableCaption.of("height.height_limit"),
Template.of("minHeight", String.valueOf(area.getMinBuildHeight())),
Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight()))
TagResolver.builder()
.tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight())))
.tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight())))
.build()
);
return false;
}