mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-16 12:24:43 +02:00
Compare commits
2 Commits
fix/false-
...
enhanced-s
Author | SHA1 | Date | |
---|---|---|---|
b8b5dd8d13 | |||
ad522358c7 |
@ -1,7 +1,7 @@
|
||||
name: Announce release on discord
|
||||
on:
|
||||
release:
|
||||
types: [ published ]
|
||||
types: [published]
|
||||
jobs:
|
||||
send_announcement:
|
||||
runs-on: ubuntu-latest
|
||||
|
4
.github/workflows/build-pr.yml
vendored
4
.github/workflows/build-pr.yml
vendored
@ -1,12 +1,12 @@
|
||||
name: Build PR
|
||||
on: [ pull_request ]
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
build_pr:
|
||||
if: github.repository_owner == 'IntellectualSites'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@ -2,7 +2,7 @@ name: build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v7
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository_owner == 'IntellectualSites'
|
||||
@ -28,7 +28,7 @@ jobs:
|
||||
echo "STATUS=release" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Publish Release
|
||||
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/v7'}}
|
||||
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
|
||||
@ -36,14 +36,20 @@ jobs:
|
||||
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/main' }}
|
||||
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v7' }}
|
||||
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/main'}}
|
||||
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73
|
||||
<<<<<<< HEAD
|
||||
# if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v7'}}
|
||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'snapshot' && github.event_name == 'push' && github.ref == 'refs/heads/v7'}}
|
||||
uses: cpina/github-action-push-to-another-repository@main
|
||||
=======
|
||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
|
||||
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
|
||||
>>>>>>> v6
|
||||
env:
|
||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||
with:
|
||||
@ -54,7 +60,8 @@ jobs:
|
||||
target-branch: main
|
||||
target-directory: v7/core
|
||||
- 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/v7'}}
|
||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'snapshot' && github.event_name == 'push' && github.ref == 'refs/heads/v7'}}
|
||||
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
|
||||
env:
|
||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||
|
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@ -1,10 +1,10 @@
|
||||
name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [ v7 ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
branches: [ v7 ]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
@ -17,7 +17,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'java' ]
|
||||
language: ['java']
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
6
.github/workflows/release-drafter.yml
vendored
6
.github/workflows/release-drafter.yml
vendored
@ -2,11 +2,11 @@ name: draft release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v6
|
||||
pull_request:
|
||||
types: [ opened, reopened, synchronize ]
|
||||
types: [opened, reopened, synchronize]
|
||||
pull_request_target:
|
||||
types: [ opened, reopened, synchronize ]
|
||||
types: [opened, reopened, synchronize]
|
||||
jobs:
|
||||
update_release_draft:
|
||||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
||||
|
@ -102,7 +102,7 @@ tasks {
|
||||
opt.links("https://jd.papermc.io/paper/1.19/")
|
||||
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
|
||||
opt.links("https://intellectualsites.github.io/plotsquared-javadocs/core/")
|
||||
opt.links("https://jd.advntr.dev/api/4.12.0/")
|
||||
opt.links("https://jd.adventure.kyori.net/api/4.12.0/")
|
||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||
opt.links("https://checkerframework.org/api/")
|
||||
opt.isLinkSource = true
|
||||
|
@ -49,8 +49,8 @@ import com.plotsquared.bukkit.player.BukkitPlayerManager;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.bukkit.util.BukkitWorld;
|
||||
import com.plotsquared.bukkit.util.SetGenCB;
|
||||
import com.plotsquared.bukkit.util.TranslationUpdateManager;
|
||||
import com.plotsquared.bukkit.util.UpdateUtility;
|
||||
import com.plotsquared.bukkit.util.TranslationUpdateManager;
|
||||
import com.plotsquared.bukkit.util.task.BukkitTaskManager;
|
||||
import com.plotsquared.bukkit.util.task.PaperTimeConverter;
|
||||
import com.plotsquared.bukkit.util.task.SpigotTimeConverter;
|
||||
@ -366,7 +366,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(ServerListener.class), this);
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(EntitySpawnListener.class), this);
|
||||
if (PaperLib.isPaper() && Settings.Paper_Components.PAPER_LISTENERS) {
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
|
||||
} else {
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(SpigotListener.class), this);
|
||||
}
|
||||
@ -1185,17 +1185,9 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
public @NonNull String worldEditImplementations() {
|
||||
StringBuilder msg = new StringBuilder();
|
||||
if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
|
||||
msg.append("FastAsyncWorldEdit: ").append(Bukkit
|
||||
.getPluginManager()
|
||||
.getPlugin("FastAsyncWorldEdit")
|
||||
.getDescription()
|
||||
.getVersion());
|
||||
msg.append("FastAsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit").getDescription().getVersion());
|
||||
} else if (Bukkit.getPluginManager().getPlugin("AsyncWorldEdit") != null) {
|
||||
msg.append("AsyncWorldEdit: ").append(Bukkit
|
||||
.getPluginManager()
|
||||
.getPlugin("AsyncWorldEdit")
|
||||
.getDescription()
|
||||
.getVersion()).append("\n");
|
||||
msg.append("AsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("AsyncWorldEdit").getDescription().getVersion()).append("\n");
|
||||
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
||||
} else {
|
||||
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
||||
|
@ -54,7 +54,7 @@ import java.util.Set;
|
||||
|
||||
public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BukkitPlotGenerator.class.getSimpleName());
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BukkitPlotGenerator.class.getSimpleName());
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final boolean PAPER_ASYNC_SAFE = true;
|
||||
@ -185,6 +185,12 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
world.setWaterAnimalSpawnLimit(limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* The entire method is deprecated, but kept for compatibility with versions lower than or equal to 1.16.2.
|
||||
* The method will be removed in future versions, because WorldEdit and FastAsyncWorldEdit only support the latest point
|
||||
* release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.11.0")
|
||||
@Override
|
||||
public void generateNoise(
|
||||
@NotNull final WorldInfo worldInfo,
|
||||
@ -277,11 +283,6 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
return super.getBaseHeight(worldInfo, random, x, z, heightMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* The entire method is deprecated, but kept for compatibility with versions lower than or equal to 1.16.2.
|
||||
* The method will be removed in future versions, because WorldEdit and FastAsyncWorldEdit only support the latest point
|
||||
* release.
|
||||
*/
|
||||
@SuppressWarnings("deprecation") // The entire method is deprecated, but kept for compatibility with <=1.16.2
|
||||
@Override
|
||||
@Deprecated(since = "TODO")
|
||||
@ -292,8 +293,8 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
if (this.platformGenerator != this) {
|
||||
return this.platformGenerator.generateChunkData(world, random, x, z, biome);
|
||||
} else {
|
||||
// Throw exception to be caught by the server that indicates the new generation API is being used.
|
||||
throw new UnsupportedOperationException("Using new generation methods. This method is unsupported.");
|
||||
// Return super as it will throw an exception caught by the server that will mean this method is no longer used.
|
||||
return super.generateChunkData(world, random, x, z, biome);
|
||||
}
|
||||
}
|
||||
|
||||
@ -416,8 +417,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
}
|
||||
PlotArea area = UncheckedWorldLocation.at(name, chunkX << 4, 0, chunkZ << 4).getPlotArea();
|
||||
if (area == null) {
|
||||
throw new IllegalStateException(String.format(
|
||||
"Cannot generate chunk that does not belong to a plot area. World: %s",
|
||||
throw new IllegalStateException(String.format("Cannot generate chunk that does not belong to a plot area. World: %s",
|
||||
name
|
||||
));
|
||||
}
|
||||
|
@ -759,9 +759,7 @@ public class BlockEventListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (block.getBlockData() instanceof Farmland farmland && event
|
||||
.getNewState()
|
||||
.getBlockData() instanceof Farmland newFarmland) {
|
||||
if (block.getBlockData() instanceof Farmland farmland && event.getNewState().getBlockData() instanceof Farmland newFarmland) {
|
||||
int currentMoisture = farmland.getMoisture();
|
||||
int newMoisture = newFarmland.getMoisture();
|
||||
|
||||
|
@ -92,11 +92,7 @@ public class BlockEventListener117 implements Listener {
|
||||
}
|
||||
|
||||
Plot plot = location.getOwnedPlot();
|
||||
if (plot == null && !PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(
|
||||
area,
|
||||
MiscInteractFlag.class,
|
||||
true
|
||||
) || plot != null && !plot.getFlag(
|
||||
if (plot == null && !PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, MiscInteractFlag.class, true) || plot != null && !plot.getFlag(
|
||||
MiscInteractFlag.class)) {
|
||||
if (plotPlayer != null) {
|
||||
if (plot != null) {
|
||||
|
@ -234,8 +234,7 @@ public class ChunkListener implements Listener {
|
||||
Chunk chunk = event.getChunk();
|
||||
if (Settings.Chunk_Processor.AUTO_TRIM) {
|
||||
String world = chunk.getWorld().getName();
|
||||
if ((!Settings.Enabled_Components.WORLDS || !SinglePlotArea.isSinglePlotWorld(world)) && this.plotAreaManager.hasPlotArea(
|
||||
world)) {
|
||||
if ((!Settings.Enabled_Components.WORLDS || !SinglePlotArea.isSinglePlotWorld(world)) && this.plotAreaManager.hasPlotArea(world)) {
|
||||
if (unloadChunk(world, chunk, true)) {
|
||||
return;
|
||||
}
|
||||
|
@ -43,10 +43,10 @@ import com.plotsquared.core.plot.flag.implementations.DoneFlag;
|
||||
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
||||
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.util.PlotFlagUtil;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
import com.plotsquared.core.util.PlotFlagUtil;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.TileState;
|
||||
@ -439,11 +439,9 @@ public class PaperListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean getBooleanFlagValue(
|
||||
@NonNull FlagContainer container,
|
||||
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
||||
boolean defaultValue
|
||||
) {
|
||||
private boolean getBooleanFlagValue(@NonNull FlagContainer container,
|
||||
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
||||
boolean defaultValue) {
|
||||
BooleanFlag<?> flag = container.getFlag(flagClass);
|
||||
return flag == null ? defaultValue : flag.getValue();
|
||||
}
|
||||
|
@ -572,8 +572,7 @@ public class PlayerEventListener implements Listener {
|
||||
if (now == null) {
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||
false)) {
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
TagResolver.resolver(
|
||||
@ -666,8 +665,7 @@ public class PlayerEventListener implements Listener {
|
||||
if (plot == null) {
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||
false)) {
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
TagResolver.resolver(
|
||||
|
@ -30,9 +30,9 @@ import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.PlotHandler;
|
||||
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.util.PlotFlagUtil;
|
||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
import com.plotsquared.core.util.PlotFlagUtil;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* PlotSquared, a land and world management plugin for Minecraft.
|
||||
* Copyright (C) IntellectualSites <https://intellectualsites.com>
|
||||
* Copyright (C) IntellectualSites team and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.plotsquared.bukkit.managers;
|
||||
|
||||
/*
|
||||
import com.google.inject.Singleton;
|
||||
import org.bukkit.World;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import se.hyperver.hyperverse.Hyperverse;
|
||||
import se.hyperver.hyperverse.world.WorldConfiguration;
|
||||
import se.hyperver.hyperverse.world.WorldConfigurationBuilder;
|
||||
import se.hyperver.hyperverse.world.WorldFeatures;
|
||||
import se.hyperver.hyperverse.world.WorldType;
|
||||
|
||||
Hyperverse implementation is currently put on ice until Hyperverse is released on a stable line and deployed to the central
|
||||
repository.
|
||||
|
||||
@Singleton
|
||||
public class HyperverseWorldManager extends BukkitWorldManager {
|
||||
|
||||
@Override
|
||||
public @Nullable World handleWorldCreation(@NonNull String worldName, @Nullable String generator) {
|
||||
// First let Bukkit register the world
|
||||
this.setGenerator(worldName, generator);
|
||||
// Create the world
|
||||
final WorldConfigurationBuilder worldConfigurationBuilder = WorldConfiguration.builder()
|
||||
.setName(worldName).setType(WorldType.OVER_WORLD);
|
||||
if (generator != null) {
|
||||
worldConfigurationBuilder.setGenerator(generator).setWorldFeatures(WorldFeatures.FLATLAND);
|
||||
}
|
||||
try {
|
||||
return Hyperverse.getApi().createWorld(worldConfigurationBuilder.createWorldConfiguration())
|
||||
.getBukkitWorld();
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "bukkit-hyperverse";
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
@ -43,7 +43,7 @@ public class BukkitOfflinePlayer implements OfflinePlotPlayer {
|
||||
*/
|
||||
public BukkitOfflinePlayer(
|
||||
final @NonNull OfflinePlayer player, final @NonNull
|
||||
PermissionHandler permissionHandler
|
||||
PermissionHandler permissionHandler
|
||||
) {
|
||||
this.player = player;
|
||||
this.permissionProfile = permissionHandler.getPermissionProfile(this)
|
||||
|
@ -176,10 +176,6 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
final Set<PermissionAttachmentInfo> effective = player.getEffectivePermissions();
|
||||
if (!effective.isEmpty()) {
|
||||
for (PermissionAttachmentInfo attach : effective) {
|
||||
// Ignore all "false" permissions
|
||||
if (!attach.getValue()) {
|
||||
continue;
|
||||
}
|
||||
String permStr = attach.getPermission();
|
||||
if (permStr.startsWith(stubPlus)) {
|
||||
hasAny = true;
|
||||
|
@ -270,7 +270,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
|
||||
if (getChunkObject() instanceof Chunk chunkObject) {
|
||||
existing = chunkObject.getBlock(x & 15, y, z & 15);
|
||||
} else {
|
||||
existing = getBukkitWorld().getBlockAt(x, y, z);
|
||||
existing = getBukkitWorld().getBlockAt(x, y, z);
|
||||
}
|
||||
final BlockState existingBaseBlock = BukkitAdapter.adapt(existing.getBlockData());
|
||||
if (BukkitBlockUtil.get(existing).equals(existingBaseBlock) && existing.getBlockData().matches(blockData)) {
|
||||
|
@ -62,6 +62,7 @@ public class GenChunk extends ZeroedDelegateScopedQueueCoordinator {
|
||||
/**
|
||||
* @param minY minimum world Y, inclusive
|
||||
* @param maxY maximum world Y, inclusive
|
||||
*
|
||||
* @since 6.6.0
|
||||
*/
|
||||
public GenChunk(int minY, int maxY) {
|
||||
|
@ -70,7 +70,7 @@ public class BukkitRegionManager extends RegionManager {
|
||||
@Inject
|
||||
public BukkitRegionManager(
|
||||
@NonNull WorldUtil worldUtil, @NonNull GlobalBlockQueue blockQueue, @NonNull
|
||||
ProgressSubscriberFactory subscriberFactory
|
||||
ProgressSubscriberFactory subscriberFactory
|
||||
) {
|
||||
super(worldUtil, blockQueue, subscriberFactory);
|
||||
this.blockQueue = blockQueue;
|
||||
|
@ -60,5 +60,4 @@ public class TranslationUpdateManager {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,8 +54,7 @@ public class UpdateUtility implements Listener {
|
||||
internalVersion = PlotSquared.get().getVersion();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"deprecation", "DefaultCharset"})
|
||||
// Suppress Json deprecation, we can't use features from gson 2.8.1 and newer yet
|
||||
@SuppressWarnings({"deprecation", "DefaultCharset"}) // Suppress Json deprecation, we can't use features from gson 2.8.1 and newer yet
|
||||
public void updateChecker() {
|
||||
task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
|
||||
try {
|
||||
|
@ -4,16 +4,16 @@ api-version: "1.13"
|
||||
version: "${version}"
|
||||
load: STARTUP
|
||||
description: "Easy, yet powerful Plot World generation and management."
|
||||
authors: [ Citymonstret, Empire92, MattBDev, dordsor21, NotMyFault, SirYwell ]
|
||||
authors: [Citymonstret, Empire92, MattBDev, dordsor21, NotMyFault, SirYwell]
|
||||
website: https://www.spigotmc.org/resources/77506/
|
||||
softdepend: [ Vault, PlaceholderAPI, Essentials, LuckPerms, BungeePerms, MVdWPlaceholderAPI ]
|
||||
loadbefore: [ MultiWorld, Multiverse-Core ]
|
||||
depend: [ WorldEdit ]
|
||||
softdepend: [Vault, PlaceholderAPI, Essentials, LuckPerms, BungeePerms, MVdWPlaceholderAPI]
|
||||
loadbefore: [MultiWorld, Multiverse-Core]
|
||||
depend: [WorldEdit]
|
||||
database: false
|
||||
commands:
|
||||
plots:
|
||||
description: Plot command.
|
||||
aliases: [ p,plot,ps,plotsquared,p2,2,plotme ]
|
||||
aliases: [p,plot,ps,plotsquared,p2,2,plotme]
|
||||
permission: plots.use
|
||||
permission-message: "You are lacking the permission node 'plots.use'"
|
||||
permissions:
|
||||
|
@ -23,13 +23,13 @@ include:
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
|
@ -68,8 +68,8 @@ tasks {
|
||||
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
|
||||
val opt = options as StandardJavadocDocletOptions
|
||||
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
|
||||
opt.links("https://jd.advntr.dev/api/4.12.0/")
|
||||
opt.links("https://jd.advntr.dev/text-minimessage/4.12.0/")
|
||||
opt.links("https://jd.adventure.kyori.net/api/4.12.0/")
|
||||
opt.links("https://jd.adventure.kyori.net/text-minimessage/4.12.0/")
|
||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||
opt.links("https://checkerframework.org/api/")
|
||||
opt.links("https://javadoc.io/doc/com.intellectualsites.informative-annotations/informative-annotations/latest/")
|
||||
|
@ -270,11 +270,7 @@ public class PlotSquared {
|
||||
captionMap = this.captionLoader.loadAll(this.platform.getDirectory().toPath().resolve("lang"));
|
||||
} else {
|
||||
String fileName = "messages_" + Settings.Enabled_Components.DEFAULT_LOCALE + ".json";
|
||||
captionMap = this.captionLoader.loadOrCreateSingle(this.platform
|
||||
.getDirectory()
|
||||
.toPath()
|
||||
.resolve("lang")
|
||||
.resolve(fileName));
|
||||
captionMap = this.captionLoader.loadOrCreateSingle(this.platform.getDirectory().toPath().resolve("lang").resolve(fileName));
|
||||
}
|
||||
this.captionMaps.put(TranslatableCaption.DEFAULT_NAMESPACE, captionMap);
|
||||
LOGGER.info(
|
||||
@ -1015,7 +1011,7 @@ public class PlotSquared {
|
||||
|
||||
/**
|
||||
* Setup the configuration for a plot world based on world arguments.
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* <i>e.g. /mv create <world> normal -g PlotSquared:<args></i>
|
||||
*
|
||||
|
@ -141,24 +141,24 @@ public class SimpleBackupManager implements BackupManager {
|
||||
) {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final PlotCacheKey that = (PlotCacheKey) o;
|
||||
return Objects.equals(plot.getArea(), that.plot.getArea())
|
||||
&& Objects.equals(plot.getId(), that.plot.getId())
|
||||
&& Objects.equals(plot.getOwnerAbs(), that.plot.getOwnerAbs());
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(plot.getArea(), plot.getId(), plot.getOwnerAbs());
|
||||
}
|
||||
final PlotCacheKey that = (PlotCacheKey) o;
|
||||
return Objects.equals(plot.getArea(), that.plot.getArea())
|
||||
&& Objects.equals(plot.getId(), that.plot.getId())
|
||||
&& Objects.equals(plot.getOwnerAbs(), that.plot.getOwnerAbs());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(plot.getArea(), plot.getId(), plot.getOwnerAbs());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -70,8 +70,7 @@ public class Add extends Command {
|
||||
plot.isOwner(player.getUUID()) || player.hasPermission(Permission.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
TranslatableCaption.of("permission.no_plot_perms")
|
||||
);
|
||||
checkTrue(
|
||||
args.length == 1,
|
||||
checkTrue(args.length == 1,
|
||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
TagResolver.resolver("value", Tag.inserting(Component.text("/plot add <player | *>")))
|
||||
);
|
||||
|
@ -69,8 +69,7 @@ public class Copy extends SubCommand {
|
||||
|
||||
plot1.getPlotModificationManager().copy(plot2, player).thenAccept(result -> {
|
||||
if (result) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("move.copy_success"),
|
||||
player.sendMessage(TranslatableCaption.of("move.copy_success"),
|
||||
TagResolver.builder()
|
||||
.tag("origin", Tag.inserting(Component.text(plot1.toString())))
|
||||
.tag("target", Tag.inserting(Component.text(plot2.toString())))
|
||||
|
@ -71,9 +71,9 @@ public class DebugPaste extends SubCommand {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(
|
||||
"""
|
||||
# Welcome to this paste
|
||||
# It is meant to provide us at IntellectualSites with better information about your problem
|
||||
"""
|
||||
# Welcome to this paste
|
||||
# It is meant to provide us at IntellectualSites with better information about your problem
|
||||
"""
|
||||
);
|
||||
b.append("# PlotSquared Information\n");
|
||||
b.append("PlotSquared Version: ").append(PlotSquared.get().getVersion())
|
||||
|
@ -185,25 +185,22 @@ public class Download extends SubCommand {
|
||||
if (Settings.Web.LEGACY_WEBINTERFACE) {
|
||||
schematicHandler
|
||||
.getCompoundTag(plot)
|
||||
.whenComplete((compoundTag, throwable) -> schematicHandler.upload(
|
||||
compoundTag,
|
||||
null,
|
||||
null,
|
||||
new RunnableVal<>() {
|
||||
@Override
|
||||
public void run(URL value) {
|
||||
plot.removeRunning();
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("web.generation_link_success"),
|
||||
TagResolver.builder()
|
||||
.tag("download", Tag.preProcessParsed(value.toString()))
|
||||
.tag("delete", Tag.preProcessParsed("Not available"))
|
||||
.build()
|
||||
);
|
||||
player.sendMessage(StaticCaption.of(value.toString()));
|
||||
}
|
||||
.whenComplete((compoundTag, throwable) -> {
|
||||
schematicHandler.upload(compoundTag, null, null, new RunnableVal<>() {
|
||||
@Override
|
||||
public void run(URL value) {
|
||||
plot.removeRunning();
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("web.generation_link_success"),
|
||||
TagResolver.builder()
|
||||
.tag("download", Tag.preProcessParsed(value.toString()))
|
||||
.tag("delete", Tag.preProcessParsed("Not available"))
|
||||
.build()
|
||||
);
|
||||
player.sendMessage(StaticCaption.of(value.toString()));
|
||||
}
|
||||
));
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
// TODO legacy support
|
||||
|
@ -134,12 +134,7 @@ public class Help extends Command {
|
||||
TagResolver.builder()
|
||||
.tag("command", Tag.inserting(Component.text("/plot help")))
|
||||
.tag("category", Tag.inserting(Component.text("all")))
|
||||
.tag(
|
||||
"category_desc",
|
||||
Tag.inserting(TranslatableCaption
|
||||
.of("help.help_display_all_commands")
|
||||
.toComponent(player))
|
||||
)
|
||||
.tag("category_desc", Tag.inserting(TranslatableCaption.of("help.help_display_all_commands").toComponent(player)))
|
||||
.build()
|
||||
));
|
||||
builder.append(Component.newline()).append(MINI_MESSAGE.deserialize(TranslatableCaption
|
||||
|
@ -52,9 +52,8 @@ public class Info extends SubCommand {
|
||||
arg = args[0];
|
||||
switch (arg) {
|
||||
// TODO: (re?)implement /plot info inv. (it was never properly implemented)
|
||||
case "trusted", "alias", "biome", "denied", "flags", "id", "size", "members", "creationdate", "seen", "owner", "rating", "likes" ->
|
||||
plot = Plot
|
||||
.getPlotFromString(player, null, false);
|
||||
case "trusted", "alias", "biome", "denied", "flags", "id", "size", "members", "creationdate", "seen", "owner", "rating", "likes" -> plot = Plot
|
||||
.getPlotFromString(player, null, false);
|
||||
default -> {
|
||||
plot = Plot.getPlotFromString(player, arg, false);
|
||||
if (args.length == 2) {
|
||||
|
@ -476,11 +476,11 @@ public class ListCmd extends SubCommand {
|
||||
for (final UUIDMapping uuidMapping : names) {
|
||||
PlotPlayer<?> pp = PlotSquared.platform().playerManager().getPlayerIfExists(uuidMapping.uuid());
|
||||
TagResolver resolver = TagResolver.builder()
|
||||
.tag("prefix", Tag.inserting(Component.text(prefix)))
|
||||
.tag("player", Tag.inserting(Component.text(uuidMapping.username())))
|
||||
.build();
|
||||
if (pp != null) {
|
||||
builder.append(MINI_MESSAGE.deserialize(online, resolver));
|
||||
.tag("prefix", Tag.inserting(Component.text(prefix)))
|
||||
.tag("player", Tag.inserting(Component.text(uuidMapping.username())))
|
||||
.build();
|
||||
if (pp != null) {
|
||||
builder.append(MINI_MESSAGE.deserialize(online, resolver));
|
||||
} else if (uuidMapping.username().equalsIgnoreCase("unknown")) {
|
||||
TagResolver unknownResolver = TagResolver.resolver(
|
||||
"info.unknown",
|
||||
|
@ -221,8 +221,7 @@ public class Purge extends SubCommand {
|
||||
ids.add(plot.temp);
|
||||
if (finalClear) {
|
||||
plot.getPlotModificationManager().clear(false, true, player,
|
||||
() -> LOGGER.info("Plot {} cleared by purge", plot.getId())
|
||||
);
|
||||
() -> LOGGER.info("Plot {} cleared by purge", plot.getId()));
|
||||
} else {
|
||||
plot.getPlotModificationManager().removeSign();
|
||||
}
|
||||
|
@ -49,8 +49,7 @@ public record ComponentPreset(
|
||||
public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) {
|
||||
final ClassicPlotManagerComponent classicPlotManagerComponent = ClassicPlotManagerComponent
|
||||
.fromString(map.getOrDefault("component", "").toString()).orElseThrow(() ->
|
||||
new IllegalArgumentException("The preset in components.yml needs a valid target component, got: " + map.get(
|
||||
"component")));
|
||||
new IllegalArgumentException("The preset in components.yml needs a valid target component, got: " + map.get("component")));
|
||||
final String pattern = map.getOrDefault("pattern", "").toString();
|
||||
final double cost = Double.parseDouble(map.getOrDefault("cost", "0.0").toString());
|
||||
final String permission = map.getOrDefault("permission", "").toString();
|
||||
|
@ -42,6 +42,32 @@ public class Config {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + Config.class.getSimpleName());
|
||||
|
||||
/**
|
||||
* Get the value for a node<br>
|
||||
* Probably throws some error if you try to get a non existent key
|
||||
*
|
||||
* @param key configuration key
|
||||
* @param root configuration class
|
||||
* @param <T> value type
|
||||
* @return value
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T get(String key, Class<?> root) {
|
||||
String[] split = key.split("\\.");
|
||||
Object instance = getInstance(split, root);
|
||||
if (instance != null) {
|
||||
Field field = getField(split, instance);
|
||||
if (field != null) {
|
||||
try {
|
||||
return (T) field.get(instance);
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a specific node<br>
|
||||
* Probably throws some error if you supply non existing keys or invalid values
|
||||
@ -233,6 +259,7 @@ public class Config {
|
||||
*
|
||||
* @param split the node (split by period)
|
||||
* @param instance the instance
|
||||
* @return
|
||||
*/
|
||||
private static Field getField(String[] split, Object instance) {
|
||||
try {
|
||||
@ -418,6 +445,10 @@ public class Config {
|
||||
return INSTANCES.values();
|
||||
}
|
||||
|
||||
public Collection<String> getSections() {
|
||||
return INSTANCES.keySet();
|
||||
}
|
||||
|
||||
private Map<String, T> getRaw() {
|
||||
return INSTANCES;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ public final class CaptionLoader {
|
||||
*/
|
||||
public @NonNull CaptionMap loadOrCreateSingle(final @NonNull Path file) throws IOException {
|
||||
final Locale locale = this.localeExtractor.apply(file);
|
||||
if (!Files.exists(file)) {
|
||||
if (!Files.exists(file) ) {
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
patch(map, locale);
|
||||
save(file, map);
|
||||
|
@ -56,8 +56,7 @@ final class ClassLoaderCaptionProvider implements DefaultCaptionProvider {
|
||||
LOGGER.info("No resource for locale '{}' found in the plugin file." +
|
||||
"Please ensure you have placed the latest version of the file messages_{}.json in the 'lang' folder." +
|
||||
"You may be able to find completed translations at https://intellectualsites.crowdin.com/plotsquared",
|
||||
locale, locale
|
||||
);
|
||||
locale, locale);
|
||||
return null;
|
||||
}
|
||||
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {
|
||||
|
@ -22,7 +22,7 @@ import com.sk89q.worldedit.entity.Entity;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* @since 6.11.1
|
||||
* @since TODO
|
||||
*/
|
||||
public abstract class EntityEvent {
|
||||
|
||||
@ -53,8 +53,7 @@ public abstract class EntityEvent {
|
||||
* @return the event class name
|
||||
* @since 6.11.0
|
||||
*/
|
||||
@NonNull
|
||||
public String getEventName() {
|
||||
@NonNull public String getEventName() {
|
||||
if (this.name == null) {
|
||||
this.name = this.getClass().getSimpleName();
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ import javax.annotation.Nullable;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ClassicPlotWorld.class.getSimpleName());
|
||||
|
||||
public int ROAD_HEIGHT = 62;
|
||||
@ -65,21 +64,6 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
||||
super(worldName, id, generator, min, max, worldConfiguration, blockQueue);
|
||||
}
|
||||
|
||||
private static BlockBucket createCheckedBlockBucket(String input, BlockBucket def) {
|
||||
final BlockBucket bucket = new BlockBucket(input);
|
||||
Pattern pattern = null;
|
||||
try {
|
||||
pattern = bucket.toPattern();
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
if (pattern == null) {
|
||||
LOGGER.error("Failed to parse pattern '{}', check your worlds.yml", input);
|
||||
LOGGER.error("Falling back to {}", def);
|
||||
return def;
|
||||
}
|
||||
return bucket;
|
||||
}
|
||||
|
||||
/**
|
||||
* CONFIG NODE | DEFAULT VALUE | DESCRIPTION | CONFIGURATION TYPE | REQUIRED FOR INITIAL SETUP.
|
||||
*
|
||||
@ -160,4 +144,19 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
||||
return Math.min(WALL_HEIGHT, plotRoadMin);
|
||||
}
|
||||
|
||||
private static BlockBucket createCheckedBlockBucket(String input, BlockBucket def) {
|
||||
final BlockBucket bucket = new BlockBucket(input);
|
||||
Pattern pattern = null;
|
||||
try {
|
||||
pattern = bucket.toPattern();
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
if (pattern == null) {
|
||||
LOGGER.error("Failed to parse pattern '{}', check your worlds.yml", input);
|
||||
LOGGER.error("Falling back to {}", def);
|
||||
return def;
|
||||
}
|
||||
return bucket;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -341,10 +341,7 @@ public class HybridGen extends IndependentPlotGenerator {
|
||||
for (Entity entity : hybridPlotWorld.getPlotSchematicEntities()) {
|
||||
if (region.contains(entity.getLocation().toVector().toBlockPoint())) {
|
||||
Vector3 pos = (entity.getLocation().toVector()
|
||||
.subtract(region
|
||||
.getMinimumPoint()
|
||||
.withY(hybridPlotWorld.getPlotSchematicMinPoint().getY())
|
||||
.toVector3()))
|
||||
.subtract(region.getMinimumPoint().withY(hybridPlotWorld.getPlotSchematicMinPoint().getY()).toVector3()))
|
||||
.add(min.getBlockVector3().withY(hybridPlotWorld.SCHEM_Y).toVector3());
|
||||
result.setEntity(new PopulatingEntity(
|
||||
entity,
|
||||
@ -402,12 +399,6 @@ public class HybridGen extends IndependentPlotGenerator {
|
||||
return biome == null ? hybridPlotWorld.getPlotBiome() : biome;
|
||||
}
|
||||
|
||||
private enum SchematicFeature {
|
||||
BIOMES,
|
||||
ROAD,
|
||||
POPULATING
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper to allow a WorldEdit {@link Entity} to effectively have a mutable location as the location in its NBT should be changed
|
||||
* when set to the world.
|
||||
@ -462,4 +453,10 @@ public class HybridGen extends IndependentPlotGenerator {
|
||||
|
||||
}
|
||||
|
||||
private enum SchematicFeature {
|
||||
BIOMES,
|
||||
ROAD,
|
||||
POPULATING
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -141,11 +141,7 @@ public class HybridPlotManager extends ClassicPlotManager {
|
||||
(pos1.getX() + pos2.getX()) / 2,
|
||||
(pos1.getZ() + pos2.getZ()) / 2
|
||||
), biome)) {
|
||||
WorldUtil.setBiome(
|
||||
hybridPlotWorld.getWorldName(),
|
||||
new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()),
|
||||
biome
|
||||
);
|
||||
WorldUtil.setBiome(hybridPlotWorld.getWorldName(), new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()), biome);
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,18 +203,8 @@ public class HybridPlotManager extends ClassicPlotManager {
|
||||
PlotId id2 = PlotId.of(id.getX(), id.getY() + 1);
|
||||
Location bot = getPlotBottomLocAbs(id2);
|
||||
Location top = getPlotTopLocAbs(id);
|
||||
Location pos1 = Location.at(
|
||||
hybridPlotWorld.getWorldName(),
|
||||
bot.getX() - 1,
|
||||
hybridPlotWorld.getMinGenHeight(),
|
||||
top.getZ() + 1
|
||||
);
|
||||
Location pos2 = Location.at(
|
||||
hybridPlotWorld.getWorldName(),
|
||||
top.getX() + 1,
|
||||
hybridPlotWorld.getMaxGenHeight(),
|
||||
bot.getZ()
|
||||
);
|
||||
Location pos1 = Location.at(hybridPlotWorld.getWorldName(), bot.getX() - 1, hybridPlotWorld.getMinGenHeight(), top.getZ() + 1);
|
||||
Location pos2 = Location.at(hybridPlotWorld.getWorldName(), top.getX() + 1, hybridPlotWorld.getMaxGenHeight(), bot.getZ());
|
||||
this.resetBiome(hybridPlotWorld, pos1, pos2);
|
||||
if (!hybridPlotWorld.ROAD_SCHEMATIC_ENABLED) {
|
||||
return true;
|
||||
|
@ -544,6 +544,14 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
||||
return schem1PopulationNeeded || schem2PopulationNeeded || schem3PopulationNeeded;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated in favour of {@link HybridPlotWorld#getSchematicRoot()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
||||
public File getRoot() {
|
||||
return this.root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the root folder for this world's generation schematics. May be null if schematics not initialised via
|
||||
* {@link HybridPlotWorld#setupSchematics()}
|
||||
|
@ -63,6 +63,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import java.io.File;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@ -379,6 +380,22 @@ public class HybridUtils {
|
||||
run.run();
|
||||
}
|
||||
|
||||
public int checkModified(QueueCoordinator queue, int x1, int x2, int y1, int y2, int z1, int z2, BlockState[] blocks) {
|
||||
int count = 0;
|
||||
for (int y = y1; y <= y2; y++) {
|
||||
for (int x = x1; x <= x2; x++) {
|
||||
for (int z = z1; z <= z2; z++) {
|
||||
BlockState block = queue.getBlock(x, y, z);
|
||||
boolean same = Arrays.stream(blocks).anyMatch(p -> this.worldUtil.isBlockSame(block, p));
|
||||
if (!same) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public final ArrayList<BlockVector2> getChunks(BlockVector2 region) {
|
||||
ArrayList<BlockVector2> chunks = new ArrayList<>();
|
||||
int sx = region.getX() << 5;
|
||||
|
@ -57,8 +57,7 @@ public abstract class IndependentPlotGenerator {
|
||||
* @param setting PlotArea (settings)
|
||||
* @since TODO
|
||||
*/
|
||||
public void populateChunk(ZeroedDelegateScopedQueueCoordinator result, PlotArea setting) {
|
||||
}
|
||||
public void populateChunk(ZeroedDelegateScopedQueueCoordinator result, PlotArea setting) {}
|
||||
|
||||
/**
|
||||
* Return a new PlotArea object.
|
||||
@ -104,9 +103,9 @@ public abstract class IndependentPlotGenerator {
|
||||
* Get the biome to be generated at a specific point
|
||||
*
|
||||
* @param settings PlotArea settings to provide biome
|
||||
* @param x World x position
|
||||
* @param y World y position
|
||||
* @param z World z position
|
||||
* @param x World x position
|
||||
* @param y World y position
|
||||
* @param z World z position
|
||||
* @return Biome type to be generated
|
||||
* @since TODO
|
||||
*/
|
||||
|
@ -142,9 +142,7 @@ public class PlotListener {
|
||||
Map.Entry<UUID, List<StatusEffect>> entry = iterator.next();
|
||||
List<StatusEffect> effects = entry.getValue();
|
||||
effects.removeIf(effect -> currentTime > effect.expiresAt);
|
||||
if (effects.isEmpty()) {
|
||||
iterator.remove();
|
||||
}
|
||||
if (effects.isEmpty()) iterator.remove();
|
||||
}
|
||||
}
|
||||
}, TaskTime.seconds(1L));
|
||||
@ -488,9 +486,8 @@ public class PlotListener {
|
||||
|
||||
/**
|
||||
* Marks an effect as a status effect that will be removed on leaving a plot
|
||||
*
|
||||
* @param uuid The uuid of the player the effect belongs to
|
||||
* @param name The name of the status effect
|
||||
* @param uuid The uuid of the player the effect belongs to
|
||||
* @param name The name of the status effect
|
||||
* @param expiresAt The time when the effect expires
|
||||
* @since 6.10.0
|
||||
*/
|
||||
@ -521,10 +518,10 @@ public class PlotListener {
|
||||
private record StatusEffect(@NonNull String name, long expiresAt) {
|
||||
|
||||
private StatusEffect(@NonNull String name, long expiresAt) {
|
||||
this.name = name;
|
||||
this.expiresAt = expiresAt;
|
||||
this.name = name;
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ public final class UncheckedWorldLocation extends Location {
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @return New location
|
||||
*
|
||||
* @since 6.9.0
|
||||
*/
|
||||
@DoNotUse
|
||||
|
@ -222,13 +222,13 @@ public final class BlockBucket implements ConfigurationSerializable {
|
||||
) {
|
||||
|
||||
public int getWeight() {
|
||||
return max - min;
|
||||
}
|
||||
return max - min;
|
||||
}
|
||||
|
||||
public boolean isInRange(final int num) {
|
||||
return num <= max && num >= min;
|
||||
}
|
||||
public boolean isInRange(final int num) {
|
||||
return num <= max && num >= min;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -658,10 +658,8 @@ public abstract class PlotArea implements ComponentLike {
|
||||
TranslatableCaption.of("height.height_limit"),
|
||||
TagResolver.builder()
|
||||
.tag("minHeight", Tag.inserting(Component.text(minBuildHeight)))
|
||||
.tag(
|
||||
"maxHeight",
|
||||
Tag.inserting(Component.text(maxBuildHeight))
|
||||
).build()
|
||||
.tag("maxHeight",
|
||||
Tag.inserting(Component.text(maxBuildHeight))).build()
|
||||
);
|
||||
// Return true if "failed" as the method will always be inverted otherwise
|
||||
return true;
|
||||
@ -1019,7 +1017,7 @@ public abstract class PlotArea implements ComponentLike {
|
||||
*
|
||||
* @param plotIds List of plot IDs to merge
|
||||
* @param removeRoads If the roads between plots should be removed
|
||||
* @param whenDone Task to run when any merge world changes are complete. Also runs if no changes were made. Does not
|
||||
* @param whenDone Task to run when any merge world changes are complete. Also runs if no changes were made. Does not
|
||||
* run if there was an error or if too few plots IDs were supplied.
|
||||
* @return if merges were completed successfully.
|
||||
* @since 6.9.0
|
||||
|
@ -100,7 +100,7 @@ public class PlotInventory {
|
||||
* Put an item into this inventory
|
||||
*
|
||||
* @param index the index (= slot) where to place the item
|
||||
* @param item the item to place
|
||||
* @param item the item to place
|
||||
* @see #setItemChecked(int, PlotItemStack)
|
||||
*/
|
||||
public void setItem(int index, PlotItemStack item) {
|
||||
|
@ -79,6 +79,14 @@ public class PlotSettings {
|
||||
this.ratings = ratings;
|
||||
}
|
||||
|
||||
public boolean setMerged(int direction, boolean merged) {
|
||||
if (this.merged[direction] != merged) {
|
||||
this.merged[direction] = merged;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean setMerged(Direction direction, boolean merged) {
|
||||
if (Direction.ALL == direction) {
|
||||
throw new IllegalArgumentException("You cannot use Direction.ALL in this method!");
|
||||
|
@ -154,7 +154,6 @@ public class ExpiryTask {
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this task respects unknown owners
|
||||
*
|
||||
* @return {@code true} if unknown owners should be counted as never online
|
||||
* @since 6.4.0
|
||||
*/
|
||||
|
@ -27,7 +27,7 @@ public class BeaconEffectsFlag extends BooleanFlag<BeaconEffectsFlag> {
|
||||
public static final BeaconEffectsFlag BEACON_EFFECT_TRUE = new BeaconEffectsFlag(true);
|
||||
public static final BeaconEffectsFlag BEACON_EFFECT_FALSE = new BeaconEffectsFlag(false);
|
||||
|
||||
private BeaconEffectsFlag(boolean value) {
|
||||
private BeaconEffectsFlag(boolean value){
|
||||
super(value, TranslatableCaption.of("flags.flag_description_beacon_effect"));
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class ProjectilesFlag extends BooleanFlag<ProjectilesFlag> {
|
||||
public static final ProjectilesFlag PROJECTILES_TRUE = new ProjectilesFlag(true);
|
||||
public static final ProjectilesFlag PROJECTILES_FALSE = new ProjectilesFlag(false);
|
||||
|
||||
private ProjectilesFlag(boolean value) {
|
||||
private ProjectilesFlag(boolean value){
|
||||
super(value, TranslatableCaption.of("flags.flag_description_projectiles"));
|
||||
}
|
||||
|
||||
|
@ -82,10 +82,10 @@ public abstract class TimedFlag<T, F extends PlotFlag<TimedFlag.Timed<T>, F>>
|
||||
) {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%d %s", interval, value);
|
||||
public String toString() {
|
||||
return String.format("%d %s", interval, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -76,7 +76,6 @@ public class SinglePlotArea extends GridPlotWorld {
|
||||
* Returns true if the given string matches the naming system used to identify single plot worlds
|
||||
* e.g. -1_5 represents plot id *;-1;5. "*" being the plot area name given to single plot world
|
||||
* {@link com.plotsquared.core.plot.PlotArea}.
|
||||
*
|
||||
* @since 6.1.4
|
||||
*/
|
||||
public static boolean isSinglePlotWorld(String worldName) {
|
||||
|
@ -36,7 +36,7 @@ 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)}
|
||||
* <p>
|
||||
*
|
||||
* Internal use only. Subject to change at any time and created for specific use cases.
|
||||
*/
|
||||
@NotPublic
|
||||
@ -54,7 +54,6 @@ public class BlockArrayCacheScopedQueueCoordinator extends ZeroedDelegateScopedQ
|
||||
private final int scopeMaxZ;
|
||||
private int offsetX = 0;
|
||||
private int offsetZ = 0;
|
||||
|
||||
/**
|
||||
* Construct a new instance
|
||||
*
|
||||
|
@ -29,7 +29,6 @@ public abstract class ChunkCoordinator implements Runnable {
|
||||
|
||||
/**
|
||||
* Cancel the chunk coordinator.
|
||||
*
|
||||
* @since 6.0.10
|
||||
*/
|
||||
public abstract void cancel();
|
||||
|
@ -43,10 +43,11 @@ import java.util.function.Consumer;
|
||||
|
||||
public abstract class QueueCoordinator {
|
||||
|
||||
private final AtomicBoolean enqueued = new AtomicBoolean();
|
||||
private boolean forceSync = false;
|
||||
@Nullable
|
||||
private Object chunkObject;
|
||||
private final AtomicBoolean enqueued = new AtomicBoolean();
|
||||
|
||||
@SuppressWarnings({"unused", "FieldCanBeLocal"})
|
||||
@Inject
|
||||
private GlobalBlockQueue blockQueue;
|
||||
|
@ -65,9 +65,9 @@ public final class LockRepository {
|
||||
* @param runnable Action to run when the lock is available
|
||||
*/
|
||||
public void useLock(final @NonNull LockKey key, final @NonNull Runnable runnable) {
|
||||
try (LockAccess ignored = lock(key)) {
|
||||
runnable.run();
|
||||
}
|
||||
try (LockAccess ignored = lock(key)) {
|
||||
runnable.run();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,8 @@ import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* {@link BlockState} related utility methods
|
||||
*/
|
||||
@ -107,4 +109,34 @@ public final class BlockUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a comma delimited list of block states
|
||||
*
|
||||
* @param commaDelimited List of block states
|
||||
* @return Parsed block states
|
||||
*/
|
||||
public static @NonNull BlockState[] parse(final @NonNull String commaDelimited) {
|
||||
final String[] split = commaDelimited.split(",(?![^\\(\\[]*[\\]\\)])");
|
||||
final BlockState[] result = new BlockState[split.length];
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
result[i] = get(split[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserialize a serialized {@link BlockState}
|
||||
*
|
||||
* @param map Serialized block state
|
||||
* @return Deserialized block state, or {@code null} if the map is
|
||||
* not a properly serialized block state
|
||||
*/
|
||||
public static @Nullable BlockState deserialize(final @NonNull Map<String, Object> map) {
|
||||
if (map.containsKey("material")) {
|
||||
final Object object = map.get("material");
|
||||
return get(object.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,10 @@
|
||||
*/
|
||||
package com.plotsquared.core.util;
|
||||
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* This cache is used for world generation and just saves a bit of calculation time when checking if something is in the plot area.
|
||||
*/
|
||||
@ -103,4 +107,22 @@ public class ChunkUtil {
|
||||
return z_loc[j];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the region pos1-pos2 contains the chunk
|
||||
*
|
||||
* @param pos1 Region minimum point
|
||||
* @param pos2 Region maximum point
|
||||
* @param chunk BlockVector2 of chunk coordinates
|
||||
* @return {@code true} if the region pos1-pos2 contains the chunk
|
||||
*/
|
||||
public static boolean isWholeChunk(@NonNull Location pos1, @NonNull Location pos2, @NonNull BlockVector2 chunk) {
|
||||
int x1 = pos1.getX();
|
||||
int z1 = pos1.getZ();
|
||||
int x2 = pos2.getX();
|
||||
int z2 = pos2.getZ();
|
||||
int cx = chunk.getX() << 4;
|
||||
int cz = chunk.getZ() << 4;
|
||||
return cx > x1 && cz > z1 && cx < x2 && cz < z2;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -35,8 +35,8 @@ public abstract class InventoryUtil {
|
||||
* Attempts to set an item into a {@link PlotInventory} while also checking the existence of the material
|
||||
*
|
||||
* @param plotInventory The inventory where the item should be placed
|
||||
* @param index The index where to place the item
|
||||
* @param item The item to place into the inventory
|
||||
* @param index The index where to place the item
|
||||
* @param item The item to place into the inventory
|
||||
* @return {@code true} if the item could be placed, {@code false} otherwise (e.g. item not available in current version)
|
||||
* @since 6.5.0
|
||||
*/
|
||||
@ -49,14 +49,12 @@ public abstract class InventoryUtil {
|
||||
* Attempts to set an item into a {@link PlotInventory}
|
||||
*
|
||||
* @param plotInventory The inventory where the item should be placed
|
||||
* @param index The index where to place the item
|
||||
* @param item The item to place into the inventory
|
||||
* @param index The index where to place the item
|
||||
* @param item The item to place into the inventory
|
||||
* @see #setItemChecked(PlotInventory, int, PlotItemStack)
|
||||
*/
|
||||
public void setItem(
|
||||
final PlotInventory plotInventory, final int index,
|
||||
final PlotItemStack item
|
||||
) {
|
||||
public void setItem(final PlotInventory plotInventory, final int index,
|
||||
final PlotItemStack item) {
|
||||
setItemChecked(plotInventory, index, item);
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,103 @@ public class MathMan {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static long pairInt(int x, int y) {
|
||||
return (((long) x) << 32) | (y & 0xffffffffL);
|
||||
}
|
||||
|
||||
public static int unpairIntX(long pair) {
|
||||
return (int) (pair >> 32);
|
||||
}
|
||||
|
||||
public static int unpairIntY(long pair) {
|
||||
return (int) pair;
|
||||
}
|
||||
|
||||
public static byte pair16(byte x, byte y) {
|
||||
return (byte) (x + (y << 4));
|
||||
}
|
||||
|
||||
public static byte unpair16x(byte value) {
|
||||
return (byte) (value & 0xF);
|
||||
}
|
||||
|
||||
public static byte unpair16y(byte value) {
|
||||
return (byte) ((value >> 4) & 0xF);
|
||||
}
|
||||
|
||||
public static long inverseRound(double val) {
|
||||
long round = Math.round(val);
|
||||
return (long) (round + Math.signum(val - round));
|
||||
}
|
||||
|
||||
public static int sqrt(int x) {
|
||||
int xn;
|
||||
|
||||
if (x >= 0x10000) {
|
||||
if (x >= 0x1000000) {
|
||||
if (x >= 0x10000000) {
|
||||
if (x >= 0x40000000) {
|
||||
xn = table[x >> 24] << 8;
|
||||
} else {
|
||||
xn = table[x >> 22] << 7;
|
||||
}
|
||||
} else {
|
||||
if (x >= 0x4000000) {
|
||||
xn = table[x >> 20] << 6;
|
||||
} else {
|
||||
xn = table[x >> 18] << 5;
|
||||
}
|
||||
}
|
||||
|
||||
xn = (xn + 1 + (x / xn)) >> 1;
|
||||
xn = (xn + 1 + (x / xn)) >> 1;
|
||||
return ((xn * xn) > x) ? --xn : xn;
|
||||
} else {
|
||||
if (x >= 0x100000) {
|
||||
if (x >= 0x400000) {
|
||||
xn = table[x >> 16] << 4;
|
||||
} else {
|
||||
xn = table[x >> 14] << 3;
|
||||
}
|
||||
} else {
|
||||
if (x >= 0x40000) {
|
||||
xn = table[x >> 12] << 2;
|
||||
} else {
|
||||
xn = table[x >> 10] << 1;
|
||||
}
|
||||
}
|
||||
|
||||
xn = (xn + 1 + (x / xn)) >> 1;
|
||||
|
||||
return ((xn * xn) > x) ? --xn : xn;
|
||||
}
|
||||
} else {
|
||||
if (x >= 0x100) {
|
||||
if (x >= 0x1000) {
|
||||
if (x >= 0x4000) {
|
||||
xn = (table[x >> 8]) + 1;
|
||||
} else {
|
||||
xn = (table[x >> 6] >> 1) + 1;
|
||||
}
|
||||
} else {
|
||||
if (x >= 0x400) {
|
||||
xn = (table[x >> 4] >> 2) + 1;
|
||||
} else {
|
||||
xn = (table[x >> 2] >> 3) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return ((xn * xn) > x) ? --xn : xn;
|
||||
} else {
|
||||
if (x >= 0) {
|
||||
return table[x] >> 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid number:" + x);
|
||||
}
|
||||
|
||||
|
||||
public static double getMean(int[] array) {
|
||||
double count = 0;
|
||||
for (int i : array) {
|
||||
@ -78,6 +175,14 @@ public class MathMan {
|
||||
return count / array.length;
|
||||
}
|
||||
|
||||
public static double getMean(double[] array) {
|
||||
double count = 0;
|
||||
for (double i : array) {
|
||||
count += i;
|
||||
}
|
||||
return count / array.length;
|
||||
}
|
||||
|
||||
public static int pair(short x, short y) {
|
||||
return (x << 16) | (y & 0xFFFF);
|
||||
}
|
||||
@ -86,10 +191,105 @@ public class MathMan {
|
||||
return (a & b) + (a ^ b) / 2;
|
||||
}
|
||||
|
||||
public static short unpairX(int hash) {
|
||||
return (short) (hash >> 16);
|
||||
}
|
||||
|
||||
public static short unpairY(int hash) {
|
||||
return (short) (hash & 0xFFFF);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the x,y,z unit vector from pitch and yaw specified
|
||||
*
|
||||
* @param yaw yaw
|
||||
* @param pitch pitch
|
||||
* @return x, y, z unit vector
|
||||
*/
|
||||
public static float[] getDirection(float yaw, float pitch) {
|
||||
double pitch_sin = Math.sin(pitch);
|
||||
return new float[]{(float) (pitch_sin * Math.cos(yaw)),
|
||||
(float) (pitch_sin * Math.sin(yaw)), (float) Math.cos(pitch)};
|
||||
}
|
||||
|
||||
public static int floorMod(int x, int y) {
|
||||
int i = x % y;
|
||||
if (i < 0) {
|
||||
i += y;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public static int roundInt(double value) {
|
||||
return (int) (value < 0 ? (value == (int) value) ? value : value - 1 : value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns [ pitch, yaw ]
|
||||
*
|
||||
* @param x x
|
||||
* @param y y
|
||||
* @param z z
|
||||
* @return pitch and yaw of x,y,z from 0,0,0
|
||||
*/
|
||||
public static float[] getPitchAndYaw(float x, float y, float z) {
|
||||
float distance = sqrtApprox((z * z) + (x * x));
|
||||
return new float[]{atan2(y, distance), atan2(x, z)};
|
||||
}
|
||||
|
||||
public static final float atan2(float y, float x) {
|
||||
float add;
|
||||
float mul;
|
||||
|
||||
if (x < 0.0f) {
|
||||
if (y < 0.0f) {
|
||||
x = -x;
|
||||
y = -y;
|
||||
|
||||
mul = 1.0f;
|
||||
} else {
|
||||
x = -x;
|
||||
mul = -1.0f;
|
||||
}
|
||||
|
||||
add = -3.141592653f;
|
||||
} else {
|
||||
if (y < 0.0f) {
|
||||
y = -y;
|
||||
mul = -1.0f;
|
||||
} else {
|
||||
mul = 1.0f;
|
||||
}
|
||||
|
||||
add = 0.0f;
|
||||
}
|
||||
|
||||
float invDiv = 1.0f / (((x < y) ? y : x) * INV_ATAN2_DIM_MINUS_1);
|
||||
|
||||
int xi = (int) (x * invDiv);
|
||||
int yi = (int) (y * invDiv);
|
||||
|
||||
return (atan2[(yi * ATAN2_DIM) + xi] + add) * mul;
|
||||
}
|
||||
|
||||
public static float sqrtApprox(float f) {
|
||||
return f * Float.intBitsToFloat(0x5f375a86 - (Float.floatToIntBits(f) >> 1));
|
||||
}
|
||||
|
||||
public static double sqrtApprox(double d) {
|
||||
return Double
|
||||
.longBitsToDouble(((Double.doubleToLongBits(d) - (1L << 52)) >> 1) + (1L << 61));
|
||||
}
|
||||
|
||||
public static float invSqrt(float x) {
|
||||
float xhalf = 0.5f * x;
|
||||
int i = Float.floatToIntBits(x);
|
||||
i = 0x5f3759df - (i >> 1);
|
||||
x = Float.intBitsToFloat(i);
|
||||
x = x * (1.5f - (xhalf * x * x));
|
||||
return x;
|
||||
}
|
||||
|
||||
public static int getPositiveId(int i) {
|
||||
if (i < 0) {
|
||||
return (-i * 2) - 1;
|
||||
@ -121,6 +321,14 @@ public class MathMan {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static double getSD(double[] array, double av) {
|
||||
double sd = 0;
|
||||
for (double element : array) {
|
||||
sd += Math.pow(Math.abs(element - av), 2);
|
||||
}
|
||||
return Math.sqrt(sd / array.length);
|
||||
}
|
||||
|
||||
public static double getSD(int[] array, double av) {
|
||||
double sd = 0;
|
||||
for (int element : array) {
|
||||
@ -129,4 +337,22 @@ public class MathMan {
|
||||
return Math.sqrt(sd / array.length);
|
||||
}
|
||||
|
||||
public static int mod(int x, int y) {
|
||||
if (isPowerOfTwo(y)) {
|
||||
return x & (y - 1);
|
||||
}
|
||||
return x % y;
|
||||
}
|
||||
|
||||
public static int unsignedmod(int x, int y) {
|
||||
if (isPowerOfTwo(y)) {
|
||||
return x & (y - 1);
|
||||
}
|
||||
return x % y;
|
||||
}
|
||||
|
||||
public static boolean isPowerOfTwo(int number) {
|
||||
return (number & (number - 1)) == 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -272,8 +272,7 @@ public abstract class RegionManager {
|
||||
fromQueue1.addReadChunks(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()).getChunks());
|
||||
fromQueue2.addReadChunks(new CuboidRegion(
|
||||
swapPos.getBlockVector3(),
|
||||
BlockVector3.at(
|
||||
swapPos.getX() + pos2.getX() - pos1.getX(),
|
||||
BlockVector3.at(swapPos.getX() + pos2.getX() - pos1.getX(),
|
||||
pos1.getY(),
|
||||
swapPos.getZ() + pos2.getZ() - pos1.getZ()
|
||||
)
|
||||
|
@ -19,10 +19,12 @@
|
||||
package com.plotsquared.core.util;
|
||||
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
@ -88,6 +90,12 @@ public class RegionUtil {
|
||||
.getY() && y <= max.getY();
|
||||
}
|
||||
|
||||
public static @NonNull Rectangle2D toRectangle(final @NonNull CuboidRegion region) {
|
||||
final BlockVector2 min = region.getMinimumPoint().toBlockVector2();
|
||||
final BlockVector2 max = region.getMaximumPoint().toBlockVector2();
|
||||
return new Rectangle2D.Double(min.getX(), min.getZ(), max.getX(), max.getZ());
|
||||
}
|
||||
|
||||
// Because WorldEdit (not FastAsyncWorldEdit) lack this for CuboidRegion
|
||||
public static boolean intersects(CuboidRegion region, CuboidRegion other) {
|
||||
BlockVector3 regionMin = region.getMinimumPoint();
|
||||
|
@ -18,13 +18,19 @@
|
||||
*/
|
||||
package com.plotsquared.core.util;
|
||||
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -33,6 +39,27 @@ public class StringMan {
|
||||
// Stolen from https://stackoverflow.com/a/366532/12620913 | Debug: https://regex101.com/r/DudJLb/1
|
||||
private static final Pattern STRING_SPLIT_PATTERN = Pattern.compile("[^\\s\"]+|\"([^\"]*)\"");
|
||||
|
||||
public static String replaceFromMap(String string, Map<String, String> replacements) {
|
||||
StringBuilder sb = new StringBuilder(string);
|
||||
int size = string.length();
|
||||
for (Entry<String, String> entry : replacements.entrySet()) {
|
||||
if (size == 0) {
|
||||
break;
|
||||
}
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue();
|
||||
int start = sb.indexOf(key, 0);
|
||||
while (start > -1) {
|
||||
int end = start + key.length();
|
||||
int nextSearchStart = start + value.length();
|
||||
sb.replace(start, end, value);
|
||||
size -= end - start;
|
||||
start = sb.indexOf(key, nextSearchStart);
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static int intersection(Set<String> options, String[] toCheck) {
|
||||
int count = 0;
|
||||
for (String check : toCheck) {
|
||||
@ -43,6 +70,91 @@ public class StringMan {
|
||||
return count;
|
||||
}
|
||||
|
||||
public static String getString(Object obj) {
|
||||
if (obj == null) {
|
||||
return "null";
|
||||
}
|
||||
if (obj instanceof String) {
|
||||
return (String) obj;
|
||||
}
|
||||
if (obj instanceof Caption) {
|
||||
return ((Caption) obj).getComponent(PlotSquared.platform());
|
||||
}
|
||||
if (obj.getClass().isArray()) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
String prefix = "";
|
||||
|
||||
for (int i = 0; i < Array.getLength(obj); i++) {
|
||||
result.append(prefix).append(getString(Array.get(obj, i)));
|
||||
prefix = ",";
|
||||
}
|
||||
return "( " + result + " )";
|
||||
} else if (obj instanceof Collection<?>) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
String prefix = "";
|
||||
for (Object element : (Collection<?>) obj) {
|
||||
result.append(prefix).append(getString(element));
|
||||
prefix = ",";
|
||||
}
|
||||
return "[ " + result + " ]";
|
||||
} else {
|
||||
return obj.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public static String replaceFirst(char c, String s) {
|
||||
if (s == null) {
|
||||
return "";
|
||||
}
|
||||
if (s.isEmpty()) {
|
||||
return s;
|
||||
}
|
||||
char[] chars = s.toCharArray();
|
||||
char[] newChars = new char[chars.length];
|
||||
int used = 0;
|
||||
boolean found = false;
|
||||
for (char cc : chars) {
|
||||
if (!found && (c == cc)) {
|
||||
found = true;
|
||||
} else {
|
||||
newChars[used++] = cc;
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
chars = new char[newChars.length - 1];
|
||||
System.arraycopy(newChars, 0, chars, 0, chars.length);
|
||||
return String.valueOf(chars);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public static String replaceAll(String string, Object... pairs) {
|
||||
StringBuilder sb = new StringBuilder(string);
|
||||
for (int i = 0; i < pairs.length; i += 2) {
|
||||
String key = pairs[i] + "";
|
||||
String value = pairs[i + 1] + "";
|
||||
int start = sb.indexOf(key, 0);
|
||||
while (start > -1) {
|
||||
int end = start + key.length();
|
||||
int nextSearchStart = start + value.length();
|
||||
sb.replace(start, end, value);
|
||||
start = sb.indexOf(key, nextSearchStart);
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static boolean isAlphanumeric(String str) {
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
char c = str.charAt(i);
|
||||
if ((c < 0x30) || ((c >= 0x3a) && (c <= 0x40)) || ((c > 0x5a) && (c <= 0x60)) || (c
|
||||
> 0x7a)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isAlphanumericUnd(String str) {
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
char c = str.charAt(i);
|
||||
@ -53,6 +165,16 @@ public class StringMan {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isAlpha(String str) {
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
char c = str.charAt(i);
|
||||
if ((c <= 0x40) || ((c > 0x5a) && (c <= 0x60)) || (c > 0x7a)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static String join(Collection<?> collection, String delimiter) {
|
||||
return join(collection.toArray(), delimiter);
|
||||
}
|
||||
@ -63,6 +185,23 @@ public class StringMan {
|
||||
return join(array, delimiter);
|
||||
}
|
||||
|
||||
public static String join(Collection<?> collection, char delimiter) {
|
||||
return join(collection.toArray(), delimiter + "");
|
||||
}
|
||||
|
||||
public static boolean isAsciiPrintable(char c) {
|
||||
return (c >= ' ') && (c < '');
|
||||
}
|
||||
|
||||
public static boolean isAsciiPrintable(String s) {
|
||||
for (char c : s.toCharArray()) {
|
||||
if (!isAsciiPrintable(c)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int getLevenshteinDistance(String s, String t) {
|
||||
int n = s.length();
|
||||
int m = t.length();
|
||||
@ -110,6 +249,23 @@ public class StringMan {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public static String join(int[] array, String delimiter) {
|
||||
Integer[] wrapped = new Integer[array.length];
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
wrapped[i] = array[i];
|
||||
}
|
||||
return join(wrapped, delimiter);
|
||||
}
|
||||
|
||||
public static boolean isEqualToAny(String a, String... args) {
|
||||
for (String arg : args) {
|
||||
if (StringMan.isEqual(a, arg)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isEqualIgnoreCaseToAny(@NonNull String a, String... args) {
|
||||
for (String arg : args) {
|
||||
if (a.equalsIgnoreCase(arg)) {
|
||||
@ -128,12 +284,41 @@ public class StringMan {
|
||||
return a.equals(b);
|
||||
}
|
||||
|
||||
public static boolean isEqualIgnoreCase(String a, String b) {
|
||||
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();
|
||||
sb.append(String.valueOf(s).repeat(Math.max(0, n)));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static boolean contains(String name, char c) {
|
||||
for (char current : name.toCharArray()) {
|
||||
if (c == current) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public <T> Collection<T> match(Collection<T> col, String startsWith) {
|
||||
if (col == null) {
|
||||
return null;
|
||||
}
|
||||
startsWith = startsWith.toLowerCase();
|
||||
Iterator<?> iterator = col.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Object item = iterator.next();
|
||||
if (item == null || !item.toString().toLowerCase().startsWith(startsWith)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
return col;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message an input string
|
||||
* @return a list of strings
|
||||
|
@ -58,6 +58,29 @@ public class WEManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean maskContains(Set<CuboidRegion> mask, double dx, double dy, double dz) {
|
||||
int x = Math.toIntExact(Math.round(dx >= 0 ? dx - 0.5 : dx + 0.5));
|
||||
int y = Math.toIntExact(Math.round(dy - 0.5));
|
||||
int z = Math.toIntExact(Math.round(dz >= 0 ? dz - 0.5 : dz + 0.5));
|
||||
for (CuboidRegion region : mask) {
|
||||
if (RegionUtil.contains(region, x, y, z)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean maskContains(Set<CuboidRegion> mask, double dx, double dz) {
|
||||
int x = Math.toIntExact(Math.round(dx >= 0 ? dx - 0.5 : dx + 0.5));
|
||||
int z = Math.toIntExact(Math.round(dz >= 0 ? dz - 0.5 : dz + 0.5));
|
||||
for (CuboidRegion region : mask) {
|
||||
if (RegionUtil.contains(region, x, z)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static HashSet<CuboidRegion> getMask(PlotPlayer<?> player) {
|
||||
HashSet<CuboidRegion> regions = new HashSet<>();
|
||||
UUID uuid = player.getUUID();
|
||||
@ -93,4 +116,17 @@ public class WEManager {
|
||||
return regions;
|
||||
}
|
||||
|
||||
public static boolean intersects(CuboidRegion region1, CuboidRegion region2) {
|
||||
return RegionUtil.intersects(region1, region2);
|
||||
}
|
||||
|
||||
public static boolean regionContains(CuboidRegion selection, HashSet<CuboidRegion> mask) {
|
||||
for (CuboidRegion region : mask) {
|
||||
if (intersects(region, selection)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -285,8 +285,7 @@ public abstract class WorldUtil {
|
||||
int trz = top.getZ() >> 9;
|
||||
Set<BlockVector2> files = getChunkChunks(bot.getWorldName());
|
||||
for (BlockVector2 mca : files) {
|
||||
if (mca.getX() >= brx && mca.getX() <= trx && mca.getZ() >= brz && mca.getZ() <= trz && !added.contains(
|
||||
mca)) {
|
||||
if (mca.getX() >= brx && mca.getX() <= trx && mca.getZ() >= brz && mca.getZ() <= trz && !added.contains(mca)) {
|
||||
final File file = getMcr(plot.getWorldName(), mca.getX(), mca.getZ());
|
||||
if (file != null) {
|
||||
//final String name = "r." + (x - cx) + "." + (z - cz) + ".mca";
|
||||
|
@ -102,7 +102,7 @@ public final class PlaceholderRegistry {
|
||||
return plot.getAlias();
|
||||
});
|
||||
this.createPlaceholder("currentplot_owner", (player, plot) -> {
|
||||
if (plot.getFlag(ServerPlotFlag.class)) {
|
||||
if (plot.getFlag(ServerPlotFlag.class)){
|
||||
return legacyComponent(TranslatableCaption.of("info.server"), player);
|
||||
}
|
||||
final UUID plotOwner = plot.getOwnerAbs();
|
||||
@ -298,8 +298,8 @@ public final class PlaceholderRegistry {
|
||||
}
|
||||
|
||||
/**
|
||||
* Event called when a new {@link Placeholder} has been added
|
||||
*/
|
||||
* Event called when a new {@link Placeholder} has been added
|
||||
*/
|
||||
public record PlaceholderAddedEvent(
|
||||
Placeholder placeholder
|
||||
) {
|
||||
|
@ -128,5 +128,4 @@ public class FlagTest {
|
||||
((TranslatableCaption) exception.getErrorMessage()).getKey()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -107,5 +107,4 @@ public class PlotRangeIteratorTest {
|
||||
Assertions.assertFalse(range.hasNext());
|
||||
Assertions.assertThrows(NoSuchElementException.class, range::next);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -51,5 +51,4 @@ class LockRepositoryTest {
|
||||
}));
|
||||
Assertions.assertFalse(lock.isLocked());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,10 +33,8 @@ public class StringManTest {
|
||||
new Message("title \"sub title\"", List.of("title", "sub title")),
|
||||
new Message("\"a title\" subtitle", List.of("a title", "subtitle")),
|
||||
new Message("\"title\" \"subtitle\"", List.of("title", "subtitle")),
|
||||
new Message(
|
||||
"\"How <bold>bold</bold> of you\" \"to assume I like <rainbow>rainbows</rainbow>\"",
|
||||
List.of("How <bold>bold</bold> of you", "to assume I like <rainbow>rainbows</rainbow>")
|
||||
)
|
||||
new Message("\"How <bold>bold</bold> of you\" \"to assume I like <rainbow>rainbows</rainbow>\"",
|
||||
List.of("How <bold>bold</bold> of you", "to assume I like <rainbow>rainbows</rainbow>"))
|
||||
);
|
||||
|
||||
for (Message message : messages) {
|
||||
@ -55,5 +53,4 @@ public class StringManTest {
|
||||
private record Message(String input, List<String> expected) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
22
README.md
22
README.md
@ -4,14 +4,14 @@
|
||||
|
||||
---
|
||||
|
||||
PlotSquared is a land and world management plugin for Minecraft.
|
||||
It includes several highly configurable world generators.
|
||||
PlotSquared is a land and world management plugin for Minecraft.
|
||||
It includes several highly configurable world generators.
|
||||
You can create plots of land in existing worlds using plot clusters, or you can have a full world of plots.
|
||||
|
||||
For the end user, PlotSquared is packed with a tonne of cool features.
|
||||
It allows you to merge plots, and build together with your friends.
|
||||
It allows you to merge plots, and build together with your friends.
|
||||
You can also change a lot of plot specific settings in the form of
|
||||
flags. Such as: weather, time, game modes, pvp status.
|
||||
flags. Such as: weather, time, game modes, pvp status.
|
||||
|
||||
Whilst we provide a whole load of unique features, the biggest focus
|
||||
is to provide a lag-free and smooth experience.
|
||||
@ -33,13 +33,11 @@ is to provide a lag-free and smooth experience.
|
||||
* [Contributing](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md)
|
||||
|
||||
### Developer Resources
|
||||
|
||||
* [API Documentation](https://intellectualsites.github.io/plotsquared-documentation/api/api-documentation)
|
||||
* [Event API](https://intellectualsites.github.io/plotsquared-documentation/api/event-api)
|
||||
* [Flag API](https://intellectualsites.github.io/plotsquared-documentation/api/flag-api)
|
||||
|
||||
# Official Addons
|
||||
|
||||
* [Plot2Dynmap](http://www.spigotmc.org/resources/plot2dynmap.1292/)
|
||||
* [HoloPlots](https://www.spigotmc.org/resources/holoplots.4880/)
|
||||
* [PlotHider](https://www.spigotmc.org/resources/plot-hider.20701/)
|
||||
@ -48,14 +46,10 @@ is to provide a lag-free and smooth experience.
|
||||
|
||||
Want to add new features to PlotSquared or fix bugs yourself? You can get the game running, with PlotSquared, from the code here:
|
||||
|
||||
For additional information about compiling PlotSquared,
|
||||
see [CONTRIBUTING.md](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md)
|
||||
For additional information about compiling PlotSquared, see [CONTRIBUTING.md](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md)
|
||||
|
||||
### Submitting Your Changes
|
||||
|
||||
PlotSquared is open source (specifically licensed under GPL v3), so note that your contributions will also be open source. The
|
||||
best way to submit a change is to create a fork on GitHub, put your changes there, and then create a "pull request" on our
|
||||
PlotSquared repository.
|
||||
PlotSquared is open source (specifically licensed under GPL v3), so note that your contributions will also be open source. The best way to submit a change is to create a fork on GitHub, put your changes there, and then create a "pull request" on our PlotSquared repository.
|
||||
|
||||
<a href="https://yourkit.com/">
|
||||
<img src="https://www.yourkit.com/images/yklogo.png">
|
||||
@ -63,6 +57,4 @@ PlotSquared repository.
|
||||
|
||||
Thank you to YourKit for supporting our product by providing us with their innovative and intelligent tools
|
||||
for monitoring and profiling Java and .NET applications.
|
||||
YourKit is the creator
|
||||
of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/),
|
||||
and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
|
||||
YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
|
||||
|
@ -1,6 +1,6 @@
|
||||
import com.diffplug.gradle.spotless.SpotlessPlugin
|
||||
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
|
||||
import java.net.URI
|
||||
import com.diffplug.gradle.spotless.SpotlessPlugin
|
||||
|
||||
plugins {
|
||||
java
|
||||
|
@ -21,7 +21,7 @@ squirrelid = "0.3.1"
|
||||
shadow = "7.1.2"
|
||||
grgit = "4.1.1"
|
||||
spotless = "6.16.0"
|
||||
nexus = "1.3.0"
|
||||
nexus = "1.2.0"
|
||||
|
||||
[libraries]
|
||||
# Platform expectations
|
||||
|
@ -1,4 +1,4 @@
|
||||
Javadocs generated for
|
||||
<a href="https://github.com/IntellectualSites/PlotSquared/" rel="noopener nofollow noreferrer" target="_blank"> PlotSquared</a> |
|
||||
<a href="https://intellectualsites.github.io/plotsquared-documentation/" rel="noopener nofollow noreferrer"> Documentation </a> |
|
||||
Visit us on our <a href="https://discord.gg/intellectualsites" rel="noopener nofollow noreferrer"> Discord server</a> :)
|
||||
<a rel="noopener nofollow noreferrer" href="https://github.com/IntellectualSites/PlotSquared/" target="_blank"> PlotSquared</a> |
|
||||
<a rel="noopener nofollow noreferrer" href="https://intellectualsites.github.io/plotsquared-documentation/"> Documentation </a> |
|
||||
Visit us on our <a rel="noopener nofollow noreferrer" href="https://discord.gg/intellectualsites"> Discord server</a> :)
|
||||
|
@ -4,11 +4,7 @@
|
||||
"config:base",
|
||||
":semanticCommitsDisabled"
|
||||
],
|
||||
"labels": [
|
||||
"dependencies"
|
||||
],
|
||||
"labels": ["dependencies"],
|
||||
"rebaseWhen": "conflicted",
|
||||
"schedule": [
|
||||
"on the first day of the week"
|
||||
]
|
||||
"schedule": ["on the first day of the week"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user