diff --git a/.github/workflows/announce-release-on-discord.yml b/.github/workflows/announce-release-on-discord.yml index 717c8ca0f..b3daa209a 100644 --- a/.github/workflows/announce-release-on-discord.yml +++ b/.github/workflows/announce-release-on-discord.yml @@ -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>" diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java index e963187d1..b234c81fd 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java @@ -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); } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 08a655ad4..397414d94 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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 diff --git a/renovate.json b/renovate.json index 54da313f2..3659d5f48 100644 --- a/renovate.json +++ b/renovate.json @@ -4,6 +4,7 @@ "config:base", ":semanticCommitsDisabled" ], - "labels": ["Renovate"], - "rebaseWhen": "conflicted" + "labels": ["dependencies"], + "rebaseWhen": "conflicted", + "schedule": ["on the first day of the week"] }