Fix pre-events not being uncancellable

This commit is contained in:
Phoenix616 2020-05-04 22:15:01 +01:00
parent 0c1b82c9d8
commit bb4eece790
2 changed files with 10 additions and 2 deletions

View File

@ -47,7 +47,11 @@ public class PreShopCreationEvent extends Event implements Cancellable {
*/
@Override
public void setCancelled(boolean cancel) {
outcome = CreationOutcome.OTHER;
if (cancel) {
outcome = CreationOutcome.OTHER;
} else {
outcome = CreationOutcome.SHOP_CREATED_SUCCESSFULLY;
}
}
/**

View File

@ -217,7 +217,11 @@ public class PreTransactionEvent extends Event implements Cancellable {
@Override
public void setCancelled(boolean cancel) {
transactionOutcome = OTHER;
if (cancel) {
transactionOutcome = OTHER;
} else {
transactionOutcome = TRANSACTION_SUCCESFUL;
}
}
/**