mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 04:25:14 +01:00
Fix pre-events not being uncancellable
This commit is contained in:
parent
0c1b82c9d8
commit
bb4eece790
@ -47,7 +47,11 @@ public class PreShopCreationEvent extends Event implements Cancellable {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setCancelled(boolean cancel) {
|
public void setCancelled(boolean cancel) {
|
||||||
|
if (cancel) {
|
||||||
outcome = CreationOutcome.OTHER;
|
outcome = CreationOutcome.OTHER;
|
||||||
|
} else {
|
||||||
|
outcome = CreationOutcome.SHOP_CREATED_SUCCESSFULLY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -217,7 +217,11 @@ public class PreTransactionEvent extends Event implements Cancellable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCancelled(boolean cancel) {
|
public void setCancelled(boolean cancel) {
|
||||||
|
if (cancel) {
|
||||||
transactionOutcome = OTHER;
|
transactionOutcome = OTHER;
|
||||||
|
} else {
|
||||||
|
transactionOutcome = TRANSACTION_SUCCESFUL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user