Update from Git Manager GUI
This commit is contained in:
@@ -25,6 +25,13 @@ public class Ticket implements ConfigurationSerializable {
|
||||
private double x, y, z;
|
||||
private float yaw, pitch;
|
||||
|
||||
/**
|
||||
* Name des Servers auf dem das Ticket erstellt wurde (BungeeCord-Netzwerk).
|
||||
* Entspricht dem Wert aus config.yml → server-name.
|
||||
* Standardwert: "unknown"
|
||||
*/
|
||||
private String serverName = "unknown";
|
||||
|
||||
private TicketStatus status;
|
||||
private UUID claimerUUID;
|
||||
private String claimerName;
|
||||
@@ -46,6 +53,12 @@ public class Ticket implements ConfigurationSerializable {
|
||||
private String playerRating = null;
|
||||
private boolean claimerNotified = false;
|
||||
|
||||
/**
|
||||
* Gibt an ob der Ersteller bereits über die Schließung informiert wurde.
|
||||
* Wird in der DB gespeichert damit Server-Wechsel keine Duplikate erzeugen.
|
||||
*/
|
||||
private boolean closeNotified = false;
|
||||
|
||||
public Ticket() {}
|
||||
|
||||
public Ticket(UUID creatorUUID, String creatorName, String message, Location location) {
|
||||
@@ -88,6 +101,9 @@ public class Ticket implements ConfigurationSerializable {
|
||||
if (map.containsKey("priority")) this.priority = TicketPriority.fromString((String) map.get("priority"));
|
||||
if (map.containsKey("playerRating")) this.playerRating = (String) map.get("playerRating");
|
||||
if (map.containsKey("claimerNotified")) this.claimerNotified = (boolean) map.get("claimerNotified");
|
||||
// BungeeCord: Server-Name laden (Fallback: "unknown")
|
||||
if (map.containsKey("serverName")) this.serverName = (String) map.get("serverName");
|
||||
if (map.containsKey("closeNotified")) this.closeNotified = (boolean) map.get("closeNotified");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,6 +128,9 @@ public class Ticket implements ConfigurationSerializable {
|
||||
map.put("priority", priority.name());
|
||||
if (playerRating != null) map.put("playerRating", playerRating);
|
||||
map.put("claimerNotified", claimerNotified);
|
||||
// BungeeCord: Server-Name speichern
|
||||
map.put("serverName", serverName);
|
||||
map.put("closeNotified", closeNotified);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -126,6 +145,8 @@ public class Ticket implements ConfigurationSerializable {
|
||||
private static float toFloat(Object o) { return o instanceof Float f ? f : ((Number) o).floatValue(); }
|
||||
private static long toLong(Object o) { return ((Number) o).longValue(); }
|
||||
|
||||
// ─────────────────────────── Getter & Setter ───────────────────────────
|
||||
|
||||
public int getId() { return id; }
|
||||
public void setId(int id) { this.id = id; }
|
||||
public UUID getCreatorUUID() { return creatorUUID; }
|
||||
@@ -175,4 +196,14 @@ public class Ticket implements ConfigurationSerializable {
|
||||
public boolean hasRating() { return playerRating != null; }
|
||||
public boolean isClaimerNotified() { return claimerNotified; }
|
||||
public void setClaimerNotified(boolean v) { this.claimerNotified = v; }
|
||||
|
||||
/** BungeeCord: Gibt den Server-Namen zurück, auf dem das Ticket erstellt wurde. */
|
||||
public String getServerName() { return serverName != null ? serverName : "unknown"; }
|
||||
/** BungeeCord: Setzt den Server-Namen (aus config.yml → server-name). */
|
||||
public void setServerName(String v) { this.serverName = v != null ? v : "unknown"; }
|
||||
|
||||
/** Gibt an ob der Ersteller bereits über die Schließung informiert wurde (DB-persistent). */
|
||||
public boolean isCloseNotified() { return closeNotified; }
|
||||
/** Setzt den close_notified-Flag (wird in DB gespeichert). */
|
||||
public void setCloseNotified(boolean v) { this.closeNotified = v; }
|
||||
}
|
||||
Reference in New Issue
Block a user