From e0fbe479c587622a8514614dbe74602cab6bff3d Mon Sep 17 00:00:00 2001 From: Taah Date: Sat, 2 Apr 2022 13:14:10 -0700 Subject: [PATCH] uh idk what i changed --- .../java/dev/plex/request/impl/GetEndpoints.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/dev/plex/request/impl/GetEndpoints.java b/src/main/java/dev/plex/request/impl/GetEndpoints.java index 1dce053..b150129 100644 --- a/src/main/java/dev/plex/request/impl/GetEndpoints.java +++ b/src/main/java/dev/plex/request/impl/GetEndpoints.java @@ -11,12 +11,12 @@ import dev.plex.request.AbstractServlet; import dev.plex.request.GetMapping; import dev.plex.util.PlexLog; import jakarta.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.UUID; -import java.util.stream.Collectors; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; +import java.util.UUID; +import java.util.stream.Collectors; + //@RestController //@RequestMapping("/api/admins") public class GetEndpoints extends AbstractServlet @@ -46,12 +46,12 @@ public class GetEndpoints extends AbstractServlet { PlexLog.debug("Plex-HTTPD using permissions check"); final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(UUID.fromString(player.getUuid())); - if (!HTTPDModule.getPermissions().playerHas(null, offlinePlayer, "plex.httpd.indefbans.access")) + if (!HTTPDModule.getPermissions().playerHas(null, offlinePlayer, "plex.httpd.admins.access")) { return new GsonBuilder().setPrettyPrinting().create().toJson(Plex.get().getAdminList().getAllAdminPlayers().stream().peek(plexPlayer -> plexPlayer.setIps(Lists.newArrayList())).collect(Collectors.toList())); } } - return new GsonBuilder().setPrettyPrinting().create().toJson(new ArrayList<>(Plex.get().getAdminList().getAllAdminPlayers())); + return new GsonBuilder().setPrettyPrinting().create().toJson(Plex.get().getAdminList().getAllAdminPlayers()); } @GetMapping(endpoint = "/api/indefbans/") @@ -84,6 +84,6 @@ public class GetEndpoints extends AbstractServlet return "Not enough permissions to view this page."; } } - return new GsonBuilder().setPrettyPrinting().create().toJson(new ArrayList<>(Plex.get().getPunishmentManager().getIndefiniteBans().stream().toList())); + return new GsonBuilder().setPrettyPrinting().create().toJson(Plex.get().getPunishmentManager().getIndefiniteBans().stream().toList()); } }