Upload folder via GUI - src

This commit is contained in:
Git Manager GUI
2026-05-12 23:19:51 +02:00
parent b3b0ae042b
commit 01205de952
2 changed files with 18 additions and 8 deletions

View File

@@ -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.");

View File

@@ -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