Dieser Commit ist enthalten in:
Ursprung
da8b27d5ff
Commit
e18d8c4868
@ -32,8 +32,6 @@ public class Punishment {
|
|||||||
|
|
||||||
private static final SQL.Statement getPunishment = new SQL.Statement("SELECT * FROM Punishments WHERE UserId = ? AND Type = ? ORDER BY PunishmentId DESC LIMIT 1");
|
private static final SQL.Statement getPunishment = new SQL.Statement("SELECT * FROM Punishments WHERE UserId = ? AND Type = ? ORDER BY PunishmentId DESC LIMIT 1");
|
||||||
private static final SQL.Statement getPunishments = new SQL.Statement("SELECT * FROM Punishments WHERE PunishmentId IN (SELECT MAX(PunishmentId) FROM Punishments WHERE UserId = ? GROUP BY Type)");
|
private static final SQL.Statement getPunishments = new SQL.Statement("SELECT * FROM Punishments WHERE PunishmentId IN (SELECT MAX(PunishmentId) FROM Punishments WHERE UserId = ? GROUP BY Type)");
|
||||||
private static final SQL.Statement getAllPunishments = new SQL.Statement("SELECT * FROM Punishments WHERE UserId = ? ORDER BY `PunishmentId` DESC");
|
|
||||||
private static final SQL.Statement insert = new SQL.Statement("INSERT INTO Punishments (UserId, Punisher, Type, Reason, EndTime, Perma) VALUES (?, ?, ?, ?, ?, ?)");
|
|
||||||
|
|
||||||
public static Punishment getPunishmentOfPlayer(int user, PunishmentType type) {
|
public static Punishment getPunishmentOfPlayer(int user, PunishmentType type) {
|
||||||
return getPunishment.select(rs -> {
|
return getPunishment.select(rs -> {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren