mirror of
https://github.com/plexusorg/Plex.git
synced 2025-06-28 22:46:40 +00:00
Add SQL Generators
Add cache for table strings generated Add legacy support for Tags and login messages by converting legacy color codes to minimessage tags
This commit is contained in:
@ -3,6 +3,7 @@ package dev.plex.punishment;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import dev.plex.Plex;
|
||||
import dev.plex.storage.annotation.SQLTable;
|
||||
import dev.plex.util.MojangUtils;
|
||||
import dev.plex.util.PlexUtils;
|
||||
import dev.plex.util.TimeUtils;
|
||||
@ -10,16 +11,19 @@ import dev.plex.util.adapter.ZonedDateTimeAdapter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@SQLTable("punishments")
|
||||
public class Punishment
|
||||
{
|
||||
private static final Gson gson = new GsonBuilder().registerTypeAdapter(ZonedDateTime.class, new ZonedDateTimeAdapter()).create();
|
||||
private static final String banUrl = Plex.get().config.getString("banning.ban_url");
|
||||
@NotNull
|
||||
private final UUID punished;
|
||||
private final UUID punisher;
|
||||
private String ip;
|
||||
|
@ -1,6 +1,8 @@
|
||||
package dev.plex.punishment.extra;
|
||||
|
||||
import com.google.gson.GsonBuilder;
|
||||
import dev.plex.storage.annotation.NoLimit;
|
||||
import dev.plex.storage.annotation.SQLTable;
|
||||
import dev.plex.util.adapter.ZonedDateTimeAdapter;
|
||||
import lombok.Data;
|
||||
|
||||
@ -8,9 +10,12 @@ import java.time.ZonedDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
@Data
|
||||
@SQLTable("notes")
|
||||
public class Note
|
||||
{
|
||||
private final UUID uuid;
|
||||
|
||||
@NoLimit
|
||||
private final String note;
|
||||
private final UUID writtenBy;
|
||||
private final ZonedDateTime timestamp;
|
||||
|
Reference in New Issue
Block a user