mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-03 06:04:43 +02:00
Compare commits
1 Commits
v6
...
renovate/m
Author | SHA1 | Date | |
---|---|---|---|
5087e9776f |
@ -11,7 +11,7 @@ jobs:
|
|||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
DISCORD_USERNAME: PlotSquared Release
|
DISCORD_USERNAME: PlotSquared Release
|
||||||
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
|
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
|
||||||
uses: Ilshidur/action-discord@08d9328877d6954120eef2b07abbc79249bb6210 # ratchet:Ilshidur/action-discord@0.3.2
|
uses: Ilshidur/action-discord@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9 # ratchet:Ilshidur/action-discord@0.3.2
|
||||||
with:
|
with:
|
||||||
args: |
|
args: |
|
||||||
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
|
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
|
||||||
|
@ -71,7 +71,6 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.block.data.type.Dispenser;
|
import org.bukkit.block.data.type.Dispenser;
|
||||||
import org.bukkit.block.data.type.Farmland;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Fireball;
|
import org.bukkit.entity.Fireball;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -710,33 +709,20 @@ public class BlockEventListener implements Listener {
|
|||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
Location location = BukkitUtil.adapt(block.getLocation());
|
Location location = BukkitUtil.adapt(block.getLocation());
|
||||||
PlotArea area = location.getPlotArea();
|
PlotArea area = location.getPlotArea();
|
||||||
|
|
||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Plot plot = area.getOwnedPlot(location);
|
Plot plot = area.getOwnedPlot(location);
|
||||||
|
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Material blockType = block.getType();
|
||||||
if (block.getBlockData() instanceof Farmland farmland && event.getNewState().getBlockData() instanceof Farmland newFarmland) {
|
if (blockType == Material.FARMLAND) {
|
||||||
int currentMoisture = farmland.getMoisture();
|
if (!plot.getFlag(SoilDryFlag.class)) {
|
||||||
int newMoisture = newFarmland.getMoisture();
|
plot.debug("Soil could not dry because soil-dry = false");
|
||||||
|
event.setCancelled(true);
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ mvdwapi = "3.1.1"
|
|||||||
prtree = "2.0.1"
|
prtree = "2.0.1"
|
||||||
aopalliance = "1.0"
|
aopalliance = "1.0"
|
||||||
cloud-services = "1.8.2"
|
cloud-services = "1.8.2"
|
||||||
arkitektonika = "2.1.2"
|
arkitektonika = "2.1.1"
|
||||||
squirrelid = "0.3.1"
|
squirrelid = "0.3.1"
|
||||||
http4j = "1.3"
|
http4j = "1.3"
|
||||||
|
|
||||||
# Gradle plugins
|
# Gradle plugins
|
||||||
shadow = "7.1.2"
|
shadow = "8.1.0"
|
||||||
grgit = "4.1.1"
|
grgit = "4.1.1"
|
||||||
spotless = "6.16.0"
|
spotless = "6.16.0"
|
||||||
nexus = "1.2.0"
|
nexus = "1.2.0"
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
"config:base",
|
"config:base",
|
||||||
":semanticCommitsDisabled"
|
":semanticCommitsDisabled"
|
||||||
],
|
],
|
||||||
"labels": ["dependencies"],
|
"labels": ["Renovate"],
|
||||||
"rebaseWhen": "conflicted",
|
"rebaseWhen": "conflicted"
|
||||||
"schedule": ["on the first day of the week"]
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user