Class DatabaseHelper

java.lang.Object
emu.grasscutter.database.DatabaseHelper

public final class DatabaseHelper extends Object
  • Constructor Details

    • DatabaseHelper

      public DatabaseHelper()
  • Method Details

    • createAccount

      public static Account createAccount(String username)
    • createAccountWithId

      public static Account createAccountWithId(String username, int reservedId)
    • createAccountWithPassword

      @Deprecated public static Account createAccountWithPassword(String username, String password)
      Deprecated.
    • saveAccount

      public static void saveAccount(Account account)
    • getAccountByName

      public static Account getAccountByName(String username)
    • getAccountByToken

      public static Account getAccountByToken(String token)
    • getAccountBySessionKey

      public static Account getAccountBySessionKey(String sessionKey)
    • getAccountById

      public static Account getAccountById(String uid)
    • getAccountByPlayerId

      public static Account getAccountByPlayerId(int playerId)
    • deleteAccount

      public static void deleteAccount(Account target)
    • getAllPlayers

      public static List<Player> getAllPlayers()
    • getPlayerById

      public static Player getPlayerById(int id)
    • checkPlayerExists

      public static boolean checkPlayerExists(int id)
    • createPlayer

      public static Player createPlayer(Player character, int reservedId)
    • getNextPlayerId

      public static int getNextPlayerId(int reservedId)
    • savePlayer

      public static void savePlayer(Player character)
    • saveAvatar

      public static void saveAvatar(Avatar avatar)
    • getAvatars

      public static List<Avatar> getAvatars(Player player)
    • saveItem

      public static void saveItem(GameItem item)
    • deleteItem

      public static boolean deleteItem(GameItem item)
    • getInventoryItems

      public static List<GameItem> getInventoryItems(Player player)
    • getFriends

      public static List<Friendship> getFriends(Player player)
    • getReverseFriends

      public static List<Friendship> getReverseFriends(Player player)
    • saveFriendship

      public static void saveFriendship(Friendship friendship)
    • deleteFriendship

      public static void deleteFriendship(Friendship friendship)
    • getReverseFriendship

      public static Friendship getReverseFriendship(Friendship friendship)
    • getGachaRecords

      public static List<GachaRecord> getGachaRecords(int ownerId, int page, int gachaType)
    • getGachaRecords

      public static List<GachaRecord> getGachaRecords(int ownerId, int page, int gachaType, int pageSize)
    • getGachaRecordsMaxPage

      public static long getGachaRecordsMaxPage(int ownerId, int page, int gachaType)
    • getGachaRecordsMaxPage

      public static long getGachaRecordsMaxPage(int ownerId, int page, int gachaType, int pageSize)
    • saveGachaRecord

      public static void saveGachaRecord(GachaRecord gachaRecord)
    • getAllMail

      public static List<Mail> getAllMail(Player player)
    • saveMail

      public static void saveMail(Mail mail)
    • deleteMail

      public static boolean deleteMail(Mail mail)
    • getAllQuests

      public static List<GameMainQuest> getAllQuests(Player player)
    • saveQuest

      public static void saveQuest(GameMainQuest quest)
    • deleteQuest

      public static boolean deleteQuest(GameMainQuest quest)