mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-05 23:33:36 +00:00
docs: Add punishment API and some disclaimers for FancyCore
This commit is contained in:
@@ -3,7 +3,7 @@ icon: dot
|
||||
order: 9
|
||||
---
|
||||
|
||||
# Events
|
||||
# Events API
|
||||
|
||||
FancyCore has its own event system that allows you to listen to various events that happen in the FancyCore system.
|
||||
|
||||
|
||||
38
docs/src/fancycore/api/punishments.md
Normal file
38
docs/src/fancycore/api/punishments.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
icon: dot
|
||||
order: 8
|
||||
---
|
||||
|
||||
# Punishment API
|
||||
|
||||
FancyCore provides a comprehensive Punishment API that allows you to manage player punishments such as warnings, kicks, mutes, and bans.
|
||||
|
||||
## Using the Punishment Service
|
||||
|
||||
With the Punishment Service, you can easily issue various types of punishments to players. Below are examples of how to use the Punishment Service:
|
||||
|
||||
```java
|
||||
PunishmentService punishmentService = FancyCore.get().getPunishmentService();
|
||||
|
||||
punishmentService.warnPlayer(player, staff, "reason", duration);
|
||||
|
||||
punishmentService.mutePlayer(player, staff, "reason"); // Permanent mute
|
||||
punishmentService.mutePlayer(player, staff, "reason", 1000*60*60*4); // Temporary mute (4 hours)
|
||||
|
||||
punishmentService.kickPlayer(player, staff, "reason");
|
||||
|
||||
punishmentService.banPlayer(player, staff, "reason", duration); // Permanent ban
|
||||
punishmentService.banPlayer(player, staff, "reason", 1000*60*60*24); // Temporary ban (1 day)
|
||||
```
|
||||
|
||||
You can also retrieve existing punishments for a player:
|
||||
|
||||
```java
|
||||
List<Punishment> punishments = punishmentService.getPunishmentsForPlayer(player);
|
||||
```
|
||||
|
||||
Player reports are also managed through the Punishment Service:
|
||||
|
||||
```java
|
||||
punishmentService.reportPlayer(player, staff, "reason");
|
||||
```
|
||||
@@ -7,6 +7,11 @@ title: Chat
|
||||
|
||||
# Commands for the chat system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
## Messages
|
||||
|
||||
### Message
|
||||
|
||||
@@ -7,6 +7,11 @@ title: Economy
|
||||
|
||||
# Commands for the economy system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
### Balance
|
||||
|
||||
Description: Displays the balance of the specified player or your own balance if no player is specified.<br/>
|
||||
|
||||
@@ -7,6 +7,11 @@ title: Inventory
|
||||
|
||||
# Commands for the inventory system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
## Kits
|
||||
|
||||
### Create Kit
|
||||
|
||||
@@ -7,6 +7,11 @@ title: Moderation
|
||||
|
||||
# Commands for the moderation system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
## Report
|
||||
|
||||
### Report a Player
|
||||
|
||||
@@ -7,6 +7,11 @@ title: Permissions
|
||||
|
||||
# Commands for the permissions system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
## Groups
|
||||
|
||||
### Create Group
|
||||
|
||||
@@ -7,6 +7,11 @@ title: Player
|
||||
|
||||
# Commands for the player system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
### Gamemode
|
||||
|
||||
Description: Changes the gamemode of a player.<br/>
|
||||
|
||||
@@ -7,6 +7,11 @@ title: Server
|
||||
|
||||
# Commands for the server system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
## Server control
|
||||
|
||||
### Restart
|
||||
|
||||
@@ -7,6 +7,11 @@ title: Teleportation
|
||||
|
||||
# Commands for the teleportation system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
## Player Teleportation
|
||||
|
||||
### Teleport to another player
|
||||
|
||||
@@ -7,6 +7,11 @@ title: World
|
||||
|
||||
# Commands for the world management system
|
||||
|
||||
!!!warning
|
||||
The command list is not complete and not all commands are properly documented yet.
|
||||
Some commands might not be implemented yet.
|
||||
!!!
|
||||
|
||||
## World Management
|
||||
|
||||
### Create a new world
|
||||
|
||||
Reference in New Issue
Block a user