Fix compile errors

This commit is contained in:
Alexander Brandes 2023-01-08 10:36:41 +01:00
parent 3198c3b081
commit 7135bdd6aa
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
9 changed files with 39 additions and 56 deletions

View File

@ -26,41 +26,3 @@ jobs:
else else
echo "STATUS=release" >> $GITHUB_ENV echo "STATUS=release" >> $GITHUB_ENV
fi fi
- name: Publish Release
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: Publish Snapshot
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6' }}
run: ./gradlew publishToSonatype
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Publish core javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'Core/build/docs/javadoc'
destination-github-username: 'IntellectualSites'
destination-repository-name: 'plotsquared-javadocs'
user-email: ${{ secrets.USER_EMAIL }}
target-branch: main
target-directory: core
- name: Publish bukkit javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'Bukkit/build/docs/javadoc'
destination-github-username: 'IntellectualSites'
destination-repository-name: 'plotsquared-javadocs'
user-email: ${{ secrets.USER_EMAIL }}
target-branch: main
target-directory: bukkit

View File

@ -114,6 +114,10 @@ import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import static org.bukkit.Tag.CORALS;
import static org.bukkit.Tag.CORAL_BLOCKS;
import static org.bukkit.Tag.WALL_CORALS;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class BlockEventListener implements Listener { public class BlockEventListener implements Listener {
@ -734,7 +738,7 @@ public class BlockEventListener implements Listener {
} }
return; return;
} }
if (Tag.CORAL_BLOCKS.isTagged(blockType) || Tag.CORALS.isTagged(blockType) || Tag.WALL_CORALS.isTagged(blockType)) { if (CORAL_BLOCKS.isTagged(blockType) || CORALS.isTagged(blockType) || WALL_CORALS.isTagged(blockType)) {
if (!plot.getFlag(CoralDryFlag.class)) { if (!plot.getFlag(CoralDryFlag.class)) {
plot.debug("Coral could not dry because coral-dry = false"); plot.debug("Coral could not dry because coral-dry = false");
event.setCancelled(true); event.setCancelled(true);
@ -787,7 +791,10 @@ public class BlockEventListener implements Listener {
} }
if (toPlot != null) { if (toPlot != null) {
if (!toArea.contains(fromLocation.getX(), fromLocation.getZ()) || !Objects.equals(toPlot, toArea.getOwnedPlot(fromLocation))) { if (!toArea.contains(fromLocation.getX(), fromLocation.getZ()) || !Objects.equals(
toPlot,
toArea.getOwnedPlot(fromLocation)
)) {
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
@ -803,7 +810,10 @@ public class BlockEventListener implements Listener {
toPlot.debug("Liquid could not flow because liquid-flow = disabled"); toPlot.debug("Liquid could not flow because liquid-flow = disabled");
event.setCancelled(true); event.setCancelled(true);
} }
} else if (!toArea.contains(fromLocation.getX(), fromLocation.getZ()) || !Objects.equals(null, toArea.getOwnedPlot(fromLocation))) { } else if (!toArea.contains(fromLocation.getX(), fromLocation.getZ()) || !Objects.equals(
null,
toArea.getOwnedPlot(fromLocation)
)) {
event.setCancelled(true); event.setCancelled(true);
} else if (event.getBlock().isLiquid()) { } else if (event.getBlock().isLiquid()) {
final org.bukkit.Location location = event.getBlock().getLocation(); final org.bukkit.Location location = event.getBlock().getLocation();
@ -1305,4 +1315,6 @@ public class BlockEventListener implements Listener {
} }
} }
}
} }

View File

@ -25,7 +25,6 @@ import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.location.ChunkWrapper; import com.plotsquared.core.location.ChunkWrapper;
import com.plotsquared.core.location.Location; import com.plotsquared.core.location.Location;
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator; import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
import com.plotsquared.core.util.AnnotationHelper;
import com.plotsquared.core.util.ChunkUtil; import com.plotsquared.core.util.ChunkUtil;
import com.plotsquared.core.util.PatternUtil; import com.plotsquared.core.util.PatternUtil;
import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.bukkit.BukkitAdapter;
@ -45,7 +44,10 @@ import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Arrays; import java.util.Arrays;
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.") /**
* Internal use only. Subject to changes at any time.
*/
@DoNotUse
public class GenChunk extends ZeroedDelegateScopedQueueCoordinator { public class GenChunk extends ZeroedDelegateScopedQueueCoordinator {
public final Biome[] biomes; public final Biome[] biomes;

View File

@ -28,7 +28,6 @@ import com.plotsquared.core.generator.HybridUtils;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea; 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.expiration.PlotAnalysis;
import com.plotsquared.core.plot.flag.GlobalFlagContainer; import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag; 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) { if (!force && this.econHandler.getMoney(player) < price) {
player.sendMessage( player.sendMessage(
TranslatableCaption.of("economy.cannot_afford_merge"), 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; return false;
} }
this.econHandler.withdrawMoney(player, price); this.econHandler.withdrawMoney(player, price);
player.sendMessage( player.sendMessage(
TranslatableCaption.of("economy.removed_balance"), 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")); 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.permissions.Permission;
import com.plotsquared.core.player.ConsolePlayer; import com.plotsquared.core.player.ConsolePlayer;
import com.plotsquared.core.player.PlotPlayer; 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.expiration.PlotAnalysis;
import com.plotsquared.core.plot.flag.FlagContainer; import com.plotsquared.core.plot.flag.FlagContainer;
import com.plotsquared.core.plot.flag.GlobalFlagContainer; import com.plotsquared.core.plot.flag.GlobalFlagContainer;
@ -2823,7 +2824,8 @@ public class Plot {
ComponentLike members = PlayerManager.getPlayerList(this.getMembers(), player); ComponentLike members = PlayerManager.getPlayerList(this.getMembers(), player);
ComponentLike denied = PlayerManager.getPlayerList(this.getDenied(), player); ComponentLike denied = PlayerManager.getPlayerList(this.getDenied(), player);
ComponentLike seen; 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()) { if (this.isOnline()) {
seen = TranslatableCaption.of("info.now").toComponent(player); seen = TranslatableCaption.of("info.now").toComponent(player);
} else { } 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)) { if (!buildRangeContainsY(y) && !Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
player.sendMessage( player.sendMessage(
TranslatableCaption.of("height.height_limit"), TranslatableCaption.of("height.height_limit"),
Template.of("minHeight", String.valueOf(minBuildHeight)), TagResolver.builder()
Template.of("maxHeight", String.valueOf(maxBuildHeight)) .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 if "failed" as the method will always be inverted otherwise
return true; return true;

View File

@ -18,7 +18,7 @@
*/ */
package com.plotsquared.core.queue; package com.plotsquared.core.queue;
import com.intellectualsites.annotations.DoNotUse; import com.intellectualsites.annotations.NotPublic;
import com.plotsquared.core.location.Location; import com.plotsquared.core.location.Location;
import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.function.pattern.Pattern; 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 * 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 * in {@link BlockArrayCacheScopedQueueCoordinator#setOffsetX(int)} and
* {@link BlockArrayCacheScopedQueueCoordinator#setOffsetZ(int)} * {@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 { public class BlockArrayCacheScopedQueueCoordinator extends ZeroedDelegateScopedQueueCoordinator {
private final BlockState[][][] blockStates; private final BlockState[][][] blockStates;

View File

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