mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-03 06:28:51 +00:00
blockbreak raids
This commit is contained in:
1 parent
c281d5dd91
commit
83590b4209
1 file changed
+9
@@ -50,6 +50,15 @@ public class BlockBreakListener implements Listener {
|
|||||||
if (siege.getTown() == WorldCoord.parseWorldCoord(block).getTownOrNull()) {
|
if (siege.getTown() == WorldCoord.parseWorldCoord(block).getTownOrNull()) {
|
||||||
p.sendMessage(Helper.color("&cYou can not break blocks during sieges"));
|
p.sendMessage(Helper.color("&cYou can not break blocks during sieges"));
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final Raid raid : RaidData.getRaids()) {
|
||||||
|
if (raid.getRaidedTown() == WorldCoord.parseWorldCoord(block).getTownOrNull()) {
|
||||||
|
p.sendMessage(Helper.color("&cYou can not break blocks during raids"));
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user