mirror of
https://github.com/songoda/UltimateModeration.git
synced 2024-11-22 18:26:10 +01:00
Fix saving tickets.
This commit is contained in:
parent
4e3665a661
commit
1f580ba083
@ -184,7 +184,7 @@ public class UltimateModeration extends SongodaPlugin {
|
||||
if (storage.containsGroup("tickets")) {
|
||||
for (StorageRow row : storage.getRowsByGroup("tickets")) {
|
||||
|
||||
int id = row.get("id").asInt();
|
||||
int id = Integer.parseInt(row.get("id").asString());
|
||||
Ticket ticket = new Ticket(
|
||||
UUID.fromString(row.get("player").asString()),
|
||||
row.get("subject").asString(),
|
||||
@ -202,7 +202,7 @@ public class UltimateModeration extends SongodaPlugin {
|
||||
TicketResponse ticketResponse = new TicketResponse(
|
||||
UUID.fromString(row.get("author").asString()),
|
||||
row.get("message").asString(),
|
||||
row.get("posted").asLong());
|
||||
Long.parseLong(row.get("posted").asString()));
|
||||
ticketResponse.setTicketId(id);
|
||||
ticketManager.getTicket(id).addResponse(ticketResponse);
|
||||
|
||||
|
@ -64,7 +64,7 @@ public abstract class Storage {
|
||||
}
|
||||
|
||||
for (Ticket ticket : instance.getTicketManager().getTickets()) {
|
||||
prepareSaveItem("tickets", new StorageItem("id", ticket.getTicketId()),
|
||||
prepareSaveItem("tickets", new StorageItem("id", String.valueOf(ticket.getTicketId())),
|
||||
new StorageItem("player", ticket.getVictim().toString()),
|
||||
new StorageItem("subject", ticket.getSubject()),
|
||||
new StorageItem("type", ticket.getType()),
|
||||
@ -72,7 +72,7 @@ public abstract class Storage {
|
||||
new StorageItem("status", ticket.getStatus().toString()));
|
||||
|
||||
for (TicketResponse ticketResponse : ticket.getResponses()) {
|
||||
prepareSaveItem("ticketresponses", new StorageItem("posted", ticketResponse.getPostedDate()),
|
||||
prepareSaveItem("ticketresponses", new StorageItem("posted", String.valueOf(ticketResponse.getPostedDate())),
|
||||
new StorageItem("ticketid", ticket.getTicketId()),
|
||||
new StorageItem("author", ticketResponse.getAuthor().toString()),
|
||||
new StorageItem("message", ticketResponse.getMessage()));
|
||||
|
Loading…
Reference in New Issue
Block a user