1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-19 10:22:58 +01:00
Files
mcMMO/src/main/java/com/gmail/nossr50/api/DatabaseAPI.java
2021-03-16 15:40:46 -07:00

31 lines
843 B
Java

package com.gmail.nossr50.api;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.mcMMO;
import java.util.UUID;
public class DatabaseAPI {
/**
* Checks if a player exists in the mcMMO Database
* @param uuid player UUID
* @return true if the player exists in the DB, false if they do not
*/
public boolean doesPlayerExistInDB(String uuid) {
return doesPlayerExistInDB(UUID.fromString(uuid));
}
/**
* Checks if a player exists in the mcMMO Database
* @param uuid player UUID
* @return true if the player exists in the DB, false if they do not
*/
public boolean doesPlayerExistInDB(UUID uuid) {
PlayerProfile playerProfile = mcMMO.getDatabaseManager().loadPlayerProfile(uuid, null);
return playerProfile.isLoaded();
}
}