Refactored PlayerCommands, added commands and more

Added player "Help" command, added server "sendmsg" command, changed getAcccountByPlayerID to public in DatabaseHelper, and allowed player commands to be submitted with "/" and "!"
This commit is contained in:
Benjamin Elsdon
2022-04-18 23:47:26 +08:00
parent eaba8bc1b5
commit ea2b2f9502
4 changed files with 75 additions and 22 deletions

View File

@@ -95,7 +95,7 @@ public class DatabaseHelper {
return cursor.next();
}
private static Account getAccountByPlayerId(int playerId) {
public static Account getAccountByPlayerId(int playerId) {
MorphiaCursor<Account> cursor = DatabaseManager.getDatastore().createQuery(Account.class).field("playerId").equal(playerId).find(FIND_ONE);
if (!cursor.hasNext()) return null;
return cursor.next();