Index

B C G H I N P R S T 
All Classes and Interfaces|All Packages

B

body - Variable in class com.petarmc.petarlib.net.HttpResponse
The body of the response as a string.

C

com.petarmc.petarlib.net - package com.petarmc.petarlib.net
 
com.petarmc.petarlib.notifications - package com.petarmc.petarlib.notifications
 
com.petarmc.petarlib.task - package com.petarmc.petarlib.task
 

G

get(String) - Method in class com.petarmc.petarlib.net.HttpClientWrapper
Sends an async GET request to the specified URL.

H

headers - Variable in class com.petarmc.petarlib.net.HttpResponse
The HTTP headers of the response.
HttpClientWrapper - Class in com.petarmc.petarlib.net
A simple wrapper around Java's HttpClient with support for retries and asycn execution.
HttpClientWrapper(int) - Constructor for class com.petarmc.petarlib.net.HttpClientWrapper
Creates a new HttpClientWrapper with a specified maximum number of retries.
HttpResponse - Class in com.petarmc.petarlib.net
Represents an HTTP response with status code, body, and headers.
HttpResponse(int, String, Map<String, List<String>>) - Constructor for class com.petarmc.petarlib.net.HttpResponse
Constructs a new HttpResponse.

I

isSuccess() - Method in class com.petarmc.petarlib.net.HttpResponse
Returns true if the status code indicates a successful response (200-299).

N

NotificationManager - Class in com.petarmc.petarlib.notifications
 
NotificationManager() - Constructor for class com.petarmc.petarlib.notifications.NotificationManager
 

P

post(HttpRequest) - Method in class com.petarmc.petarlib.net.HttpClientWrapper
Sends an async POST request using the provided HttpRequest.

R

runAsync(Runnable) - Method in class com.petarmc.petarlib.task.TaskScheduler
Runs a task asynchronously.
runDelayed(Runnable, long) - Method in class com.petarmc.petarlib.task.TaskScheduler
Runs a task after a specified delay in ms.

S

sendChatNotif(String, Player) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Sends a chat message to the player.
showActionBarNotif(String, Player) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Shows an action bar notification to the player.
shutdown() - Method in class com.petarmc.petarlib.net.HttpClientWrapper
Shuts down the executor used for async HTTP requests.
shutdown() - Method in class com.petarmc.petarlib.task.TaskScheduler
Shuts down the scheduler, waiting up to 5 seconds before forcing shutdown.
statusCode - Variable in class com.petarmc.petarlib.net.HttpResponse
The HTTP status code of the response.

T

TaskScheduler - Class in com.petarmc.petarlib.task
Schedules and executes tasks async or with a delay.
TaskScheduler(int) - Constructor for class com.petarmc.petarlib.task.TaskScheduler
Creates a TaskScheduler with a fixed number of threads.
toString() - Method in class com.petarmc.petarlib.net.HttpResponse
Returns a string representation of the HttpResponse, including status code and body length.
B C G H I N P R S T 
All Classes and Interfaces|All Packages