Version bump and fix JUnit tests.

This commit is contained in:
AppleDash 2017-07-05 09:59:34 -04:00
parent d95d55c4f4
commit 684abf3488
6 changed files with 14 additions and 12 deletions

View File

@ -6,10 +6,10 @@
<parent>
<groupId>org.appledash</groupId>
<artifactId>SaneEconomy</artifactId>
<version>0.12.1-SNAPSHOT</version>
<version>0.12.2-SNAPSHOT</version>
</parent>
<artifactId>SaneEconomyCore</artifactId>
<version>0.12.1-SNAPSHOT</version>
<version>0.12.2-SNAPSHOT</version>
<dependencies>
<dependency>

View File

@ -165,10 +165,12 @@ public class EconomyManager {
Economable receiver = transaction.getReceiver();
double amount = transaction.getAmount(); // This amount is validated upon creation of Transaction
SaneEconomyTransactionEvent evt = new SaneEconomyTransactionEvent(transaction);
Bukkit.getServer().getPluginManager().callEvent(evt);
if (evt.isCancelled()) {
return new TransactionResult(transaction, TransactionResult.Status.CANCELLED_BY_PLUGIN);
if (Bukkit.getServer() != null) { // Bukkit.getServer() == null from our JUnit tests.
SaneEconomyTransactionEvent evt = new SaneEconomyTransactionEvent(transaction);
Bukkit.getServer().getPluginManager().callEvent(evt);
if (evt.isCancelled()) {
return new TransactionResult(transaction, TransactionResult.Status.CANCELLED_BY_PLUGIN);
}
}
if (transaction.isSenderAffected()) { // Sender should have balance taken from them

View File

@ -1,7 +1,7 @@
name: SaneEconomy
author: AppleDash
main: org.appledash.saneeconomy.SaneEconomy
version: 0.12.1
version: 0.12.2
load: STARTUP
softdepend: [Vault]
commands:

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>SaneEconomy</artifactId>
<groupId>org.appledash</groupId>
<version>0.12.1-SNAPSHOT</version>
<version>0.12.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -16,7 +16,7 @@
<dependency>
<groupId>org.appledash</groupId>
<artifactId>SaneEconomyCore</artifactId>
<version>0.12.1-SNAPSHOT</version>
<version>0.12.2-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>SaneEconomy</artifactId>
<groupId>org.appledash</groupId>
<version>0.12.1-SNAPSHOT</version>
<version>0.12.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -16,7 +16,7 @@
<dependency>
<groupId>org.appledash</groupId>
<artifactId>SaneEconomyCore</artifactId>
<version>0.12.1-SNAPSHOT</version>
<version>0.12.2-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@ -6,7 +6,7 @@
<groupId>org.appledash</groupId>
<artifactId>SaneEconomy</artifactId>
<version>0.12.1-SNAPSHOT</version>
<version>0.12.2-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>