Upload folder via GUI - src
This commit is contained in:
@@ -4041,19 +4041,29 @@ public class IngameShopSpigot extends JavaPlugin implements Listener {
|
||||
com.google.gson.JsonArray coupons = resp.getAsJsonArray("coupons");
|
||||
for (com.google.gson.JsonElement el : coupons) {
|
||||
com.google.gson.JsonObject c = el.getAsJsonObject();
|
||||
String gcCode = c.has("code") ? c.get("code").getAsString() : "?";
|
||||
String gcValue = c.has("value") ? c.get("value").getAsString() : "?";
|
||||
String gcCur = c.has("currency") ? c.get("currency").getAsString() : "";
|
||||
String gcLabel = c.has("label") ? c.get("label").getAsString() : "";
|
||||
String gcExpiry = (c.has("expiry") && !c.get("expiry").isJsonNull())
|
||||
String gcCode = c.has("code") ? c.get("code").getAsString() : "?";
|
||||
String gcValue = c.has("value") ? c.get("value").getAsString() : "?";
|
||||
String gcOriginal = c.has("original_value") ? c.get("original_value").getAsString() : gcValue;
|
||||
boolean gcPartial = c.has("partially_used") && c.get("partially_used").getAsBoolean();
|
||||
String gcCur = c.has("currency") ? c.get("currency").getAsString() : "";
|
||||
String gcLabel = c.has("label") ? c.get("label").getAsString() : "";
|
||||
String gcExpiry = (c.has("expiry") && !c.get("expiry").isJsonNull())
|
||||
? " | Läuft ab: " + c.get("expiry").getAsString() : "";
|
||||
p.sendMessage("");
|
||||
if (!gcLabel.isEmpty())
|
||||
p.sendMessage(ChatColor.GRAY + " " + gcLabel);
|
||||
p.sendMessage(ChatColor.GRAY + " Code: "
|
||||
+ ChatColor.AQUA + ChatColor.BOLD + gcCode);
|
||||
p.sendMessage(ChatColor.GRAY + " Wert: "
|
||||
+ ChatColor.WHITE + gcValue + " " + gcCur + gcExpiry);
|
||||
if (gcPartial) {
|
||||
p.sendMessage(ChatColor.GRAY + " Guthaben: "
|
||||
+ ChatColor.GREEN + gcValue + " " + gcCur
|
||||
+ ChatColor.GRAY + " (von ursprünglich "
|
||||
+ ChatColor.WHITE + gcOriginal + " " + gcCur
|
||||
+ ChatColor.GRAY + ")" + gcExpiry);
|
||||
} else {
|
||||
p.sendMessage(ChatColor.GRAY + " Wert: "
|
||||
+ ChatColor.WHITE + gcValue + " " + gcCur + gcExpiry);
|
||||
}
|
||||
}
|
||||
p.sendMessage("");
|
||||
p.sendMessage(ChatColor.GRAY + " Im Shop beim Kauf einlösen.");
|
||||
|
||||
@@ -2,7 +2,7 @@ name: IngameShopSpigot
|
||||
version: 1.2
|
||||
main: de.mviper.spigot.IngameShopSpigot
|
||||
api-version: 1.19
|
||||
depend: [Vault]
|
||||
depend: [Vault, BCEconomy]
|
||||
description: Verbindet den WP Ingame Shop Pro mit dem Spigot-Server
|
||||
author: M_Viper
|
||||
|
||||
|
||||
Reference in New Issue
Block a user