mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
Cancel claim event correctly
This commit is contained in:
parent
255cbbe98f
commit
0f7861554e
@ -1514,10 +1514,10 @@ public class Plot {
|
||||
public boolean claim(final PlotPlayer player, boolean teleport, String schematic,
|
||||
boolean updateDB) {
|
||||
boolean result = EventUtil.manager.callClaim(player, this, false);
|
||||
if (updateDB) {
|
||||
if (!result || (!create(player.getUUID(), true))) {
|
||||
return false;
|
||||
}
|
||||
if (!result) {
|
||||
return false; // event is cancelled
|
||||
} else if (updateDB && !create(player.getUUID(), true)) {
|
||||
return false;
|
||||
} else {
|
||||
area.addPlot(this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user