Index

B C F 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

checkAndTriggerEnd(UUID, String) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
Checks a single cooldown for expiry, calls CooldownEndEvent, and removes it if expired.
checkAndTriggerEnd(Player, String) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
CheckForPaper - Class in com.petarmc.petarlib
 
CheckForPaper() - Constructor for class com.petarmc.petarlib.CheckForPaper
 
com.petarmc.petarlib - package com.petarmc.petarlib
 
com.petarmc.petarlib.cooldowns - package com.petarmc.petarlib.cooldowns
 
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
 
CooldownEndEvent - Class in com.petarmc.petarlib.cooldowns
Called when a cooldown expires or is cleaned up.
CooldownEndEvent(UUID, String, long) - Constructor for class com.petarmc.petarlib.cooldowns.CooldownEndEvent
 
CooldownManager - Class in com.petarmc.petarlib.cooldowns
Per-player cooldowns.
CooldownManager() - Constructor for class com.petarmc.petarlib.cooldowns.CooldownManager
 
CooldownStartEvent - Class in com.petarmc.petarlib.cooldowns
Called when a cooldown is about to start.
CooldownStartEvent(UUID, String, long, long) - Constructor for class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 

F

formatRemaining(long) - Static method in class com.petarmc.petarlib.cooldowns.CooldownManager
Formats a remaining duration into mm:ss (zero-padded) format.

G

get(String) - Method in class com.petarmc.petarlib.net.HttpClientWrapper
Sends an async GET request to the specified URL.
getCooldownId() - Method in class com.petarmc.petarlib.cooldowns.CooldownEndEvent
 
getCooldownId() - Method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
getDurationMillis() - Method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
getEndTimestamp() - Method in class com.petarmc.petarlib.cooldowns.CooldownEndEvent
 
getEndTimestamp() - Method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
getHandlerList() - Static method in class com.petarmc.petarlib.cooldowns.CooldownEndEvent
 
getHandlerList() - Static method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
getHandlers() - Method in class com.petarmc.petarlib.cooldowns.CooldownEndEvent
 
getHandlers() - Method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
getPlayerId() - Method in class com.petarmc.petarlib.cooldowns.CooldownEndEvent
 
getPlayerId() - Method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
getRemaining(UUID, String) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
Returns remaining cooldown time in milliseconds for the given player and ID.
getRemaining(Player, String) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager

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() - Constructor for class com.petarmc.petarlib.net.HttpClientWrapper
Creates a new HttpClientWrapper with a default maximum number of retries from the plugin config.
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

isCancelled() - Method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
isOnCooldown(UUID, String) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
Checks if the given player is still on the specified cooldown.
isOnCooldown(Player, String) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
isPaperServer() - Static method in class com.petarmc.petarlib.CheckForPaper
Attempts to detect if the running server is Paper.
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

removeCooldown(UUID, String) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
Removes a specific cooldown for a player, if present.
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

sendActionBarNotification(Player, String) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Shows an action bar notification to the player.
sendActionBarNotification(Player, Component) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Shows an action bar notification to the player.
sendChatNotification(Player, String) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Shows a chat message to the player.
sendChatNotification(Player, Component) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Shows a chat message to the player.
sendTitleNotification(Player, String, String) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Shows a title notification to the player.
sendTitleNotification(Player, Title) - Method in class com.petarmc.petarlib.notifications.NotificationManager
Shows a title notification to the player.
setCancelled(boolean) - Method in class com.petarmc.petarlib.cooldowns.CooldownStartEvent
 
setCooldown(UUID, String, long) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
Sets a cooldown for the given player and ID using the supplied duration.
setCooldown(Player, String, long) - Method in class com.petarmc.petarlib.cooldowns.CooldownManager
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 F G H I N P R S T 
All Classes and Interfaces|All Packages