Compare commits

..

1 Commits

10 changed files with 19 additions and 25 deletions

View File

@ -11,7 +11,7 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: PlotSquared Release DISCORD_USERNAME: PlotSquared Release
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
uses: Ilshidur/action-discord@0.3.2 uses: Ilshidur/action-discord@08d9328877d6954120eef2b07abbc79249bb6210 # ratchet:Ilshidur/action-discord@0.3.2
with: with:
args: | args: |
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>" "<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"

View File

@ -11,7 +11,7 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Validate Gradle Wrapper - name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1 uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:

View File

@ -11,7 +11,7 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Validate Gradle Wrapper - name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1 uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
@ -43,7 +43,7 @@ jobs:
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Publish core javadoc - name: Publish core javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}} if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
uses: cpina/github-action-push-to-another-repository@main uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73
env: env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with: with:
@ -55,7 +55,7 @@ jobs:
target-directory: v7/core target-directory: v7/core
- name: Publish bukkit javadoc - name: Publish bukkit javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}} if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
uses: cpina/github-action-push-to-another-repository@main uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
env: env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with: with:

View File

@ -22,10 +22,10 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v2 uses: github/codeql-action/autobuild@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2

View File

@ -270,7 +270,8 @@ public class StateWrapper {
if (!PaperLib.isPaper()) { if (!PaperLib.isPaper()) {
if (!paperErrorTextureSent) { if (!paperErrorTextureSent) {
paperErrorTextureSent = true; paperErrorTextureSent = true;
LOGGER.error("Failed to populate skull data in your road schematic - This is a Spigot limitation."); LOGGER.error("Failed to populate skull data in your road schematic - Please use Paper to correctly " +
"generate skulls in your road schematics!");
} }
return false; return false;
} }

View File

@ -103,7 +103,7 @@ public class Done extends SubCommand {
public void run(PlotAnalysis value) { public void run(PlotAnalysis value) {
plot.removeRunning(); plot.removeRunning();
boolean result = boolean result =
value.getComplexity(doneRequirements) >= doneRequirements.THRESHOLD; value.getComplexity(doneRequirements) <= doneRequirements.THRESHOLD;
finish(plot, player, result); finish(plot, player, result);
} }
}); });

View File

@ -20,6 +20,7 @@ package com.plotsquared.core.plot;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.plotsquared.core.PlotSquared; import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.command.Like; import com.plotsquared.core.command.Like;
@ -2417,6 +2418,7 @@ public class Plot {
if (!this.isMerged()) { if (!this.isMerged()) {
Location pos1 = this.getBottomAbs().withY(getArea().getMinBuildHeight()); Location pos1 = this.getBottomAbs().withY(getArea().getMinBuildHeight());
Location pos2 = this.getTopAbs().withY(getArea().getMaxBuildHeight()); Location pos2 = this.getTopAbs().withY(getArea().getMaxBuildHeight());
this.connectedCache = Sets.newHashSet(this);
CuboidRegion rg = new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()); CuboidRegion rg = new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3());
return Collections.singleton(rg); return Collections.singleton(rg);
} }

View File

@ -25,17 +25,11 @@ import com.plotsquared.core.plot.PlotAreaTerrainType;
import com.plotsquared.core.plot.PlotAreaType; import com.plotsquared.core.plot.PlotAreaType;
import com.plotsquared.core.plot.PlotId; import com.plotsquared.core.plot.PlotId;
import com.plotsquared.core.util.SetupUtils; import com.plotsquared.core.util.SetupUtils;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
public class PlotAreaBuilder { public class PlotAreaBuilder {
private String generatorName; private String generatorName;
private String plotManager; private String plotManager;
@Nullable
private PlotAreaType plotAreaType; private PlotAreaType plotAreaType;
private PlotAreaTerrainType terrainType; private PlotAreaTerrainType terrainType;
private String worldName; private String worldName;
@ -91,10 +85,8 @@ public class PlotAreaBuilder {
return this.plotManager; return this.plotManager;
} }
@NotNull
@Contract(" -> !null")
public PlotAreaType plotAreaType() { public PlotAreaType plotAreaType() {
return Objects.requireNonNullElse(this.plotAreaType, PlotAreaType.NORMAL); return this.plotAreaType;
} }
public PlotAreaTerrainType terrainType() { public PlotAreaTerrainType terrainType() {
@ -135,8 +127,7 @@ public class PlotAreaBuilder {
return this; return this;
} }
public PlotAreaBuilder plotAreaType(@NotNull PlotAreaType plotAreaType) { public PlotAreaBuilder plotAreaType(PlotAreaType plotAreaType) {
Objects.requireNonNull(plotAreaType, "PlotAreaType must not be null");
this.plotAreaType = plotAreaType; this.plotAreaType = plotAreaType;
return this; return this;
} }

View File

@ -17,7 +17,7 @@ plugins {
eclipse eclipse
idea idea
id("xyz.jpenilla.run-paper") version "2.1.0" id("xyz.jpenilla.run-paper") version "2.0.1"
} }
group = "com.plotsquared" group = "com.plotsquared"
@ -77,12 +77,12 @@ subprojects {
} }
dependencies { dependencies {
implementation(platform("com.intellectualsites.bom:bom-newest:1.27")) implementation(platform("com.intellectualsites.bom:bom-newest:1.25"))
} }
dependencies { dependencies {
// Tests // Tests
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3") testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
} }
plugins.withId("java") { plugins.withId("java") {

View File

@ -20,7 +20,7 @@ squirrelid = "0.3.2"
# Gradle plugins # Gradle plugins
shadow = "7.1.2" shadow = "7.1.2"
grgit = "4.1.1" grgit = "4.1.1"
spotless = "6.18.0" spotless = "6.17.0"
nexus = "1.3.0" nexus = "1.3.0"
[libraries] [libraries]