Update pom.xml
This commit is contained in:
parent
886c4da302
commit
cb265136b0
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>com.acrobot.chestshop</groupId>
|
||||
<artifactId>chestshop</artifactId>
|
||||
<version>3.52</version>
|
||||
<version>3.60</version>
|
||||
<description>Chest-and-sign shop plugin for Bukkit</description>
|
||||
|
||||
<scm>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.5.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.6.2-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.palmergames.towny</groupId>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
package com.Acrobot.ChestShop.Events.Economy;
|
||||
|
||||
/**
|
||||
* Created by Andrzej on 16.06.13.
|
||||
*/
|
||||
public class CurrencyAmountEvent {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.Acrobot.ChestShop.Events.Economy;
|
||||
|
||||
/**
|
||||
* @author Acrobot
|
||||
*/
|
||||
public class CurrencyHoldEvent {
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.Acrobot.ChestShop.Listeners.Economy;
|
||||
package com.Acrobot.ChestShop.Listeners.Economy.Plugins;
|
||||
|
||||
import com.Acrobot.ChestShop.ChestShop;
|
||||
import com.Acrobot.ChestShop.Events.Economy.*;
|
||||
import com.nijikokun.register.payment.forChestShop.Method;
|
||||
import com.nijikokun.register.payment.forChestShop.Methods;
|
||||
|
@ -32,37 +33,67 @@ public class RegisterListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onCurrencyCheck(CurrencyCheckEvent event) {
|
||||
paymentMethod.getAccount(event.getAccount()).hasEnough(event.getDoubleAmount());
|
||||
if (event.hasEnough()) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean check = paymentMethod.getAccount(event.getAccount()).hasEnough(event.getDoubleAmount());
|
||||
event.hasEnough(check);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onAccountCheck(AccountCheckEvent event) {
|
||||
paymentMethod.hasAccount(event.getAccount());
|
||||
if (event.hasAccount()) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean check = paymentMethod.hasAccount(event.getAccount());
|
||||
event.hasAccount(check);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onCurrencyFormat(CurrencyFormatEvent event) {
|
||||
String formatted = paymentMethod.format(event.getDoubleAmount());
|
||||
if (!event.getFormattedAmount().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String formatted = paymentMethod.format(event.getDoubleAmount());
|
||||
event.setFormattedAmount(formatted);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onCurrencyAdd(CurrencyAddEvent event) {
|
||||
if (event.isAdded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
paymentMethod.getAccount(event.getTarget()).add(event.getDoubleAmount());
|
||||
event.setAdded(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onCurrencySubtract(CurrencySubtractEvent event) {
|
||||
if (event.isSubtracted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
paymentMethod.getAccount(event.getTarget()).subtract(event.getDoubleAmount());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onCurrencyTransfer(CurrencyTransferEvent event) {
|
||||
boolean subtracted = paymentMethod.getAccount(event.getSender()).subtract(event.getDoubleAmount());
|
||||
|
||||
if (subtracted) {
|
||||
paymentMethod.getAccount(event.getReceiver()).add(event.getDoubleAmount());
|
||||
public static void onCurrencyTransfer(CurrencyTransferEvent event) {
|
||||
if (event.hasBeenTransferred()) {
|
||||
return;
|
||||
}
|
||||
|
||||
CurrencySubtractEvent currencySubtractEvent = new CurrencySubtractEvent(event.getAmount(), event.getSender(), event.getWorld());
|
||||
ChestShop.callEvent(currencySubtractEvent);
|
||||
|
||||
if (!currencySubtractEvent.isSubtracted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
CurrencyAddEvent currencyAddEvent = new CurrencyAddEvent(event.getAmount(), event.getReceiver(), event.getWorld());
|
||||
ChestShop.callEvent(currencyAddEvent);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.Acrobot.ChestShop.Listeners.Economy;
|
||||
package com.Acrobot.ChestShop.Listeners.Economy.Plugins;
|
||||
|
||||
import com.Acrobot.ChestShop.Events.Economy.*;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
|
@ -46,6 +46,10 @@ public class VaultListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onCurrencyCheck(CurrencyCheckEvent event) {
|
||||
if (event.hasEnough()) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = event.getWorld();
|
||||
|
||||
if (!provider.has(event.getAccount(), world.getName(), event.getDoubleAmount())) {
|
||||
|
@ -55,15 +59,23 @@ public class VaultListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onAccountCheck(AccountCheckEvent event) {
|
||||
if (event.hasAccount()) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = event.getWorld();
|
||||
|
||||
if (!provider.hasAccount(event.getAccount(), world.getName())) {
|
||||
event.setOutcome(false);
|
||||
event.hasAccount(false);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onCurrencyFormat(CurrencyFormatEvent event) {
|
||||
if (!event.getFormattedAmount().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String formatted = provider.format(event.getDoubleAmount());
|
||||
|
||||
event.setFormattedAmount(formatted);
|
||||
|
@ -71,6 +83,10 @@ public class VaultListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onCurrencyAdd(CurrencyAddEvent event) {
|
||||
if (event.isAdded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = event.getWorld();
|
||||
|
||||
provider.depositPlayer(event.getTarget(), world.getName(), event.getDoubleAmount());
|
||||
|
@ -78,6 +94,10 @@ public class VaultListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onCurrencySubtraction(CurrencySubtractEvent event) {
|
||||
if (event.isSubtracted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = event.getWorld();
|
||||
|
||||
provider.withdrawPlayer(event.getTarget(), world.getName(), event.getDoubleAmount());
|
||||
|
@ -85,6 +105,10 @@ public class VaultListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onCurrencyTransfer(CurrencyTransferEvent event) {
|
||||
if (event.hasBeenTransferred()) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = event.getWorld();
|
||||
|
||||
EconomyResponse response = provider.withdrawPlayer(event.getSender(), world.getName(), event.getDoubleAmount());
|
|
@ -0,0 +1,7 @@
|
|||
package com.Acrobot.ChestShop.Listeners.Economy;
|
||||
|
||||
/**
|
||||
* @author Acrobot
|
||||
*/
|
||||
public class ServerAccountCorrector {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.Acrobot.ChestShop.Listeners.Economy;
|
||||
|
||||
/**
|
||||
* @author Acrobot
|
||||
*/
|
||||
public class TaxModule {
|
||||
}
|
Loading…
Reference in New Issue