mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-10 01:24:43 +02:00
Compare commits
3 Commits
fix/4024
...
renovate/g
Author | SHA1 | Date | |
---|---|---|---|
ac309957d0 | |||
10a2b80ffc | |||
ca0f38255d |
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@ -22,10 +22,10 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
|
||||
uses: github/codeql-action/init@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
|
||||
uses: github/codeql-action/autobuild@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
|
||||
uses: github/codeql-action/analyze@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2
|
||||
|
@ -25,11 +25,17 @@ import com.plotsquared.core.plot.PlotAreaTerrainType;
|
||||
import com.plotsquared.core.plot.PlotAreaType;
|
||||
import com.plotsquared.core.plot.PlotId;
|
||||
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 {
|
||||
|
||||
private String generatorName;
|
||||
private String plotManager;
|
||||
@Nullable
|
||||
private PlotAreaType plotAreaType;
|
||||
private PlotAreaTerrainType terrainType;
|
||||
private String worldName;
|
||||
@ -85,8 +91,10 @@ public class PlotAreaBuilder {
|
||||
return this.plotManager;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Contract(" -> !null")
|
||||
public PlotAreaType plotAreaType() {
|
||||
return this.plotAreaType;
|
||||
return Objects.requireNonNullElse(this.plotAreaType, PlotAreaType.NORMAL);
|
||||
}
|
||||
|
||||
public PlotAreaTerrainType terrainType() {
|
||||
@ -127,7 +135,8 @@ public class PlotAreaBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public PlotAreaBuilder plotAreaType(PlotAreaType plotAreaType) {
|
||||
public PlotAreaBuilder plotAreaType(@NotNull PlotAreaType plotAreaType) {
|
||||
Objects.requireNonNull(plotAreaType, "PlotAreaType must not be null");
|
||||
this.plotAreaType = plotAreaType;
|
||||
return this;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ squirrelid = "0.3.2"
|
||||
# Gradle plugins
|
||||
shadow = "7.1.2"
|
||||
grgit = "4.1.1"
|
||||
spotless = "6.17.0"
|
||||
spotless = "6.18.0"
|
||||
nexus = "1.3.0"
|
||||
|
||||
[libraries]
|
||||
|
Reference in New Issue
Block a user