mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-12-22 16:04:59 +00:00
uh idk what i changed
This commit is contained in:
parent
81f554334b
commit
e0fbe479c5
1 changed files with 6 additions and 6 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue