diff --git a/src/main/java/io/github/punishmentsx/listeners/JoinListener.java b/src/main/java/io/github/punishmentsx/listeners/JoinListener.java index bb1aa4c..c12385a 100644 --- a/src/main/java/io/github/punishmentsx/listeners/JoinListener.java +++ b/src/main/java/io/github/punishmentsx/listeners/JoinListener.java @@ -92,7 +92,6 @@ public void onPlayerJoin(PlayerJoinEvent event) { } profile.setName(player.getName()); - profile.addIp(player.getAddress().getAddress().getHostAddress()); profile.update(); } diff --git a/src/main/java/io/github/punishmentsx/punishments/Punishment.java b/src/main/java/io/github/punishmentsx/punishments/Punishment.java index b3ac7ca..d3d4a2c 100644 --- a/src/main/java/io/github/punishmentsx/punishments/Punishment.java +++ b/src/main/java/io/github/punishmentsx/punishments/Punishment.java @@ -19,6 +19,8 @@ import java.awt.*; import java.sql.PreparedStatement; import java.sql.SQLException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.*; import java.util.List; @@ -141,6 +143,18 @@ public String expiry() { return "Never"; } else { return expires.toString(); +// DateFormat outputFormat; +// +// switch (plugin.getConfig().getString("GENERAL.DATE_FORMAT")) { +// case "AMERICAN": +// outputFormat = new SimpleDateFormat("MM/dd/yyyy h:mm:ss a"); +// return outputFormat.format(expires); +// case "EUROPEAN": +// outputFormat = new SimpleDateFormat("dd/MM/yyyy h:mm:ss a"); +// return outputFormat.format(expires); +// default: +// return expires.toString(); +// } } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 43efc03..ce48318 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -38,6 +38,13 @@ GENERAL: SERVER_NAME: "Unspecified" # Example: lobby, kitpvp, factions, etc CONSOLE_NAME: "CONSOLE" + # REGULAR Example: Tue May 31 23:13:07 GMT 2022 + # AMERICAN Example: 5/31/2022 23:13:07 GMT + # EUROPEAN Example: 31/5/2022 23:13:07 GMT + + # This feature is TODO, does not actually work. + DATE_FORMAT: "REGULAR" + # Webhooks notify to a channel whenever a punishment/unpunishment is executed on the server. DISCORD_WEBHOOK: ENABLED: false