refactor: make listeners an interface

(except the one in Bot, which extends MCProtocolLib's SessionAdaptor, not sure how exactly make them complement)
This commit is contained in:
ChomeNS
2025-03-23 14:18:55 +07:00
parent 60356a5eea
commit 0a8efe0189
30 changed files with 261 additions and 311 deletions

View File

@@ -15,7 +15,7 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
public class MailPlugin extends PlayersPlugin.Listener {
public class MailPlugin implements PlayersPlugin.Listener {
private static final String CREATE_TABLE = "CREATE TABLE IF NOT EXISTS mails (sentBy VARCHAR(255), sentTo VARCHAR(255), timeSent BIGINT, server VARCHAR(255), contents TEXT);";
private static final String INSERT_MAIL = "INSERT INTO mails (sentBy, sentTo, timeSent, server, contents) VALUES (?, ?, ?, ?, ?);";
private static final String LIST_MAILS = "SELECT * FROM mails;";