Merge branch 'v6' into v7

This commit is contained in:
Alexander Brandes 2023-03-05 10:18:55 +01:00
commit a5fdcda673
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
4 changed files with 24 additions and 9 deletions

View File

@ -11,7 +11,7 @@ jobs:
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@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9 # ratchet:Ilshidur/action-discord@0.3.2
uses: Ilshidur/action-discord@08d9328877d6954120eef2b07abbc79249bb6210 # ratchet:Ilshidur/action-discord@0.3.2
with:
args: |
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"

View File

@ -72,6 +72,7 @@ import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.type.Dispenser;
import org.bukkit.block.data.type.Farmland;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Fireball;
import org.bukkit.entity.Player;
@ -746,20 +747,33 @@ public class BlockEventListener implements Listener {
Block block = event.getBlock();
Location location = BukkitUtil.adapt(block.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {
return;
}
Plot plot = area.getOwnedPlot(location);
if (plot == null) {
event.setCancelled(true);
return;
}
Material blockType = block.getType();
if (blockType == Material.FARMLAND) {
if (!plot.getFlag(SoilDryFlag.class)) {
plot.debug("Soil could not dry because soil-dry = false");
event.setCancelled(true);
if (block.getBlockData() instanceof Farmland farmland && event.getNewState().getBlockData() instanceof Farmland newFarmland) {
int currentMoisture = farmland.getMoisture();
int newMoisture = newFarmland.getMoisture();
// farmland gets moisturizes
if (newMoisture > currentMoisture) {
return;
}
if (plot.getFlag(SoilDryFlag.class)) {
return;
}
plot.debug("Soil could not dry because soil-dry = false");
event.setCancelled(true);
}
}

View File

@ -14,7 +14,7 @@ mvdwapi = "3.1.1"
prtree = "2.0.1"
aopalliance = "1.0"
cloud-services = "1.8.2"
arkitektonika = "2.1.1"
arkitektonika = "2.1.2"
squirrelid = "0.3.1"
# Gradle plugins

View File

@ -4,6 +4,7 @@
"config:base",
":semanticCommitsDisabled"
],
"labels": ["Renovate"],
"rebaseWhen": "conflicted"
"labels": ["dependencies"],
"rebaseWhen": "conflicted",
"schedule": ["on the first day of the week"]
}