mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +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,
|
public boolean claim(final PlotPlayer player, boolean teleport, String schematic,
|
||||||
boolean updateDB) {
|
boolean updateDB) {
|
||||||
boolean result = EventUtil.manager.callClaim(player, this, false);
|
boolean result = EventUtil.manager.callClaim(player, this, false);
|
||||||
if (updateDB) {
|
if (!result) {
|
||||||
if (!result || (!create(player.getUUID(), true))) {
|
return false; // event is cancelled
|
||||||
return false;
|
} else if (updateDB && !create(player.getUUID(), true)) {
|
||||||
}
|
return false;
|
||||||
} else {
|
} else {
|
||||||
area.addPlot(this);
|
area.addPlot(this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user