From f73c63f1e7d847f6e60b15d00e62011d804e2afa Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 10 Apr 2022 00:46:17 -0500 Subject: [PATCH] test --- Plex-API/build.gradle | 5 ++++ .../src/main/java/dev/plex/api/AdminAPI.java | 23 +++++++++++++++++++ .../main/java/dev/plex/admin/AdminList.java | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 Plex-API/src/main/java/dev/plex/api/AdminAPI.java diff --git a/Plex-API/build.gradle b/Plex-API/build.gradle index aebbee1..d114d7c 100644 --- a/Plex-API/build.gradle +++ b/Plex-API/build.gradle @@ -2,6 +2,11 @@ group = "dev.plex" version = rootProject.version description = "Plex-API" +dependencies { + implementation project(":Plex-Core") + compileOnly "io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT" +} + tasks.jar { archiveBaseName.set("Plex-API") archiveVersion.set("") diff --git a/Plex-API/src/main/java/dev/plex/api/AdminAPI.java b/Plex-API/src/main/java/dev/plex/api/AdminAPI.java new file mode 100644 index 0000000..4bce286 --- /dev/null +++ b/Plex-API/src/main/java/dev/plex/api/AdminAPI.java @@ -0,0 +1,23 @@ +package dev.plex.api; + +import dev.plex.PlexBase; +import dev.plex.player.PlexPlayer; +import java.util.List; + +public class AdminAPI extends PlexBase +{ + /** + * Gathers every admins username (cached and in the database) + * + * @return An array list of the names of every admin + */ + public List getAllAdmins() + { + return plugin.getAdminList().getAllAdmins(); + } + + public List getAllAdminPlayers() + { + return plugin.getAdminList().getAllAdminPlayers(); + } +} diff --git a/Plex-Core/src/main/java/dev/plex/admin/AdminList.java b/Plex-Core/src/main/java/dev/plex/admin/AdminList.java index 007d1fd..b866449 100644 --- a/Plex-Core/src/main/java/dev/plex/admin/AdminList.java +++ b/Plex-Core/src/main/java/dev/plex/admin/AdminList.java @@ -54,7 +54,7 @@ public class AdminList extends PlexBase } /** - * Gathers every admin's username (cached and in the database) + * Gathers every admins username (cached and in the database) * * @return An array list of the names of every admin */