mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-02 05:21:36 +01:00
[3.4.2] 2 api methods
This commit is contained in:
parent
2feb291f11
commit
bbbe47982c
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.djrapitops</groupId>
|
<groupId>com.djrapitops</groupId>
|
||||||
<artifactId>Plan</artifactId>
|
<artifactId>Plan</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.4.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<repositories>
|
<repositories>
|
||||||
<!-- <repository>
|
<!-- <repository>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package main.java.com.djrapitops.plan.api;
|
package main.java.com.djrapitops.plan.api;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import main.java.com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import main.java.com.djrapitops.plan.data.AnalysisData;
|
import main.java.com.djrapitops.plan.data.AnalysisData;
|
||||||
@ -242,4 +245,33 @@ public class API {
|
|||||||
public UUID playerNameToUUID(String playerName) throws Exception {
|
public UUID playerNameToUUID(String playerName) throws Exception {
|
||||||
return UUIDFetcher.getUUIDOf(playerName);
|
return UUIDFetcher.getUUIDOf(playerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the saved UUIDs in the database.
|
||||||
|
*
|
||||||
|
* Should be called from async thread.
|
||||||
|
*
|
||||||
|
* @return Collection of UUIDs that can be found in the database.
|
||||||
|
* @throws SQLException If database error occurs.
|
||||||
|
* @since 3.4.2
|
||||||
|
*/
|
||||||
|
public Collection<UUID> getSavedUUIDs() throws SQLException {
|
||||||
|
return plugin.getDB().getSavedUUIDs();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the saved UserData in the database for a collection of UUIDs.
|
||||||
|
*
|
||||||
|
* Will not contain data for UUIDs not found in the database.
|
||||||
|
*
|
||||||
|
* Should be called from async thread.
|
||||||
|
*
|
||||||
|
* @param uuids Collection of UUIDs that can be found in the database.
|
||||||
|
* @return List of all Data in the database.
|
||||||
|
* @throws SQLException If database error occurs.
|
||||||
|
* @since 3.4.2
|
||||||
|
*/
|
||||||
|
public List<UserData> getUserDataOfUsers(Collection<UUID> uuids) throws SQLException {
|
||||||
|
return plugin.getDB().getUserDataForUUIDS(uuids);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user