mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 13:46:45 +01:00
Merge branch 'v6' into refactor/v6/update-mm
This commit is contained in:
commit
1b5dab3ddd
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2.3.5
|
||||
uses: actions/checkout@v2.4.0
|
||||
- name: Validate Gradle Wrapper"
|
||||
uses: gradle/wrapper-validation-action@v1.0.4
|
||||
- name: Setup Java
|
||||
|
13
.whitesource
Normal file
13
.whitesource
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"scanSettings": {
|
||||
"baseBranches": ["v6"]
|
||||
},
|
||||
"checkRunSettings": {
|
||||
"vulnerableCheckRunConclusionLevel": "success",
|
||||
"displayMode": "diff"
|
||||
},
|
||||
"issueSettings": {
|
||||
"minSeverityLevel": "LOW"
|
||||
},
|
||||
"enableRenovate": "true"
|
||||
}
|
@ -75,7 +75,7 @@ public class EntitySpawnListener implements Listener {
|
||||
|
||||
public static void testCreate(final Entity entity) {
|
||||
@NonNull World world = entity.getWorld();
|
||||
if (areaName == world.getName()) {
|
||||
if (areaName.equals(world.getName())) {
|
||||
} else {
|
||||
areaName = world.getName();
|
||||
hasPlotArea = PlotSquared.get().getPlotAreaManager().hasPlotArea(areaName);
|
||||
|
@ -58,6 +58,7 @@ import com.plotsquared.core.plot.flag.implementations.KeepFlag;
|
||||
import com.plotsquared.core.plot.flag.implementations.ServerPlotFlag;
|
||||
import com.plotsquared.core.plot.flag.types.DoubleFlag;
|
||||
import com.plotsquared.core.plot.schematic.Schematic;
|
||||
import com.plotsquared.core.plot.world.SinglePlotArea;
|
||||
import com.plotsquared.core.queue.QueueCoordinator;
|
||||
import com.plotsquared.core.util.EventDispatcher;
|
||||
import com.plotsquared.core.util.MathMan;
|
||||
@ -1512,6 +1513,12 @@ public class Plot {
|
||||
int z;
|
||||
if (loc.getX() == Integer.MAX_VALUE && loc.getZ() == Integer.MAX_VALUE) {
|
||||
// center
|
||||
if (getArea() instanceof SinglePlotArea) {
|
||||
int y = loc.getY() == Integer.MIN_VALUE
|
||||
? (isLoaded() ? this.worldUtil.getHighestBlockSynchronous(plot.getWorldName(), 0, 0) + 1 : 63)
|
||||
: loc.getY();
|
||||
return Location.at(plot.getWorldName(), 0, y, 0, 0, 0);
|
||||
}
|
||||
CuboidRegion largest = plot.getLargestRegion();
|
||||
x = (largest.getMaximumPoint().getX() >> 1) - (largest.getMinimumPoint().getX() >> 1) + largest
|
||||
.getMinimumPoint()
|
||||
@ -1530,6 +1537,10 @@ public class Plot {
|
||||
: loc.getY();
|
||||
return Location.at(plot.getWorldName(), x, y, z, loc.getYaw(), loc.getPitch());
|
||||
}
|
||||
if (getArea() instanceof SinglePlotArea) {
|
||||
int y = isLoaded() ? this.worldUtil.getHighestBlockSynchronous(plot.getWorldName(), 0, 0) + 1 : 63;
|
||||
return Location.at(plot.getWorldName(), 0, y, 0, 0, 0);
|
||||
}
|
||||
// Side
|
||||
return plot.getSideSynchronous();
|
||||
}
|
||||
@ -1551,6 +1562,10 @@ public class Plot {
|
||||
int z;
|
||||
if (loc.getX() == Integer.MAX_VALUE && loc.getZ() == Integer.MAX_VALUE) {
|
||||
// center
|
||||
if (getArea() instanceof SinglePlotArea) {
|
||||
x = 0;
|
||||
z = 0;
|
||||
} else {
|
||||
CuboidRegion largest = plot.getLargestRegion();
|
||||
x = (largest.getMaximumPoint().getX() >> 1) - (largest.getMinimumPoint().getX() >> 1) + largest
|
||||
.getMinimumPoint()
|
||||
@ -1558,6 +1573,7 @@ public class Plot {
|
||||
z = (largest.getMaximumPoint().getZ() >> 1) - (largest.getMinimumPoint().getZ() >> 1) + largest
|
||||
.getMinimumPoint()
|
||||
.getZ();
|
||||
}
|
||||
} else {
|
||||
// specific
|
||||
Location bot = plot.getBottomAbs();
|
||||
@ -1582,6 +1598,10 @@ public class Plot {
|
||||
return;
|
||||
}
|
||||
// Side
|
||||
if (getArea() instanceof SinglePlotArea) {
|
||||
int y = isLoaded() ? this.worldUtil.getHighestBlockSynchronous(plot.getWorldName(), 0, 0) + 1 : 63;
|
||||
result.accept(Location.at(plot.getWorldName(), 0, y, 0, 0, 0));
|
||||
}
|
||||
plot.getSide(result);
|
||||
}
|
||||
|
||||
|
@ -286,15 +286,13 @@ public class StringMan {
|
||||
}
|
||||
|
||||
public static boolean isEqualIgnoreCase(String a, String b) {
|
||||
return (a == b) || ((a != null) && (b != null) && (a.length() == b.length()) && a
|
||||
return (a.equals(b)) || ((a != null) && (b != null) && (a.length() == b.length()) && a
|
||||
.equalsIgnoreCase(b));
|
||||
}
|
||||
|
||||
public static String repeat(String s, int n) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < n; i++) {
|
||||
sb.append(s);
|
||||
}
|
||||
sb.append(String.valueOf(s).repeat(Math.max(0, n)));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
"web.plot_merged": "<prefix><red>This plot is merged and therefore cannot be downloaded</red>",
|
||||
"web.generating_link_failed": "<prefix><red>Failed to generate download link for plot <plot>!</red>",
|
||||
"web.generation_link_success": "<prefix><gold>Download: <gray><click:open_url:<download>><download></click></gray> \n Deletion: <gray><click:open_url:<delete>><delete></click></gray>\n<red>Attention: Opening the deletion link will delete the file immediately.</red></gold>",
|
||||
"web.generation_link_success_legacy_world": "<prefix><gold>Download: <gray><click:open_url:<url>><url></click></gray>",
|
||||
"web.generation_link_success_legacy_world": "<prefix><gold>Download: <gray><click:open_url:<url>><url></click></gray></gold>",
|
||||
"web.save_failed": "<prefix><red>Failed to save.</red>",
|
||||
"web.load_null": "<prefix><gray>Please use </gray><dark_aqua><command> </dark_aqua><gray>to get a list of schematics.</gray>",
|
||||
"web.load_failed": "<prefix><red>Failed to load schematic.</red>",
|
||||
|
@ -72,10 +72,18 @@ allprojects {
|
||||
|
||||
plugins.withId("java") {
|
||||
the<JavaPluginExtension>().toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(16))
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.compileJava.configure {
|
||||
options.release.set(16)
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
|
||||
}
|
||||
|
||||
configure<LicenseExtension> {
|
||||
header(rootProject.file("HEADER.txt"))
|
||||
include("**/*.java")
|
||||
|
@ -1,15 +1,15 @@
|
||||
[versions]
|
||||
# Minecraft expectations
|
||||
gson = "2.8.0" # Version set by Minecraft
|
||||
log4j-api = "2.16.0" # Version set by Minecraft
|
||||
guava = "21.0" # Version set by Minecraft
|
||||
gson = "2.8.9" # Version set by Minecraft
|
||||
log4j-api = "2.17.0" # Version set by Minecraft
|
||||
guava = "31.0.1-jre" # Version set by Minecraft
|
||||
|
||||
# Platform expectations
|
||||
paper = "1.17.1-R0.1-SNAPSHOT"
|
||||
checker-qual = "3.20.0"
|
||||
paper = "1.18.1-R0.1-SNAPSHOT"
|
||||
checker-qual = "3.21.0"
|
||||
guice = "5.0.1"
|
||||
findbugs = "3.0.1"
|
||||
snakeyaml = "1.28" # Version set by Bukkit
|
||||
snakeyaml = "1.30" # Version set by Bukkit
|
||||
|
||||
# Adventure & MiniMessage
|
||||
adventure-api = "4.10.0-SNAPSHOT"
|
||||
@ -19,9 +19,9 @@ adventure-platform-bukkit = "4.0.1"
|
||||
worldedit = "7.2.8"
|
||||
fawe = "1.17-419"
|
||||
vault = "1.7.1"
|
||||
placeholderapi = "2.10.10"
|
||||
placeholderapi = "2.11.0"
|
||||
luckperms = "5.3"
|
||||
essentialsx = "2.19.0"
|
||||
essentialsx = "2.19.2"
|
||||
hyperverse = "0.6.0-SNAPSHOT"
|
||||
mvdwapi = "3.1.1"
|
||||
|
||||
@ -30,7 +30,7 @@ prtree = "2.0.0"
|
||||
aopalliance = "1.0"
|
||||
rorledning = "1.4.0-SNAPSHOT"
|
||||
arkitektonika = "2.1.1"
|
||||
paster = "1.1.1"
|
||||
paster = "1.1.3"
|
||||
bstats = "2.2.1"
|
||||
paperlib = "1.0.7"
|
||||
squirrelid = "0.3.0"
|
||||
@ -38,7 +38,7 @@ serverlib = "2.3.1"
|
||||
http4j = "1.3"
|
||||
|
||||
# Gradle plugins
|
||||
shadow = "7.1.0"
|
||||
shadow = "7.1.1"
|
||||
grgit = "4.1.1"
|
||||
licenser = "0.6.1"
|
||||
nexus = "1.1.0"
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
Loading…
Reference in New Issue
Block a user