forked from alkarinv/BattleCore
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to latest BattleMcAPI changes
- Loading branch information
Showing
18 changed files
with
164 additions
and
785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 13 additions & 13 deletions
26
src/main/java/mc/alk/battlecore/economy/EconomyController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 13 additions & 13 deletions
26
src/main/java/mc/alk/battlecore/economy/EconomyHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
package mc.alk.battlecore.economy; | ||
|
||
import mc.alk.mc.MCOfflinePlayer; | ||
import org.battleplugins.entity.living.player.OfflinePlayer; | ||
|
||
import java.util.OptionalDouble; | ||
|
||
public interface EconomyHandler { | ||
|
||
boolean hasAccount(MCOfflinePlayer player); | ||
boolean hasAccount(MCOfflinePlayer player, String world); | ||
void createAccount(MCOfflinePlayer player); | ||
void createAccount(MCOfflinePlayer player, String world); | ||
boolean hasAccount(OfflinePlayer player); | ||
boolean hasAccount(OfflinePlayer player, String world); | ||
void createAccount(OfflinePlayer player); | ||
void createAccount(OfflinePlayer player, String world); | ||
|
||
OptionalDouble getBalance(MCOfflinePlayer player); | ||
OptionalDouble getBalance(MCOfflinePlayer player, String world); | ||
OptionalDouble getBalance(OfflinePlayer player); | ||
OptionalDouble getBalance(OfflinePlayer player, String world); | ||
|
||
default void depositBalance(MCOfflinePlayer player, double balance) { | ||
default void depositBalance(OfflinePlayer player, double balance) { | ||
setBalance(player, getBalance(player).orElse(0) + balance); | ||
} | ||
|
||
default void depositBalance(MCOfflinePlayer player, double balance, String world) { | ||
default void depositBalance(OfflinePlayer player, double balance, String world) { | ||
setBalance(player, getBalance(player).orElse(0) + balance, world); | ||
} | ||
|
||
default void withdrawBalance(MCOfflinePlayer player, double balance) { | ||
default void withdrawBalance(OfflinePlayer player, double balance) { | ||
setBalance(player, getBalance(player).orElse(0) - balance); | ||
} | ||
|
||
default void withdrawBalance(MCOfflinePlayer player, double balance, String world) { | ||
default void withdrawBalance(OfflinePlayer player, double balance, String world) { | ||
setBalance(player, getBalance(player).orElse(0) - balance, world); | ||
} | ||
|
||
void setBalance(MCOfflinePlayer player, double balance); | ||
void setBalance(MCOfflinePlayer player, double balance, String world); | ||
void setBalance(OfflinePlayer player, double balance); | ||
void setBalance(OfflinePlayer player, double balance, String world); | ||
} |
Oops, something went wrong.