Skip to content

Commit

Permalink
yes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cow authored and Cow committed Mar 21, 2022
1 parent 09f0d4b commit 70c5070
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public void onPlayerJoin(PlayerJoinEvent event) {
}

profile.setName(player.getName());
profile.addIp(player.getAddress().getAddress().getHostAddress());

profile.update();
}
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/io/github/punishmentsx/punishments/Punishment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
// }
}
}

Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70c5070

Please sign in to comment.