mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 14:44:43 +02:00
Compare commits
1 Commits
fix/v6/com
...
fix/plotTi
Author | SHA1 | Date | |
---|---|---|---|
ac5cb8d445 |
@ -1,25 +0,0 @@
|
|||||||
name: Announce release on discord
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
send_announcement:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: send custom message with args
|
|
||||||
env:
|
|
||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
|
||||||
DISCORD_USERNAME: PlotSquared Release
|
|
||||||
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
|
|
||||||
uses: Ilshidur/action-discord@0.3.2
|
|
||||||
with:
|
|
||||||
args: |
|
|
||||||
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
|
|
||||||
""
|
|
||||||
"<:plotsquared:730750385886593039> **PlotSquared ${{ github.event.release.tag_name }} has been released!**"
|
|
||||||
""
|
|
||||||
"Click here to view changelog: https://github.com/IntellectualSites/PlotSquared/releases/tag/${{ github.event.release.tag_name }}"
|
|
||||||
""
|
|
||||||
"The download is available at:"
|
|
||||||
"- Spigot: <https://www.spigotmc.org/resources/77506/>"
|
|
@ -849,11 +849,11 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
// managed elsewhere
|
// managed elsewhere
|
||||||
continue;
|
continue;
|
||||||
case "SHULKER":
|
case "SHULKER":
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_MOBS && (Settings.Enabled_Components.KILL_NAMED_ROAD_MOBS || entity.getCustomName() == null)) {
|
if (Settings.Enabled_Components.KILL_ROAD_MOBS) {
|
||||||
LivingEntity livingEntity = (LivingEntity) entity;
|
LivingEntity livingEntity = (LivingEntity) entity;
|
||||||
List<MetadataValue> meta = entity.getMetadata("shulkerPlot");
|
List<MetadataValue> meta = entity.getMetadata("shulkerPlot");
|
||||||
if (!meta.isEmpty()) {
|
if (!meta.isEmpty()) {
|
||||||
if (livingEntity.isLeashed() && !Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS) {
|
if (livingEntity.isLeashed()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<MetadataValue> keep = entity.getMetadata("keep");
|
List<MetadataValue> keep = entity.getMetadata("keep");
|
||||||
@ -973,9 +973,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
|| !entity.hasMetadata("keep")) {
|
|| !entity.hasMetadata("keep")) {
|
||||||
Entity passenger = entity.getPassenger();
|
Entity passenger = entity.getPassenger();
|
||||||
if ((Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS
|
if ((Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS
|
||||||
|| !((passenger instanceof Player) || livingEntity.isLeashed()))
|
|| !(passenger instanceof Player)) && entity.getMetadata("keep").isEmpty()) {
|
||||||
&& (Settings.Enabled_Components.KILL_NAMED_ROAD_MOBS || entity.getCustomName() == null)
|
|
||||||
&& entity.getMetadata("keep").isEmpty()) {
|
|
||||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -985,9 +983,8 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Entity passenger = entity.getPassenger();
|
Entity passenger = entity.getPassenger();
|
||||||
if ((Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS || !(passenger instanceof Player))
|
if ((Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS
|
||||||
&& (Settings.Enabled_Components.KILL_NAMED_ROAD_MOBS && entity.getCustomName() != null)
|
|| !(passenger instanceof Player)) && entity.getMetadata("keep").isEmpty()) {
|
||||||
&& entity.getMetadata("keep").isEmpty()) {
|
|
||||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -183,11 +183,7 @@ public class GenChunk extends ScopedQueueCoordinator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setBlock(int x, int y, int z, @NonNull Pattern pattern) {
|
public boolean setBlock(int x, int y, int z, @NonNull Pattern pattern) {
|
||||||
final BaseBlock block = PatternUtil.apply(Preconditions.checkNotNull(
|
return setBlock(x, y, z, PatternUtil.apply(Preconditions.checkNotNull(pattern, "Pattern may not be null"), x, y, z));
|
||||||
pattern,
|
|
||||||
"Pattern may not be null"
|
|
||||||
), x + (chunkX << 4), y, z + (chunkZ << 4));
|
|
||||||
return setBlock(x, y, z, block);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -759,8 +759,6 @@ public class Settings extends Config {
|
|||||||
@Comment("Also kill any road mobs that are being ridden, or are leashed")
|
@Comment("Also kill any road mobs that are being ridden, or are leashed")
|
||||||
public static boolean
|
public static boolean
|
||||||
KILL_OWNED_ROAD_MOBS = false;
|
KILL_OWNED_ROAD_MOBS = false;
|
||||||
@Comment("Also kill any road mobs that are named")
|
|
||||||
public static boolean KILL_NAMED_ROAD_MOBS = false;
|
|
||||||
@Comment("Kill items on roads (Stick, Paper, etc.)")
|
@Comment("Kill items on roads (Stick, Paper, etc.)")
|
||||||
public static boolean KILL_ROAD_ITEMS = false;
|
public static boolean KILL_ROAD_ITEMS = false;
|
||||||
@Comment("Kill vehicles on roads (Boat, Minecart, etc.)")
|
@Comment("Kill vehicles on roads (Boat, Minecart, etc.)")
|
||||||
|
@ -29,6 +29,7 @@ import com.sk89q.worldedit.extension.input.ParserContext;
|
|||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
import com.sk89q.worldedit.function.pattern.BlockPattern;
|
import com.sk89q.worldedit.function.pattern.BlockPattern;
|
||||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||||
|
import com.sk89q.worldedit.function.pattern.RandomPattern;
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
import com.sk89q.worldedit.world.block.BlockState;
|
import com.sk89q.worldedit.world.block.BlockState;
|
||||||
@ -43,7 +44,7 @@ public class PatternUtil {
|
|||||||
|
|
||||||
public static BaseBlock apply(@NonNull Pattern pattern, int x, int y, int z) {
|
public static BaseBlock apply(@NonNull Pattern pattern, int x, int y, int z) {
|
||||||
Preconditions.checkNotNull(pattern, "Pattern may not be null");
|
Preconditions.checkNotNull(pattern, "Pattern may not be null");
|
||||||
if (pattern instanceof BlockPattern
|
if (pattern instanceof BlockPattern || pattern instanceof RandomPattern
|
||||||
|| pattern instanceof BlockState || pattern instanceof BlockType
|
|| pattern instanceof BlockState || pattern instanceof BlockType
|
||||||
|| pattern instanceof BaseBlock) {
|
|| pattern instanceof BaseBlock) {
|
||||||
return pattern.applyBlock(BlockVector3.ZERO);
|
return pattern.applyBlock(BlockVector3.ZERO);
|
||||||
|
Reference in New Issue
Block a user