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> <parent>
<groupId>org.appledash</groupId> <groupId>org.appledash</groupId>
<artifactId>SaneEconomy</artifactId> <artifactId>SaneEconomy</artifactId>
<version>0.12.1-SNAPSHOT</version> <version>0.12.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>SaneEconomyCore</artifactId> <artifactId>SaneEconomyCore</artifactId>
<version>0.12.1-SNAPSHOT</version> <version>0.12.2-SNAPSHOT</version>
<dependencies> <dependencies>
<dependency> <dependency>

View File

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

View File

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

View File

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

View File

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

View File

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