Skip to content

Commit b7ce854

Browse files
committed
add JpsCore economy as template style
1 parent 95d48a8 commit b7ce854

File tree

3 files changed

+99
-1
lines changed

3 files changed

+99
-1
lines changed

src/main/java/org/maxgamer/quickshop/QuickShop.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
import org.maxgamer.quickshop.database.MySQLCore;
7575
import org.maxgamer.quickshop.database.SQLiteCore;
7676
import org.maxgamer.quickshop.database.SimpleDatabaseHelper;
77+
import org.maxgamer.quickshop.economy.Economy_JpsCore;
7778
import org.maxgamer.quickshop.integration.SimpleIntegrationManager;
7879
import org.maxgamer.quickshop.integration.worldguard.WorldGuardIntegration;
7980
import org.maxgamer.quickshop.listener.BlockListener;
@@ -561,6 +562,9 @@ public boolean loadEcon() {
561562
case UNKNOWN:
562563
setupBootError(new BootError(this.getLogger(), "Can't load the Economy provider, invaild value in config.yml."), true);
563564
return false;
565+
case JPS_CORE:
566+
economy = new Economy_JpsCore();
567+
Util.debugLog("Now using JpsCore economy system.");
564568
break;
565569
default:
566570
Util.debugLog("No any economy provider selected.");

src/main/java/org/maxgamer/quickshop/api/economy/EconomyType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public enum EconomyType {
3232
//RESERVE(1),
3333
//MIXED(2),
3434
GEMS_ECONOMY(3),
35-
TNE(4);
35+
TNE(4),
36+
JPS_CORE(Integer.MAX_VALUE);
3637

3738
private final int id;
3839

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
package org.maxgamer.quickshop.economy;
2+
3+
import org.bukkit.OfflinePlayer;
4+
import org.bukkit.World;
5+
import org.bukkit.plugin.Plugin;
6+
import org.jetbrains.annotations.NotNull;
7+
import org.jetbrains.annotations.Nullable;
8+
import org.maxgamer.quickshop.QuickShop;
9+
import org.maxgamer.quickshop.api.economy.AbstractEconomy;
10+
11+
import java.util.UUID;
12+
13+
public class Economy_JpsCore extends AbstractEconomy {
14+
15+
private static final QuickShop plugin = QuickShop.getInstance();
16+
17+
@Override
18+
public boolean deposit(@NotNull UUID name, double amount, @NotNull World world, @Nullable String currency) {
19+
//TODO implement
20+
return false;
21+
}
22+
23+
@Override
24+
public boolean deposit(@NotNull OfflinePlayer trader, double amount, @NotNull World world, @Nullable String currency) {
25+
//TODO implement
26+
return false;
27+
}
28+
29+
@Override
30+
public String format(double balance, @NotNull World world, @Nullable String currency) {
31+
//TODO implement
32+
return null;
33+
}
34+
35+
@Override
36+
public double getBalance(@NotNull UUID name, @NotNull World world, @Nullable String currency) {
37+
//TODO implement
38+
return 0;
39+
}
40+
41+
@Override
42+
public double getBalance(@NotNull OfflinePlayer player, @NotNull World world, @Nullable String currency) {
43+
//TODO implement
44+
return 0;
45+
}
46+
47+
@Override
48+
public boolean withdraw(@NotNull UUID name, double amount, @NotNull World world, @Nullable String currency) {
49+
//TODO implement
50+
return false;
51+
}
52+
53+
@Override
54+
public boolean withdraw(@NotNull OfflinePlayer trader, double amount, @NotNull World world, @Nullable String currency) {
55+
//TODO implement
56+
return false;
57+
}
58+
59+
@Override
60+
public boolean hasCurrency(@NotNull World world, @NotNull String currency) {
61+
//TODO implement
62+
return false;
63+
}
64+
65+
@Override
66+
public boolean supportCurrency() {
67+
//TODO implement
68+
return false;
69+
}
70+
71+
@Override
72+
public @Nullable String getLastError() {
73+
//TODO implement
74+
return null;
75+
}
76+
77+
@Override
78+
public boolean isValid() {
79+
//TODO implement
80+
return false;
81+
}
82+
83+
@Override
84+
public @NotNull Plugin getPlugin() {
85+
return plugin;
86+
}
87+
88+
@Override
89+
public String toString() {
90+
//TODO implement
91+
return null;
92+
}
93+
}

0 commit comments

Comments
 (0)