uh idk what i changed

This commit is contained in:
Taah 2022-04-02 13:14:10 -07:00
parent 81f554334b
commit e0fbe479c5

View File

@ -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());
}
}