mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 11:45:19 +01:00
Fix compile errors
This commit is contained in:
parent
3198c3b081
commit
7135bdd6aa
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
@ -26,41 +26,3 @@ jobs:
|
||||
else
|
||||
echo "STATUS=release" >> $GITHUB_ENV
|
||||
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
|
||||
|
@ -114,6 +114,10 @@ import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
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")
|
||||
public class BlockEventListener implements Listener {
|
||||
|
||||
@ -734,7 +738,7 @@ public class BlockEventListener implements Listener {
|
||||
}
|
||||
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)) {
|
||||
plot.debug("Coral could not dry because coral-dry = false");
|
||||
event.setCancelled(true);
|
||||
@ -787,7 +791,10 @@ public class BlockEventListener implements Listener {
|
||||
}
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
@ -803,7 +810,10 @@ public class BlockEventListener implements Listener {
|
||||
toPlot.debug("Liquid could not flow because liquid-flow = disabled");
|
||||
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);
|
||||
} else if (event.getBlock().isLiquid()) {
|
||||
final org.bukkit.Location location = event.getBlock().getLocation();
|
||||
@ -1298,11 +1308,13 @@ public class BlockEventListener implements Listener {
|
||||
.tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight())))
|
||||
.build()
|
||||
);
|
||||
if (area.notifyIfOutsideBuildArea(pp, currentLocation.getY())) {
|
||||
event.setCancelled(true);
|
||||
break;
|
||||
if (area.notifyIfOutsideBuildArea(pp, currentLocation.getY())) {
|
||||
event.setCancelled(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.core.location.ChunkWrapper;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.queue.ZeroedDelegateScopedQueueCoordinator;
|
||||
import com.plotsquared.core.util.AnnotationHelper;
|
||||
import com.plotsquared.core.util.ChunkUtil;
|
||||
import com.plotsquared.core.util.PatternUtil;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
@ -45,7 +44,10 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
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 final Biome[] biomes;
|
||||
|
@ -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;
|
||||
|
@ -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"));
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user