mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 14:44:43 +02:00
Compare commits
52 Commits
fix/v7/cor
...
7.4.0
Author | SHA1 | Date | |
---|---|---|---|
bab6f20a5d | |||
32d36b28fa | |||
a11c560d4e | |||
66bb0a6214 | |||
7218e9829f | |||
2e17c941fc | |||
5e628cc758 | |||
a42e08dc0e | |||
10bf45c128 | |||
9fe61e5053 | |||
8f5bdf5dbb | |||
9df1387f81 | |||
dcf5a7d940 | |||
641e3840cb | |||
5642061d6f | |||
003898f6a7 | |||
fecf8104e9 | |||
8a9dab4f8e | |||
0832656a12 | |||
5525085e6d | |||
7a429fd05c | |||
2c0ad36939 | |||
5e0957c14a | |||
c83306a2ea | |||
6f4c156585 | |||
afb36d98c7 | |||
001ae78fb2 | |||
5fc8e06c22 | |||
f9401dda94 | |||
d1a48dba4d | |||
db9b51a535 | |||
511db0af37 | |||
e1ccda3e6d | |||
a69cd609b9 | |||
5d4e6c5819 | |||
db05f1481a | |||
ee3dd00225 | |||
346a48225d | |||
dfd80c4723 | |||
fad038ef78 | |||
84b1af8856 | |||
13c5a67cb1 | |||
8ae894d51d | |||
bbb3736846 | |||
1ebcbf60a6 | |||
494144dc4f | |||
895cf0da66 | |||
05811d80ce | |||
4de9967ef4 | |||
034bd866eb | |||
98aab56616 | |||
8f980c726b |
6
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
6
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -24,13 +24,15 @@ body:
|
|||||||
- type: dropdown
|
- type: dropdown
|
||||||
attributes:
|
attributes:
|
||||||
label: Server Version
|
label: Server Version
|
||||||
description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
|
description: Which server version are you using? If your server version is not listed, it is not supported. Update to a supported version first.
|
||||||
multiple: false
|
multiple: false
|
||||||
options:
|
options:
|
||||||
|
- '1.21.3'
|
||||||
|
- '1.21.1'
|
||||||
|
- '1.20.6'
|
||||||
- '1.20.4'
|
- '1.20.4'
|
||||||
- '1.20'
|
- '1.20'
|
||||||
- '1.19.4'
|
- '1.19.4'
|
||||||
- '1.18.2'
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
4
.github/workflows/build-pr.yml
vendored
4
.github/workflows/build-pr.yml
vendored
@ -11,11 +11,11 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
uses: gradle/actions/wrapper-validation@v3
|
uses: gradle/actions/wrapper-validation@v4
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 21
|
||||||
- name: Clean Build
|
- name: Clean Build
|
||||||
run: ./gradlew clean build
|
run: ./gradlew clean build
|
||||||
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -11,12 +11,12 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
uses: gradle/actions/wrapper-validation@v3
|
uses: gradle/actions/wrapper-validation@v4
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 21
|
||||||
- name: Clean Build
|
- name: Clean Build
|
||||||
run: ./gradlew clean build
|
run: ./gradlew clean build
|
||||||
- name: Determine release status
|
- name: Determine release status
|
||||||
|
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 21
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
|
@ -104,9 +104,9 @@ tasks {
|
|||||||
opt.links("https://jd.papermc.io/paper/1.20/")
|
opt.links("https://jd.papermc.io/paper/1.20/")
|
||||||
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
|
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://intellectualsites.github.io/plotsquared-javadocs/core/")
|
||||||
opt.links("https://jd.advntr.dev/api/4.14.0/")
|
opt.links("https://jd.advntr.dev/api/" + libs.adventureApi.get().versionConstraint.toString())
|
||||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||||
// opt.links("https://checkerframework.org/api/")
|
opt.links("https://checkerframework.org/api/")
|
||||||
opt.isLinkSource = true
|
opt.isLinkSource = true
|
||||||
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
||||||
opt.isUse = true
|
opt.isUse = true
|
||||||
|
@ -822,12 +822,18 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
// Temporarily classify as vehicle
|
// Temporarily classify as vehicle
|
||||||
case "MINECART":
|
case "MINECART":
|
||||||
case "MINECART_CHEST":
|
case "MINECART_CHEST":
|
||||||
|
case "CHEST_MINECART":
|
||||||
case "MINECART_COMMAND":
|
case "MINECART_COMMAND":
|
||||||
|
case "COMMAND_BLOCK_MINECART":
|
||||||
case "MINECART_FURNACE":
|
case "MINECART_FURNACE":
|
||||||
|
case "FURNACE_MINECART":
|
||||||
case "MINECART_HOPPER":
|
case "MINECART_HOPPER":
|
||||||
|
case "HOPPER_MINECART":
|
||||||
case "MINECART_MOB_SPAWNER":
|
case "MINECART_MOB_SPAWNER":
|
||||||
|
case "SPAWNER_MINECART":
|
||||||
case "ENDER_CRYSTAL":
|
case "ENDER_CRYSTAL":
|
||||||
case "MINECART_TNT":
|
case "MINECART_TNT":
|
||||||
|
case "TNT_MINECART":
|
||||||
case "CHEST_BOAT":
|
case "CHEST_BOAT":
|
||||||
case "BOAT":
|
case "BOAT":
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) {
|
if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) {
|
||||||
|
@ -52,7 +52,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.EnumSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -445,7 +445,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
private static final List<Biome> BIOMES;
|
private static final List<Biome> BIOMES;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Set<Biome> disabledBiomes = EnumSet.of(Biome.CUSTOM);
|
Set<Biome> disabledBiomes = new HashSet<>(List.of(Biome.CUSTOM));
|
||||||
if (PlotSquared.platform().serverVersion()[1] <= 19) {
|
if (PlotSquared.platform().serverVersion()[1] <= 19) {
|
||||||
final Biome cherryGrove = Registry.BIOME.get(NamespacedKey.minecraft("cherry_grove"));
|
final Biome cherryGrove = Registry.BIOME.get(NamespacedKey.minecraft("cherry_grove"));
|
||||||
if (cherryGrove != null) {
|
if (cherryGrove != null) {
|
||||||
|
@ -106,9 +106,6 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import static org.bukkit.Tag.CORALS;
|
import static org.bukkit.Tag.CORALS;
|
||||||
import static org.bukkit.Tag.CORAL_BLOCKS;
|
import static org.bukkit.Tag.CORAL_BLOCKS;
|
||||||
@ -116,12 +113,6 @@ import static org.bukkit.Tag.WALL_CORALS;
|
|||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class BlockEventListener implements Listener {
|
public class BlockEventListener implements Listener {
|
||||||
|
|
||||||
private static final Set<Material> SNOW = Stream.of(Material.values()) // needed as Tag.SNOW isn't present in 1.16.5
|
|
||||||
.filter(material -> material.name().contains("SNOW"))
|
|
||||||
.filter(Material::isBlock)
|
|
||||||
.collect(Collectors.toUnmodifiableSet());
|
|
||||||
|
|
||||||
private final PlotAreaManager plotAreaManager;
|
private final PlotAreaManager plotAreaManager;
|
||||||
private final WorldEdit worldEdit;
|
private final WorldEdit worldEdit;
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ import com.plotsquared.core.plot.flag.implementations.EntityChangeBlockFlag;
|
|||||||
import com.plotsquared.core.plot.flag.implementations.ExplosionFlag;
|
import com.plotsquared.core.plot.flag.implementations.ExplosionFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.InvincibleFlag;
|
import com.plotsquared.core.plot.flag.implementations.InvincibleFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.ProjectileChangeBlockFlag;
|
import com.plotsquared.core.plot.flag.implementations.ProjectileChangeBlockFlag;
|
||||||
|
import com.plotsquared.core.plot.flag.implementations.WeavingDeathPlace;
|
||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
import com.plotsquared.core.util.EventDispatcher;
|
import com.plotsquared.core.util.EventDispatcher;
|
||||||
import com.plotsquared.core.util.PlotFlagUtil;
|
import com.plotsquared.core.util.PlotFlagUtil;
|
||||||
@ -243,6 +244,29 @@ public class EntityEventListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||||
|
public void onWeavingEffect(EntityChangeBlockEvent event) {
|
||||||
|
if (event.getTo() != Material.COBWEB) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Location location = BukkitUtil.adapt(event.getBlock().getLocation());
|
||||||
|
PlotArea area = location.getPlotArea();
|
||||||
|
if (area == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Plot plot = location.getOwnedPlot();
|
||||||
|
if (plot == null) {
|
||||||
|
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, WeavingDeathPlace.class, false)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!plot.getFlag(WeavingDeathPlace.class)) {
|
||||||
|
plot.debug(event.getTo() + " could not spawn because weaving-death-place = false");
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onDamage(EntityDamageEvent event) {
|
public void onDamage(EntityDamageEvent event) {
|
||||||
if (event.getEntityType() != EntityType.PLAYER) {
|
if (event.getEntityType() != EntityType.PLAYER) {
|
||||||
@ -401,7 +425,13 @@ public class EntityEventListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plot plot = area.getOwnedPlot(location);
|
Plot plot = area.getOwnedPlot(location);
|
||||||
if (plot != null && !plot.getFlag(EntityChangeBlockFlag.class)) {
|
if (plot == null) {
|
||||||
|
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EntityChangeBlockFlag.class, false)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!plot.getFlag(EntityChangeBlockFlag.class)) {
|
||||||
plot.debug(e.getType() + " could not change block because entity-change-block = false");
|
plot.debug(e.getType() + " could not change block because entity-change-block = false");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ import com.plotsquared.core.plot.flag.implementations.EditSignFlag;
|
|||||||
import com.plotsquared.core.plot.flag.implementations.HangingBreakFlag;
|
import com.plotsquared.core.plot.flag.implementations.HangingBreakFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.HangingPlaceFlag;
|
import com.plotsquared.core.plot.flag.implementations.HangingPlaceFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.HostileInteractFlag;
|
import com.plotsquared.core.plot.flag.implementations.HostileInteractFlag;
|
||||||
|
import com.plotsquared.core.plot.flag.implementations.InteractionInteractFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.ItemDropFlag;
|
import com.plotsquared.core.plot.flag.implementations.ItemDropFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.KeepInventoryFlag;
|
import com.plotsquared.core.plot.flag.implementations.KeepInventoryFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.LecternReadBookFlag;
|
import com.plotsquared.core.plot.flag.implementations.LecternReadBookFlag;
|
||||||
@ -201,11 +202,76 @@ public class PlayerEventListener implements Listener {
|
|||||||
"GLOW_INK_SAC"
|
"GLOW_INK_SAC"
|
||||||
));
|
));
|
||||||
int[] version = PlotSquared.platform().serverVersion();
|
int[] version = PlotSquared.platform().serverVersion();
|
||||||
if (version[1] >= 20 && version[2] >= 1) {
|
if (version[1] >= 20) {
|
||||||
mutableDyes.add("HONEYCOMB");
|
mutableDyes.add("HONEYCOMB");
|
||||||
}
|
}
|
||||||
DYES = Set.copyOf(mutableDyes);
|
DYES = Set.copyOf(mutableDyes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final Set<String> INTERACTABLE_MATERIALS;
|
||||||
|
|
||||||
|
static {
|
||||||
|
// @formatter:off
|
||||||
|
// "temporary" fix for https://hub.spigotmc.org/jira/browse/SPIGOT-7813
|
||||||
|
// can (and should) be removed when 1.21 support is dropped
|
||||||
|
// List of all interactable 1.21 materials
|
||||||
|
INTERACTABLE_MATERIALS = Material.CHEST.isInteractable() ? null : Set.of(
|
||||||
|
"REDSTONE_ORE", "DEEPSLATE_REDSTONE_ORE", "CHISELED_BOOKSHELF", "DECORATED_POT", "CHEST", "CRAFTING_TABLE",
|
||||||
|
"FURNACE", "JUKEBOX", "OAK_FENCE", "SPRUCE_FENCE", "BIRCH_FENCE", "JUNGLE_FENCE", "ACACIA_FENCE", "CHERRY_FENCE",
|
||||||
|
"DARK_OAK_FENCE", "MANGROVE_FENCE", "BAMBOO_FENCE", "CRIMSON_FENCE", "WARPED_FENCE", "PUMPKIN",
|
||||||
|
"NETHER_BRICK_FENCE", "ENCHANTING_TABLE", "DRAGON_EGG", "ENDER_CHEST", "COMMAND_BLOCK", "BEACON", "ANVIL",
|
||||||
|
"CHIPPED_ANVIL", "DAMAGED_ANVIL", "LIGHT", "REPEATING_COMMAND_BLOCK", "CHAIN_COMMAND_BLOCK", "SHULKER_BOX",
|
||||||
|
"WHITE_SHULKER_BOX", "ORANGE_SHULKER_BOX", "MAGENTA_SHULKER_BOX", "LIGHT_BLUE_SHULKER_BOX", "YELLOW_SHULKER_BOX",
|
||||||
|
"LIME_SHULKER_BOX", "PINK_SHULKER_BOX", "GRAY_SHULKER_BOX", "LIGHT_GRAY_SHULKER_BOX", "CYAN_SHULKER_BOX",
|
||||||
|
"PURPLE_SHULKER_BOX", "BLUE_SHULKER_BOX", "BROWN_SHULKER_BOX", "GREEN_SHULKER_BOX", "RED_SHULKER_BOX",
|
||||||
|
"BLACK_SHULKER_BOX", "REPEATER", "COMPARATOR", "HOPPER", "DISPENSER", "DROPPER", "LECTERN", "LEVER",
|
||||||
|
"DAYLIGHT_DETECTOR", "TRAPPED_CHEST", "TNT", "NOTE_BLOCK", "STONE_BUTTON", "POLISHED_BLACKSTONE_BUTTON",
|
||||||
|
"OAK_BUTTON", "SPRUCE_BUTTON", "BIRCH_BUTTON", "JUNGLE_BUTTON", "ACACIA_BUTTON", "CHERRY_BUTTON",
|
||||||
|
"DARK_OAK_BUTTON", "MANGROVE_BUTTON", "BAMBOO_BUTTON", "CRIMSON_BUTTON", "WARPED_BUTTON", "IRON_DOOR", "OAK_DOOR",
|
||||||
|
"SPRUCE_DOOR", "BIRCH_DOOR", "JUNGLE_DOOR", "ACACIA_DOOR", "CHERRY_DOOR", "DARK_OAK_DOOR", "MANGROVE_DOOR",
|
||||||
|
"BAMBOO_DOOR", "CRIMSON_DOOR", "WARPED_DOOR", "COPPER_DOOR", "EXPOSED_COPPER_DOOR", "WEATHERED_COPPER_DOOR",
|
||||||
|
"OXIDIZED_COPPER_DOOR", "WAXED_COPPER_DOOR", "WAXED_EXPOSED_COPPER_DOOR", "WAXED_WEATHERED_COPPER_DOOR",
|
||||||
|
"WAXED_OXIDIZED_COPPER_DOOR", "IRON_TRAPDOOR", "OAK_TRAPDOOR", "SPRUCE_TRAPDOOR", "BIRCH_TRAPDOOR",
|
||||||
|
"JUNGLE_TRAPDOOR", "ACACIA_TRAPDOOR", "CHERRY_TRAPDOOR", "DARK_OAK_TRAPDOOR", "MANGROVE_TRAPDOOR",
|
||||||
|
"BAMBOO_TRAPDOOR", "CRIMSON_TRAPDOOR", "WARPED_TRAPDOOR", "COPPER_TRAPDOOR", "EXPOSED_COPPER_TRAPDOOR",
|
||||||
|
"WEATHERED_COPPER_TRAPDOOR", "OXIDIZED_COPPER_TRAPDOOR", "WAXED_COPPER_TRAPDOOR", "WAXED_EXPOSED_COPPER_TRAPDOOR",
|
||||||
|
"WAXED_WEATHERED_COPPER_TRAPDOOR", "WAXED_OXIDIZED_COPPER_TRAPDOOR", "OAK_FENCE_GATE", "SPRUCE_FENCE_GATE",
|
||||||
|
"BIRCH_FENCE_GATE", "JUNGLE_FENCE_GATE", "ACACIA_FENCE_GATE", "CHERRY_FENCE_GATE", "DARK_OAK_FENCE_GATE",
|
||||||
|
"MANGROVE_FENCE_GATE", "BAMBOO_FENCE_GATE", "CRIMSON_FENCE_GATE", "WARPED_FENCE_GATE", "STRUCTURE_BLOCK",
|
||||||
|
"JIGSAW", "OAK_SIGN", "SPRUCE_SIGN", "BIRCH_SIGN", "JUNGLE_SIGN", "ACACIA_SIGN", "CHERRY_SIGN", "DARK_OAK_SIGN",
|
||||||
|
"MANGROVE_SIGN", "BAMBOO_SIGN", "CRIMSON_SIGN", "WARPED_SIGN", "OAK_HANGING_SIGN", "SPRUCE_HANGING_SIGN",
|
||||||
|
"BIRCH_HANGING_SIGN", "JUNGLE_HANGING_SIGN", "ACACIA_HANGING_SIGN", "CHERRY_HANGING_SIGN",
|
||||||
|
"DARK_OAK_HANGING_SIGN", "MANGROVE_HANGING_SIGN", "BAMBOO_HANGING_SIGN", "CRIMSON_HANGING_SIGN",
|
||||||
|
"WARPED_HANGING_SIGN", "CAKE", "WHITE_BED", "ORANGE_BED", "MAGENTA_BED", "LIGHT_BLUE_BED", "YELLOW_BED",
|
||||||
|
"LIME_BED", "PINK_BED", "GRAY_BED", "LIGHT_GRAY_BED", "CYAN_BED", "PURPLE_BED", "BLUE_BED", "BROWN_BED",
|
||||||
|
"GREEN_BED", "RED_BED", "BLACK_BED", "CRAFTER", "BREWING_STAND", "CAULDRON", "FLOWER_POT", "LOOM", "COMPOSTER",
|
||||||
|
"BARREL", "SMOKER", "BLAST_FURNACE", "CARTOGRAPHY_TABLE", "FLETCHING_TABLE", "GRINDSTONE", "SMITHING_TABLE",
|
||||||
|
"STONECUTTER", "BELL", "CAMPFIRE", "SOUL_CAMPFIRE", "BEE_NEST", "BEEHIVE", "RESPAWN_ANCHOR", "CANDLE",
|
||||||
|
"WHITE_CANDLE", "ORANGE_CANDLE", "MAGENTA_CANDLE", "LIGHT_BLUE_CANDLE", "YELLOW_CANDLE", "LIME_CANDLE",
|
||||||
|
"PINK_CANDLE", "GRAY_CANDLE", "LIGHT_GRAY_CANDLE", "CYAN_CANDLE", "PURPLE_CANDLE", "BLUE_CANDLE", "BROWN_CANDLE",
|
||||||
|
"GREEN_CANDLE", "RED_CANDLE", "BLACK_CANDLE", "VAULT", "MOVING_PISTON", "REDSTONE_WIRE", "OAK_WALL_SIGN",
|
||||||
|
"SPRUCE_WALL_SIGN", "BIRCH_WALL_SIGN", "ACACIA_WALL_SIGN", "CHERRY_WALL_SIGN", "JUNGLE_WALL_SIGN",
|
||||||
|
"DARK_OAK_WALL_SIGN", "MANGROVE_WALL_SIGN", "BAMBOO_WALL_SIGN", "OAK_WALL_HANGING_SIGN",
|
||||||
|
"SPRUCE_WALL_HANGING_SIGN", "BIRCH_WALL_HANGING_SIGN", "ACACIA_WALL_HANGING_SIGN",
|
||||||
|
"CHERRY_WALL_HANGING_SIGN", "JUNGLE_WALL_HANGING_SIGN", "DARK_OAK_WALL_HANGING_SIGN",
|
||||||
|
"MANGROVE_WALL_HANGING_SIGN", "CRIMSON_WALL_HANGING_SIGN", "WARPED_WALL_HANGING_SIGN", "BAMBOO_WALL_HANGING_SIGN",
|
||||||
|
"WATER_CAULDRON", "LAVA_CAULDRON", "POWDER_SNOW_CAULDRON", "POTTED_TORCHFLOWER", "POTTED_OAK_SAPLING",
|
||||||
|
"POTTED_SPRUCE_SAPLING", "POTTED_BIRCH_SAPLING", "POTTED_JUNGLE_SAPLING", "POTTED_ACACIA_SAPLING",
|
||||||
|
"POTTED_CHERRY_SAPLING", "POTTED_DARK_OAK_SAPLING", "POTTED_MANGROVE_PROPAGULE", "POTTED_FERN",
|
||||||
|
"POTTED_DANDELION", "POTTED_POPPY", "POTTED_BLUE_ORCHID", "POTTED_ALLIUM", "POTTED_AZURE_BLUET",
|
||||||
|
"POTTED_RED_TULIP", "POTTED_ORANGE_TULIP", "POTTED_WHITE_TULIP", "POTTED_PINK_TULIP", "POTTED_OXEYE_DAISY",
|
||||||
|
"POTTED_CORNFLOWER", "POTTED_LILY_OF_THE_VALLEY", "POTTED_WITHER_ROSE", "POTTED_RED_MUSHROOM",
|
||||||
|
"POTTED_BROWN_MUSHROOM", "POTTED_DEAD_BUSH", "POTTED_CACTUS", "POTTED_BAMBOO", "SWEET_BERRY_BUSH",
|
||||||
|
"CRIMSON_WALL_SIGN", "WARPED_WALL_SIGN", "POTTED_CRIMSON_FUNGUS", "POTTED_WARPED_FUNGUS", "POTTED_CRIMSON_ROOTS",
|
||||||
|
"POTTED_WARPED_ROOTS", "CANDLE_CAKE", "WHITE_CANDLE_CAKE", "ORANGE_CANDLE_CAKE", "MAGENTA_CANDLE_CAKE",
|
||||||
|
"LIGHT_BLUE_CANDLE_CAKE", "YELLOW_CANDLE_CAKE", "LIME_CANDLE_CAKE", "PINK_CANDLE_CAKE", "GRAY_CANDLE_CAKE",
|
||||||
|
"LIGHT_GRAY_CANDLE_CAKE", "CYAN_CANDLE_CAKE", "PURPLE_CANDLE_CAKE", "BLUE_CANDLE_CAKE", "BROWN_CANDLE_CAKE",
|
||||||
|
"GREEN_CANDLE_CAKE", "RED_CANDLE_CAKE", "BLACK_CANDLE_CAKE", "CAVE_VINES", "CAVE_VINES_PLANT",
|
||||||
|
"POTTED_AZALEA_BUSH", "POTTED_FLOWERING_AZALEA_BUSH"
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
}
|
||||||
|
|
||||||
private final EventDispatcher eventDispatcher;
|
private final EventDispatcher eventDispatcher;
|
||||||
private final WorldEdit worldEdit;
|
private final WorldEdit worldEdit;
|
||||||
private final PlotAreaManager plotAreaManager;
|
private final PlotAreaManager plotAreaManager;
|
||||||
@ -1187,7 +1253,7 @@ public class PlayerEventListener implements Listener {
|
|||||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||||
blocktype1 = BukkitAdapter.asBlockType(block.getType());
|
blocktype1 = BukkitAdapter.asBlockType(block.getType());
|
||||||
|
|
||||||
if (blockType.isInteractable()) {
|
if (INTERACTABLE_MATERIALS != null ? INTERACTABLE_MATERIALS.contains(blockType.name()) : blockType.isInteractable()) {
|
||||||
if (!player.isSneaking()) {
|
if (!player.isSneaking()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1672,6 +1738,11 @@ public class PlayerEventListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (EntityCategories.INTERACTION.contains(entityType) && flagContainer
|
||||||
|
.getFlag(InteractionInteractFlag.class).getValue()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (EntityCategories.VILLAGER.contains(entityType) && flagContainer
|
if (EntityCategories.VILLAGER.contains(entityType) && flagContainer
|
||||||
.getFlag(VillagerInteractFlag.class).getValue()) {
|
.getFlag(VillagerInteractFlag.class).getValue()) {
|
||||||
return;
|
return;
|
||||||
|
@ -75,6 +75,7 @@ import org.bukkit.entity.FallingBlock;
|
|||||||
import org.bukkit.entity.Firework;
|
import org.bukkit.entity.Firework;
|
||||||
import org.bukkit.entity.Ghast;
|
import org.bukkit.entity.Ghast;
|
||||||
import org.bukkit.entity.Hanging;
|
import org.bukkit.entity.Hanging;
|
||||||
|
import org.bukkit.entity.Interaction;
|
||||||
import org.bukkit.entity.IronGolem;
|
import org.bukkit.entity.IronGolem;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.entity.LightningStrike;
|
import org.bukkit.entity.LightningStrike;
|
||||||
@ -432,6 +433,7 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
@Override
|
@Override
|
||||||
public @NonNull Set<com.sk89q.worldedit.world.entity.EntityType> getTypesInCategory(final @NonNull String category) {
|
public @NonNull Set<com.sk89q.worldedit.world.entity.EntityType> getTypesInCategory(final @NonNull String category) {
|
||||||
final Collection<Class<?>> allowedInterfaces = new HashSet<>();
|
final Collection<Class<?>> allowedInterfaces = new HashSet<>();
|
||||||
|
final int[] version = PlotSquared.platform().serverVersion();
|
||||||
switch (category) {
|
switch (category) {
|
||||||
case "animal" -> {
|
case "animal" -> {
|
||||||
allowedInterfaces.add(IronGolem.class);
|
allowedInterfaces.add(IronGolem.class);
|
||||||
@ -439,7 +441,7 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
allowedInterfaces.add(Animals.class);
|
allowedInterfaces.add(Animals.class);
|
||||||
allowedInterfaces.add(WaterMob.class);
|
allowedInterfaces.add(WaterMob.class);
|
||||||
allowedInterfaces.add(Ambient.class);
|
allowedInterfaces.add(Ambient.class);
|
||||||
if (PlotSquared.platform().serverVersion()[1] >= 19) {
|
if (version[1] >= 19) {
|
||||||
allowedInterfaces.add(Allay.class);
|
allowedInterfaces.add(Allay.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -470,6 +472,11 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
allowedInterfaces.add(Firework.class);
|
allowedInterfaces.add(Firework.class);
|
||||||
}
|
}
|
||||||
case "player" -> allowedInterfaces.add(Player.class);
|
case "player" -> allowedInterfaces.add(Player.class);
|
||||||
|
case "interaction" -> {
|
||||||
|
if ((version[1] > 19) || (version[1] == 19 && version[2] >= 4)) {
|
||||||
|
allowedInterfaces.add(Interaction.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
default -> LOGGER.error("Unknown entity category requested: {}", category);
|
default -> LOGGER.error("Unknown entity category requested: {}", category);
|
||||||
}
|
}
|
||||||
final Set<com.sk89q.worldedit.world.entity.EntityType> types = new HashSet<>();
|
final Set<com.sk89q.worldedit.world.entity.EntityType> types = new HashSet<>();
|
||||||
|
@ -68,10 +68,10 @@ tasks {
|
|||||||
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
|
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
|
||||||
val opt = options as StandardJavadocDocletOptions
|
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://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
|
||||||
opt.links("https://jd.advntr.dev/api/4.14.0/")
|
opt.links("https://jd.advntr.dev/api/" + libs.adventureApi.get().versionConstraint.toString())
|
||||||
opt.links("https://jd.advntr.dev/text-minimessage/4.14.0/")
|
opt.links("https://jd.advntr.dev/text-minimessage/" + libs.adventureApi.get().versionConstraint.toString())
|
||||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||||
// opt.links("https://checkerframework.org/api/")
|
opt.links("https://checkerframework.org/api/")
|
||||||
opt.isLinkSource = true
|
opt.isLinkSource = true
|
||||||
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
||||||
opt.isUse = true
|
opt.isUse = true
|
||||||
|
@ -795,9 +795,8 @@ public class PlotSquared {
|
|||||||
if (world.equals("CheckingPlotSquaredGenerator")) {
|
if (world.equals("CheckingPlotSquaredGenerator")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.getPlotAreaManager().addWorld(world)) {
|
// Don't check the return result -> breaks runtime loading of single plot areas on creation
|
||||||
return;
|
this.getPlotAreaManager().addWorld(world);
|
||||||
}
|
|
||||||
Set<String> worlds;
|
Set<String> worlds;
|
||||||
if (this.worldConfiguration.contains("worlds")) {
|
if (this.worldConfiguration.contains("worlds")) {
|
||||||
worlds = this.worldConfiguration.getConfigurationSection("worlds").getKeys(false);
|
worlds = this.worldConfiguration.getConfigurationSection("worlds").getKeys(false);
|
||||||
|
@ -184,6 +184,7 @@ public class Area extends SubCommand {
|
|||||||
CuboidRegion.makeCuboid(playerSelectedRegion)
|
CuboidRegion.makeCuboid(playerSelectedRegion)
|
||||||
).length != 0) {
|
).length != 0) {
|
||||||
player.sendMessage(TranslatableCaption.of("single.single_area_overlapping"));
|
player.sendMessage(TranslatableCaption.of("single.single_area_overlapping"));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
// Alter the region
|
// Alter the region
|
||||||
final BlockVector3 playerSelectionMin = playerSelectedRegion.getMinimumPoint();
|
final BlockVector3 playerSelectionMin = playerSelectedRegion.getMinimumPoint();
|
||||||
|
@ -153,7 +153,7 @@ public class Kick extends SubCommand {
|
|||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
return TabCompletions.completePlayersInPlot(plot, String.join(",", args).trim(),
|
return TabCompletions.completePlayersInPlot(player, plot, String.join(",", args).trim(),
|
||||||
Collections.singletonList(player.getName())
|
Collections.singletonList(player.getName())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public class Storage extends Config {
|
|||||||
public static String PASSWORD = "password";
|
public static String PASSWORD = "password";
|
||||||
public static String DATABASE = "plot_db";
|
public static String DATABASE = "plot_db";
|
||||||
|
|
||||||
@Comment("Set additional properties: https://goo.gl/wngtN8")
|
@Comment("Set additional properties: https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html")
|
||||||
public static List<String>
|
public static List<String>
|
||||||
PROPERTIES = new ArrayList<>(Collections.singletonList("useSSL=false"));
|
PROPERTIES = new ArrayList<>(Collections.singletonList("useSSL=false"));
|
||||||
|
|
||||||
|
@ -2182,6 +2182,9 @@ public class Plot {
|
|||||||
* @return if the given player can claim the plot
|
* @return if the given player can claim the plot
|
||||||
*/
|
*/
|
||||||
public boolean canClaim(@NonNull PlotPlayer<?> player) {
|
public boolean canClaim(@NonNull PlotPlayer<?> player) {
|
||||||
|
if (!WorldUtil.isValidLocation(getBottomAbs())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
PlotCluster cluster = this.getCluster();
|
PlotCluster cluster = this.getCluster();
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
if (!cluster.isAdded(player.getUUID()) && !player.hasPermission("plots.admin.command.claim")) {
|
if (!cluster.isAdded(player.getUUID()) && !player.hasPermission("plots.admin.command.claim")) {
|
||||||
|
@ -65,6 +65,7 @@ import com.plotsquared.core.plot.flag.implementations.HostileInteractFlag;
|
|||||||
import com.plotsquared.core.plot.flag.implementations.IceFormFlag;
|
import com.plotsquared.core.plot.flag.implementations.IceFormFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.IceMeltFlag;
|
import com.plotsquared.core.plot.flag.implementations.IceMeltFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.InstabreakFlag;
|
import com.plotsquared.core.plot.flag.implementations.InstabreakFlag;
|
||||||
|
import com.plotsquared.core.plot.flag.implementations.InteractionInteractFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.InvincibleFlag;
|
import com.plotsquared.core.plot.flag.implementations.InvincibleFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.ItemDropFlag;
|
import com.plotsquared.core.plot.flag.implementations.ItemDropFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.KeepFlag;
|
import com.plotsquared.core.plot.flag.implementations.KeepFlag;
|
||||||
@ -92,6 +93,7 @@ import com.plotsquared.core.plot.flag.implementations.PreventCreativeCopyFlag;
|
|||||||
import com.plotsquared.core.plot.flag.implementations.PriceFlag;
|
import com.plotsquared.core.plot.flag.implementations.PriceFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.ProjectileChangeBlockFlag;
|
import com.plotsquared.core.plot.flag.implementations.ProjectileChangeBlockFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
||||||
|
import com.plotsquared.core.plot.flag.implementations.WeavingDeathPlace;
|
||||||
import com.plotsquared.core.plot.flag.implementations.PveFlag;
|
import com.plotsquared.core.plot.flag.implementations.PveFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.PvpFlag;
|
import com.plotsquared.core.plot.flag.implementations.PvpFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.RedstoneFlag;
|
import com.plotsquared.core.plot.flag.implementations.RedstoneFlag;
|
||||||
@ -171,6 +173,7 @@ public final class GlobalFlagContainer extends FlagContainer {
|
|||||||
this.addFlag(IceFormFlag.ICE_FORM_FALSE);
|
this.addFlag(IceFormFlag.ICE_FORM_FALSE);
|
||||||
this.addFlag(IceMeltFlag.ICE_MELT_FALSE);
|
this.addFlag(IceMeltFlag.ICE_MELT_FALSE);
|
||||||
this.addFlag(InstabreakFlag.INSTABREAK_FALSE);
|
this.addFlag(InstabreakFlag.INSTABREAK_FALSE);
|
||||||
|
this.addFlag(InteractionInteractFlag.INTERACTION_INTERACT_FALSE);
|
||||||
this.addFlag(InvincibleFlag.INVINCIBLE_FALSE);
|
this.addFlag(InvincibleFlag.INVINCIBLE_FALSE);
|
||||||
this.addFlag(ItemDropFlag.ITEM_DROP_TRUE);
|
this.addFlag(ItemDropFlag.ITEM_DROP_TRUE);
|
||||||
this.addFlag(KeepInventoryFlag.KEEP_INVENTORY_FALSE);
|
this.addFlag(KeepInventoryFlag.KEEP_INVENTORY_FALSE);
|
||||||
@ -207,6 +210,7 @@ public final class GlobalFlagContainer extends FlagContainer {
|
|||||||
this.addFlag(VillagerInteractFlag.VILLAGER_INTERACT_FALSE);
|
this.addFlag(VillagerInteractFlag.VILLAGER_INTERACT_FALSE);
|
||||||
this.addFlag(VineGrowFlag.VINE_GROW_TRUE);
|
this.addFlag(VineGrowFlag.VINE_GROW_TRUE);
|
||||||
this.addFlag(ProjectilesFlag.PROJECTILES_FALSE);
|
this.addFlag(ProjectilesFlag.PROJECTILES_FALSE);
|
||||||
|
this.addFlag(WeavingDeathPlace.WEAVING_DEATH_PLACE_FALSE);
|
||||||
|
|
||||||
// Double flags
|
// Double flags
|
||||||
this.addFlag(PriceFlag.PRICE_NOT_BUYABLE);
|
this.addFlag(PriceFlag.PRICE_NOT_BUYABLE);
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* 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.core.plot.flag.implementations;
|
||||||
|
|
||||||
|
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||||
|
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||||
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
|
||||||
|
public class InteractionInteractFlag extends BooleanFlag<InteractionInteractFlag> {
|
||||||
|
|
||||||
|
public static final InteractionInteractFlag INTERACTION_INTERACT_TRUE = new InteractionInteractFlag(true);
|
||||||
|
public static final InteractionInteractFlag INTERACTION_INTERACT_FALSE = new InteractionInteractFlag(false);
|
||||||
|
|
||||||
|
private InteractionInteractFlag(boolean value) {
|
||||||
|
super(value, TranslatableCaption.of("flags.flag_description_interaction_interact"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InteractionInteractFlag flagOf(@NonNull Boolean value) {
|
||||||
|
return value ? INTERACTION_INTERACT_TRUE : INTERACTION_INTERACT_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* 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.core.plot.flag.implementations;
|
||||||
|
|
||||||
|
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||||
|
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||||
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
|
||||||
|
public class WeavingDeathPlace extends BooleanFlag<WeavingDeathPlace> {
|
||||||
|
|
||||||
|
public static final WeavingDeathPlace WEAVING_DEATH_PLACE_TRUE = new WeavingDeathPlace(true);
|
||||||
|
public static final WeavingDeathPlace WEAVING_DEATH_PLACE_FALSE = new WeavingDeathPlace(false);
|
||||||
|
|
||||||
|
private WeavingDeathPlace(boolean value) {
|
||||||
|
super(value, TranslatableCaption.of("flags.flag_description_weaving_death_place"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected WeavingDeathPlace flagOf(@NonNull Boolean value) {
|
||||||
|
return value ? WEAVING_DEATH_PLACE_TRUE : WEAVING_DEATH_PLACE_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -31,6 +31,8 @@ import com.sk89q.worldedit.world.registry.LegacyMapper;
|
|||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link BlockState} related utility methods
|
* {@link BlockState} related utility methods
|
||||||
*/
|
*/
|
||||||
@ -43,7 +45,8 @@ public final class BlockUtil {
|
|||||||
PARSER_CONTEXT.setRestricted(false);
|
PARSER_CONTEXT.setRestricted(false);
|
||||||
PARSER_CONTEXT.setPreferringWildcard(false);
|
PARSER_CONTEXT.setPreferringWildcard(false);
|
||||||
PARSER_CONTEXT.setTryLegacy(true);
|
PARSER_CONTEXT.setTryLegacy(true);
|
||||||
PARSER = WorldEdit.getInstance().getBlockFactory().getParsers().get(0);
|
List<InputParser<BaseBlock>> parsers = WorldEdit.getInstance().getBlockFactory().getParsers();
|
||||||
|
PARSER = parsers.get(parsers.size() - 1); // Default parser is always at the end
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlockUtil() {
|
private BlockUtil() {
|
||||||
|
@ -371,7 +371,10 @@ public class EventDispatcher {
|
|||||||
Location location, BlockType blockType, boolean notifyPerms
|
Location location, BlockType blockType, boolean notifyPerms
|
||||||
) {
|
) {
|
||||||
PlotArea area = location.getPlotArea();
|
PlotArea area = location.getPlotArea();
|
||||||
assert area != null;
|
// the interaction target location might be outside a plot area
|
||||||
|
if (area == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!area.buildRangeContainsY(location.getY()) && !player.hasPermission(Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
if (!area.buildRangeContainsY(location.getY()) && !player.hasPermission(Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("height.height_limit"),
|
TranslatableCaption.of("height.height_limit"),
|
||||||
|
@ -107,6 +107,7 @@ public final class TabCompletions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @NonNull List<Command> completePlayersInPlot(
|
public static @NonNull List<Command> completePlayersInPlot(
|
||||||
|
final @NonNull PlotPlayer<?> issuer,
|
||||||
final @NonNull Plot plot,
|
final @NonNull Plot plot,
|
||||||
final @NonNull String input, final @NonNull List<String> existing
|
final @NonNull String input, final @NonNull List<String> existing
|
||||||
) {
|
) {
|
||||||
@ -115,8 +116,10 @@ public final class TabCompletions {
|
|||||||
final List<PlotPlayer<?>> inPlot = plot.getPlayersInPlot();
|
final List<PlotPlayer<?>> inPlot = plot.getPlayersInPlot();
|
||||||
players = new ArrayList<>(inPlot.size());
|
players = new ArrayList<>(inPlot.size());
|
||||||
for (PlotPlayer<?> player : inPlot) {
|
for (PlotPlayer<?> player : inPlot) {
|
||||||
|
if (issuer.canSee(player)) {
|
||||||
players.add(player.getName());
|
players.add(player.getName());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cachedCompletionValues.put("inPlot" + plot, players);
|
cachedCompletionValues.put("inPlot" + plot, players);
|
||||||
}
|
}
|
||||||
return filterCached(players, input, existing);
|
return filterCached(players, input, existing);
|
||||||
|
@ -41,6 +41,7 @@ public class EntityCategories {
|
|||||||
public static final EntityCategory PROJECTILE = register("projectile");
|
public static final EntityCategory PROJECTILE = register("projectile");
|
||||||
public static final EntityCategory OTHER = register("other");
|
public static final EntityCategory OTHER = register("other");
|
||||||
public static final EntityCategory PLAYER = register("player");
|
public static final EntityCategory PLAYER = register("player");
|
||||||
|
public static final EntityCategory INTERACTION = register("interaction");
|
||||||
|
|
||||||
public static EntityCategory register(final String id) {
|
public static EntityCategory register(final String id) {
|
||||||
final EntityCategory entityCategory = new EntityCategory(PlotSquared.platform().worldUtil(), id);
|
final EntityCategory entityCategory = new EntityCategory(PlotSquared.platform().worldUtil(), id);
|
||||||
|
@ -572,6 +572,7 @@
|
|||||||
"flags.flag_description_ice_form": "<gray>Set to `true` to allow ice to form in the plot.</gray>",
|
"flags.flag_description_ice_form": "<gray>Set to `true` to allow ice to form in the plot.</gray>",
|
||||||
"flags.flag_description_ice_melt": "<gray>Set to `false` to disable ice melting in the plot.</gray>",
|
"flags.flag_description_ice_melt": "<gray>Set to `false` to disable ice melting in the plot.</gray>",
|
||||||
"flags.flag_description_instabreak": "<gray>Set to `true` to allow blocks to be instantaneously broken in survival mode.</gray>",
|
"flags.flag_description_instabreak": "<gray>Set to `true` to allow blocks to be instantaneously broken in survival mode.</gray>",
|
||||||
|
"flags.flag_description_interaction_interact": "<gray>Set to `true` to allow guests to interact with interaction entities in the plot.</gray>",
|
||||||
"flags.flag_description_invincible": "<gray>Set to `true` to prevent players from taking damage inside the plot.</gray>",
|
"flags.flag_description_invincible": "<gray>Set to `true` to prevent players from taking damage inside the plot.</gray>",
|
||||||
"flags.flag_description_item_drop": "<gray>Set to `false` to prevent items from being dropped inside the plot.</gray>",
|
"flags.flag_description_item_drop": "<gray>Set to `false` to prevent items from being dropped inside the plot.</gray>",
|
||||||
"flags.flag_description_kelp_grow": "<gray>Set to `false` to prevent kelp from growing in the plot.</gray>",
|
"flags.flag_description_kelp_grow": "<gray>Set to `false` to prevent kelp from growing in the plot.</gray>",
|
||||||
@ -628,6 +629,7 @@
|
|||||||
"flags.flag_description_prevent_creative_copy": "<gray>Prevents people from copying item NBT data in the plot unless they're added as members.</gray>",
|
"flags.flag_description_prevent_creative_copy": "<gray>Prevents people from copying item NBT data in the plot unless they're added as members.</gray>",
|
||||||
"flags.flag_description_leaf_decay": "<gray>Set to `false` to prevent leaves from decaying.",
|
"flags.flag_description_leaf_decay": "<gray>Set to `false` to prevent leaves from decaying.",
|
||||||
"flags.flag_description_projectiles": "<gray>Prevents guests from shooting projectiles on the plot when set to false.</gray>",
|
"flags.flag_description_projectiles": "<gray>Prevents guests from shooting projectiles on the plot when set to false.</gray>",
|
||||||
|
"flags.flag_description_weaving_death_place": "<gray>Set to `false` to prevent spawning of cobwebs by the Weaving status effect on the death of an entity.</gray>",
|
||||||
"flags.flag_description_beacon_effect": "<gray>Enables beacon effects on the plot.</gray>",
|
"flags.flag_description_beacon_effect": "<gray>Enables beacon effects on the plot.</gray>",
|
||||||
"flags.flag_error_boolean": "Flag value must be a boolean (true | false).",
|
"flags.flag_error_boolean": "Flag value must be a boolean (true | false).",
|
||||||
"flags.flag_error_enum": "Must be one of: <list>",
|
"flags.flag_error_enum": "Must be one of: <list>",
|
||||||
|
@ -22,7 +22,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.intellectualsites.plotsquared"
|
group = "com.intellectualsites.plotsquared"
|
||||||
version = "7.3.9-SNAPSHOT"
|
version = "7.4.0"
|
||||||
|
|
||||||
if (!File("$rootDir/.git").exists()) {
|
if (!File("$rootDir/.git").exists()) {
|
||||||
logger.lifecycle("""
|
logger.lifecycle("""
|
||||||
@ -79,13 +79,13 @@ subprojects {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.3")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.10.3")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.withId("java") {
|
plugins.withId("java") {
|
||||||
the<JavaPluginExtension>().toolchain {
|
the<JavaPluginExtension>().toolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(17))
|
languageVersion.set(JavaLanguageVersion.of(21))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ tasks.getByName<Jar>("jar") {
|
|||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
val supportedVersions = listOf("1.18.2", "1.19.4", "1.20.1", "1.20.4")
|
val supportedVersions = listOf("1.18.2", "1.19.4", "1.20.6", "1.21.1", "1.21.3")
|
||||||
tasks {
|
tasks {
|
||||||
register("cacheLatestFaweArtifact") {
|
register("cacheLatestFaweArtifact") {
|
||||||
val lastSuccessfulBuildUrl = uri("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/api/json").toURL()
|
val lastSuccessfulBuildUrl = uri("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/api/json").toURL()
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
[versions]
|
[versions]
|
||||||
# Platform expectations
|
# Platform expectations
|
||||||
paper = "1.20.2-R0.1-SNAPSHOT"
|
paper = "1.20.4-R0.1-SNAPSHOT"
|
||||||
guice = "7.0.0"
|
guice = "7.0.0"
|
||||||
spotbugs = "4.8.6"
|
spotbugs = "4.8.6"
|
||||||
checkerqual = "3.45.0"
|
checkerqual = "3.48.2"
|
||||||
gson = "2.10"
|
gson = "2.10"
|
||||||
guava = "31.1-jre"
|
guava = "31.1-jre"
|
||||||
snakeyaml = "2.0"
|
snakeyaml = "2.0"
|
||||||
adventure = "4.17.0"
|
adventure = "4.17.0"
|
||||||
adventure-bukkit = "4.3.3"
|
adventure-bukkit = "4.3.4"
|
||||||
log4j = "2.19.0"
|
log4j = "2.19.0"
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
worldedit = "7.2.20"
|
worldedit = "7.2.20"
|
||||||
fawe = "2.11.0"
|
fawe = "2.12.0"
|
||||||
placeholderapi = "2.11.6"
|
placeholderapi = "2.11.6"
|
||||||
luckperms = "5.4"
|
luckperms = "5.4"
|
||||||
essentialsx = "2.20.1"
|
essentialsx = "2.20.1"
|
||||||
@ -26,18 +26,18 @@ cloud-services = "1.8.4"
|
|||||||
arkitektonika = "2.1.3"
|
arkitektonika = "2.1.3"
|
||||||
squirrelid = "0.3.2"
|
squirrelid = "0.3.2"
|
||||||
paster = "1.1.6"
|
paster = "1.1.6"
|
||||||
bstats = "3.0.2"
|
bstats = "3.1.0"
|
||||||
paperlib = "1.0.8"
|
paperlib = "1.0.8"
|
||||||
informative-annotations = "1.5"
|
informative-annotations = "1.5"
|
||||||
vault = "1.7.1"
|
vault = "1.7.1"
|
||||||
serverlib = "2.3.6"
|
serverlib = "2.3.6"
|
||||||
|
|
||||||
# Gradle plugins
|
# Gradle plugins
|
||||||
shadow = "8.1.1"
|
shadow = "8.3.5"
|
||||||
grgit = "4.1.1"
|
grgit = "4.1.1"
|
||||||
spotless = "6.25.0"
|
spotless = "6.25.0"
|
||||||
nexus = "2.0.0"
|
nexus = "2.0.0"
|
||||||
runPaper = "2.3.0"
|
runPaper = "2.3.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
# Platform expectations
|
# Platform expectations
|
||||||
@ -71,7 +71,6 @@ mvdwapi = { group = "com.intellectualsites.mvdwplaceholderapi", name = "MVdWPlac
|
|||||||
squirrelid = { group = "org.enginehub", name = "squirrelid", version.ref = "squirrelid" }
|
squirrelid = { group = "org.enginehub", name = "squirrelid", version.ref = "squirrelid" }
|
||||||
arkitektonika = { group = "com.intellectualsites.arkitektonika", name = "Arkitektonika-Client", version.ref = "arkitektonika" }
|
arkitektonika = { group = "com.intellectualsites.arkitektonika", name = "Arkitektonika-Client", version.ref = "arkitektonika" }
|
||||||
paster = { group = "com.intellectualsites.paster", name = "Paster", version.ref = "paster" }
|
paster = { group = "com.intellectualsites.paster", name = "Paster", version.ref = "paster" }
|
||||||
bstatsBase = { group = "org.bstats", name = "bstats-base", version.ref = "bstats" }
|
|
||||||
bstatsBukkit = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" }
|
bstatsBukkit = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" }
|
||||||
informativeAnnotations = { group = "com.intellectualsites.informative-annotations", name = "informative-annotations", version.ref = "informative-annotations" }
|
informativeAnnotations = { group = "com.intellectualsites.informative-annotations", name = "informative-annotations", version.ref = "informative-annotations" }
|
||||||
paperlib = { group = "io.papermc", name = "paperlib", version.ref = "paperlib" }
|
paperlib = { group = "io.papermc", name = "paperlib", version.ref = "paperlib" }
|
||||||
@ -79,7 +78,7 @@ vault = { group = "com.github.MilkBowl", name = "VaultAPI", version.ref = "vault
|
|||||||
serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" }
|
serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
||||||
grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" }
|
grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" }
|
||||||
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
|
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
|
||||||
nexus = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus" }
|
nexus = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus" }
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
5
gradlew
vendored
5
gradlew
vendored
@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@ -84,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
2
gradlew.bat
vendored
2
gradlew.bat
vendored
@ -13,6 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Javadocs generated for
|
Javadocs generated for
|
||||||
<a href="https://github.com/IntellectualSites/PlotSquared/" rel="noopener nofollow noreferrer" target="_blank"> PlotSquared</a> |
|
<a href="https://github.com/IntellectualSites/PlotSquared/" rel="noopener nofollow noreferrer" target="_blank"> PlotSquared</a> |
|
||||||
<a href="https://intellectualsites.gitbook.io/plotsquared/" rel="noopener nofollow noreferrer"> Documentation </a> |
|
<a href="https://intellectualsites.gitbook.io/plotsquared/" rel="noopener nofollow noreferrer"> Documentation </a> |
|
||||||
Visit us on our <a href="https://discord.gg/intellectualsites" rel="noopener nofollow noreferrer"> Discord server</a> :)
|
Visit us on our <a href="https://discord.gg/intellectualsites" rel="noopener nofollow noreferrer"> Discord server</a> :)
|
||||||
|
Reference in New Issue
Block a user