mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-26 02:19:48 -05:00
Fix build error
Former-commit-id: 8add77663ab814555a249dcd9b1b9e59bb32ee96
This commit is contained in:
1 parent
020184c7db
commit
ce2120d692
2 files changed
+201
-1
No files matched your search
@@ -20,8 +20,15 @@
|
||||
|
||||
package org.maxgamer.quickshop.economy;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -37,7 +44,169 @@ public class EconomyTransactionTest {
|
||||
|
||||
|
||||
static final EconomyCore economy = new TestEconomy();
|
||||
static final UUID taxAccount = UUID.randomUUID();
|
||||
static final Trader taxAccount = Trader.adapt(new OfflinePlayer() {
|
||||
private final UUID uuid = UUID.randomUUID();
|
||||
|
||||
@Override
|
||||
public boolean isOnline() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull UUID getUniqueId() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBanned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWhitelisted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWhitelisted(boolean value) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Player getPlayer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getFirstPlayed() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLastPlayed() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPlayedBefore() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Location getBedSpawnLocation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementStatistic(@NotNull Statistic statistic) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementStatistic(@NotNull Statistic statistic) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementStatistic(@NotNull Statistic statistic, int amount) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementStatistic(@NotNull Statistic statistic, int amount) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStatistic(@NotNull Statistic statistic, int newValue) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatistic(@NotNull Statistic statistic) throws IllegalArgumentException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementStatistic(@NotNull Statistic statistic, @NotNull Material material) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementStatistic(@NotNull Statistic statistic, @NotNull Material material) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatistic(@NotNull Statistic statistic, @NotNull Material material) throws IllegalArgumentException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementStatistic(@NotNull Statistic statistic, @NotNull Material material, int amount) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementStatistic(@NotNull Statistic statistic, @NotNull Material material, int amount) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStatistic(@NotNull Statistic statistic, @NotNull Material material, int newValue) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) throws IllegalArgumentException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int amount) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int amount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int newValue) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Map<String, Object> serialize() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOp() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOp(boolean value) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
static {
|
||||
economy.getBalance(taxAccount);
|
||||
@@ -122,6 +291,11 @@ public class EconomyTransactionTest {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deposit(OfflinePlayer trader, double amount) {
|
||||
return deposit(trader.getUniqueId(), amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(double balance) {
|
||||
return Double.toString(balance);
|
||||
@@ -132,6 +306,11 @@ public class EconomyTransactionTest {
|
||||
return getOrCreateAccount(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getBalance(OfflinePlayer player) {
|
||||
return getBalance(player.getUniqueId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transfer(UUID from, UUID to, double amount) {
|
||||
double formBalance = getBalance(from);
|
||||
@@ -146,6 +325,11 @@ public class EconomyTransactionTest {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withdraw(OfflinePlayer trader, double amount) {
|
||||
return withdraw(trader.getUniqueId(), amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user