All Implemented Interfaces:
Deactivated

public class MySQL extends PoolSQLCommunication
  • Constructor Details

  • Method Details

    • getUUID

      public UUID getUUID(int pPlayerID)
    • getPlayerID

      public int getPlayerID(net.md_5.bungee.api.connection.ProxiedPlayer pPlayer)
    • getPlayerID

      public int getPlayerID(UUID pUUID)
      Returns the ID of a player
      Parameters:
      pUUID - The UUID of the player
      Returns:
      Returns the ID of a player
    • getPlayerData

      public PlayerDataSet getPlayerData(UUID pUUID)
    • getPlayerData

      public PlayerDataSet getPlayerData(int pPlayerId)
      Parameters:
      pPlayerId - The id of the player
      Returns:
      Returns a PlayerDataSet where at least ID and UUID are not null or if the player could not be found the ID -1, NAME null and UUID null
    • getPlayerID

      public int getPlayerID(String pPlayerName)
      Returns the ID of a player
      Parameters:
      pPlayerName - Name of the player Returns the ID of a player
      Returns:
      Returns the ID of a player
    • getPlayerData

      public PlayerDataSet getPlayerData(String pPlayerName)
    • firstJoin

      public int firstJoin(net.md_5.bungee.api.connection.ProxiedPlayer pPlayer)
      Will be executed if a player joins the first time on the server
      Parameters:
      pPlayer - The player
    • getFriends

      public List<Integer> getFriends(int pPlayerID)
      Gives out the IDs of the friends of a player
      Parameters:
      pPlayerID - The ID of the player
      Returns:
      Returns the IDs of the friends of a player
    • getFriendsPlayerData

      public List<PlayerDataSet> getFriendsPlayerData(int pPlayerID)
    • getFriendsPlayerDataForListing

      public List<PlayerDataSet> getFriendsPlayerDataForListing(int pPlayerID)
    • getName

      public String getName(int pPlayerID)
      Returns the name of a player
      Parameters:
      pPlayerID - The ID of the player
      Returns:
      Returns the name of a player
    • updatePlayerName

      public void updatePlayerName(int pPlayerID, String pNewPlayerName)
      Updates the name of a player
      Parameters:
      pPlayerID - The ID of the player
      pNewPlayerName - New name of the player
    • updateUUID

      public void updateUUID(int pPlayerID, UUID pNewUUID)
    • hasRequestFrom

      public boolean hasRequestFrom(int pReceiver, int pRequester)
    • getRequests

      public ArrayList<Integer> getRequests(int pPlayerID)
      Returns the IDs of the friends from a player
      Parameters:
      pPlayerID - The ID of the player
      Returns:
      Returns the IDs of the friends from a player
    • getRequestsPlayerData

      public List<PlayerDataSet> getRequestsPlayerData(int pPlayerID)
    • getFriendCount

      public int getFriendCount(int pPlayerId)
    • addFriend

      public void addFriend(int pIDRequester, int pIDReceiver)
      Adds a player to friends
      Parameters:
      pIDRequester - The sender of the command
      pIDReceiver - The new friend
    • denyRequest

      public void denyRequest(int pReceiverSender, int pRequesterID)
      Removes a friend request
      Parameters:
      pReceiverSender - The ID of the command executor
      pRequesterID - The ID of the person who had send the friend request
    • deleteFriend

      public void deleteFriend(int pFriend1ID, int pFriend2ID)
      Deletes a friend
      Parameters:
      pFriend1ID - The ID of the command sender
      pFriend2ID - The ID of the friend, which should be deleted
    • sendFriendRequest

      public void sendFriendRequest(int pSenderID, int pQueryID)
      Send a friend request
      Parameters:
      pSenderID - The ID of Sender of the friend request
      pQueryID - The ID of the player, which gets the friend request
    • changeSettingsWorth

      public int changeSettingsWorth(int pPlayerID, int pSettingsID)
      Sets a setting
      Parameters:
      pPlayerID - The id of the player
      pSettingsID - The ID of the setting
      Returns:
      Returns the new worth
    • isAFriendOf

      @Deprecated public boolean isAFriendOf(net.md_5.bungee.api.connection.ProxiedPlayer pPlayer1, net.md_5.bungee.api.connection.ProxiedPlayer pPlayer2)
      Deprecated.
      Checks if somebody is a friend of someone others
      Parameters:
      pPlayer1 - The player
      pPlayer2 - The other player
      Returns:
      Returns if player one is a friend of player two true, otherwise false
    • getSettingsWorth

      public int getSettingsWorth(int pPlayerID, int pSettingsID)
    • setSetting

      public void setSetting(int pPlayerID, int pSettingsID, int pNewWorth)
    • isAFriendOf

      public boolean isAFriendOf(int pPlayerID1, int pPlayerID2)
    • getLastPlayerWroteTo

      public int getLastPlayerWroteTo(int pID)
      Returns the last player who wrote to the given player
      Parameters:
      pID - The ID of the player
      Returns:
      Returns the last player who wrote to the given player
    • setLastPlayerWroteTo

      public void setLastPlayerWroteTo(int pPlayerID, int pLastWroteTo)
      Parameters:
      pPlayerID - The ID of the player
      pLastWroteTo - The ID of the player who wrote to
    • getLastOnline

      public Timestamp getLastOnline(int pPlayerID)
    • updateLastOnline

      public void updateLastOnline(int pPlayerID)
    • deletePlayerEntry

      public void deletePlayerEntry(int pPlayerId)