-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: currency, support redis economy multi currency
- Loading branch information
1 parent
3bc093e
commit 24900c8
Showing
9 changed files
with
113 additions
and
42 deletions.
There are no files selected for viewing
7 changes: 0 additions & 7 deletions
7
API/src/main/java/info/preva1l/fadah/currency/CurrencyLoadException.java
This file was deleted.
Oops, something went wrong.
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
22 changes: 22 additions & 0 deletions
22
API/src/main/java/info/preva1l/fadah/currency/MultiCurrency.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package info.preva1l.fadah.currency; | ||
|
||
import java.util.List; | ||
|
||
public interface MultiCurrency { | ||
String getId(); | ||
|
||
String getName(); | ||
|
||
String getRequiredPlugin(); | ||
|
||
List<Currency> getCurrencies(); | ||
|
||
/** | ||
* Pre startup checks for the currency hook. | ||
* | ||
* @return true if the checks succeed false if they fail. | ||
*/ | ||
default boolean preloadChecks() { | ||
return true; | ||
} | ||
} |
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
4 changes: 4 additions & 0 deletions
4
Bukkit/src/main/java/info/preva1l/fadah/config/SubEconomy.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package info.preva1l.fadah.config; | ||
|
||
public record SubEconomy(String economy, String displayName) { | ||
} |
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
12 changes: 12 additions & 0 deletions
12
Bukkit/src/main/java/info/preva1l/fadah/currency/SubCurrency.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package info.preva1l.fadah.currency; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public abstract class SubCurrency implements Currency { | ||
private final String id; | ||
private final String name; | ||
private final String requiredPlugin; | ||
} |
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