Compare commits

..

9 Commits

Author SHA1 Message Date
8607b9c49c fix: plot music volume to span full plot 2024-04-07 23:55:33 +02:00
ce14036949 Update dependency com.github.spotbugs:spotbugs-annotations to v4.8.4 2024-04-07 17:22:04 +00:00
2dbb6ee025 Update dependency io.github.gradle-nexus.publish-plugin to v2 2024-04-06 01:23:47 +00:00
0da1d9f17a Update fawe to v2.9.2 2024-04-04 22:38:19 +00:00
f1f41b0523 Back to snapshot for development
Signed-off-by: Alexander Brandes <mc.cache@web.de>
2024-04-04 21:51:55 +02:00
fe324d3ea9 Release 7.3.7
Signed-off-by: Alexander Brandes <mc.cache@web.de>
2024-04-04 21:47:43 +02:00
ff83868cbc Add a placeholder for grants (#4380)
* Add a placeholder for grants

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* Address feedback

Signed-off-by: Alexander Brandes <mc.cache@web.de>

---------

Signed-off-by: Alexander Brandes <mc.cache@web.de>
2024-03-30 18:30:40 +01:00
111ea7029e fix: allow trusted players to remove books from lecterns while lectern-read-book flag is true (#4336)
allow trusted players to remove books from lecterns
2024-03-30 10:31:04 +01:00
9be2eedf7f fix-armor-stand-caps (#4355) 2024-03-30 10:30:37 +01:00
9 changed files with 24 additions and 13 deletions

View File

@ -154,7 +154,7 @@ public class EntitySpawnListener implements Listener {
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
event.setCancelled(true);
}
if (type == EntityType.ENDER_CRYSTAL) {
if (type == EntityType.ENDER_CRYSTAL || type == EntityType.ARMOR_STAND) {
if (BukkitEntityUtil.checkEntity(entity, plot)) {
event.setCancelled(true);
}

View File

@ -1936,7 +1936,9 @@ public class PlayerEventListener implements Listener {
@EventHandler
public void onPlayerTakeLecternBook(PlayerTakeLecternBookEvent event) {
Location location = BukkitUtil.adapt(event.getPlayer().getLocation());
Player player = event.getPlayer();
BukkitPlayer pp = BukkitUtil.adapt(player);
Location location = pp.getLocation();
PlotArea area = location.getPlotArea();
if (area == null) {
return;
@ -1948,9 +1950,11 @@ public class PlayerEventListener implements Listener {
}
return;
}
if (plot.getFlag(LecternReadBookFlag.class)) {
plot.debug(event.getPlayer().getName() + " could not take the book because of lectern-read-book = true");
event.setCancelled(true);
if (!plot.isAdded(pp.getUUID())) {
if (plot.getFlag(LecternReadBookFlag.class)) {
plot.debug(event.getPlayer().getName() + " could not take the book because of lectern-read-book = true");
event.setCancelled(true);
}
}
}

View File

@ -326,7 +326,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
return;
}
this.player.playSound(BukkitUtil.adapt(location), Sound.valueOf(BukkitAdapter.adapt(id).name()),
SoundCategory.MUSIC, 1f, 1f
SoundCategory.MUSIC, Float.MAX_VALUE, 1f
);
}

View File

@ -2574,7 +2574,7 @@ public class Plot {
*/
public void teleportPlayer(final PlotPlayer<?> player, TeleportCause cause, Consumer<Boolean> resultConsumer) {
Plot plot = this.getBasePlot(false);
if ((getArea() == null || !(getArea() instanceof SinglePlotArea)) && !WorldUtil.isValidLocation(plot.getBottomAbs())) {
if (!WorldUtil.isValidLocation(plot.getBottomAbs())) {
// prevent from teleporting into unsafe regions
player.sendMessage(TranslatableCaption.of("border.denied"));
resultConsumer.accept(false);

View File

@ -23,7 +23,7 @@ import com.plotsquared.core.plot.flag.types.BooleanFlag;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* @since TODO
* @since 7.3.7
*/
public class TileDropFlag extends BooleanFlag<TileDropFlag> {

View File

@ -37,7 +37,7 @@ import java.util.List;
public class SinglePlotManager extends PlotManager {
private static final int MAX_COORDINATE = 20000000;
private static final int MAX_COORDINATE = 30000000;
public SinglePlotManager(final @NonNull PlotArea plotArea) {
super(plotArea);

View File

@ -27,6 +27,8 @@ import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.configuration.caption.LocaleHolder;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.player.MetaDataAccess;
import com.plotsquared.core.player.PlayerMetaDataKeys;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.flag.GlobalFlagContainer;
@ -197,6 +199,11 @@ public final class PlaceholderRegistry {
});
this.createPlaceholder("currentplot_biome", (player, plot) -> plot.getBiomeSynchronous().toString());
this.createPlaceholder("currentplot_size", (player, plot) -> String.valueOf(plot.getConnectedPlots().size()));
this.createPlaceholder("total_grants", player -> {
try (final MetaDataAccess<Integer> metaDataAccess = player.accessPersistentMetaData(PlayerMetaDataKeys.PERSISTENT_GRANTED_PLOTS)) {
return Integer.toString(metaDataAccess.get().orElse(0));
}
});
}
/**

View File

@ -22,7 +22,7 @@ plugins {
}
group = "com.intellectualsites.plotsquared"
version = "7.3.7-SNAPSHOT"
version = "7.3.8-SNAPSHOT"
if (!File("$rootDir/.git").exists()) {
logger.lifecycle("""

View File

@ -2,7 +2,7 @@
# Platform expectations
paper = "1.20.2-R0.1-SNAPSHOT"
guice = "7.0.0"
spotbugs = "4.8.3"
spotbugs = "4.8.4"
checkerqual = "3.42.0"
gson = "2.10"
guava = "31.1-jre"
@ -13,7 +13,7 @@ log4j = "2.19.0"
# Plugins
worldedit = "7.2.20"
fawe = "2.9.1"
fawe = "2.9.2"
placeholderapi = "2.11.5"
luckperms = "5.4"
essentialsx = "2.20.1"
@ -36,7 +36,7 @@ serverlib = "2.3.4"
shadow = "8.1.1"
grgit = "4.1.1"
spotless = "6.25.0"
nexus = "1.3.0"
nexus = "2.0.0"
runPaper = "2.2.3"
[libraries]