mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43: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
|
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.
|
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
|
# 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
|
## Messages
|
||||||
|
|
||||||
### Message
|
### Message
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ title: Economy
|
|||||||
|
|
||||||
# Commands for the economy system
|
# 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
|
### Balance
|
||||||
|
|
||||||
Description: Displays the balance of the specified player or your own balance if no player is specified.<br/>
|
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
|
# 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
|
## Kits
|
||||||
|
|
||||||
### Create Kit
|
### Create Kit
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ title: Moderation
|
|||||||
|
|
||||||
# Commands for the moderation system
|
# 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
|
||||||
|
|
||||||
### Report a Player
|
### Report a Player
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ title: Permissions
|
|||||||
|
|
||||||
# Commands for the permissions system
|
# 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
|
## Groups
|
||||||
|
|
||||||
### Create Group
|
### Create Group
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ title: Player
|
|||||||
|
|
||||||
# Commands for the player system
|
# 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
|
### Gamemode
|
||||||
|
|
||||||
Description: Changes the gamemode of a player.<br/>
|
Description: Changes the gamemode of a player.<br/>
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ title: Server
|
|||||||
|
|
||||||
# Commands for the server system
|
# 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
|
## Server control
|
||||||
|
|
||||||
### Restart
|
### Restart
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ title: Teleportation
|
|||||||
|
|
||||||
# Commands for the teleportation system
|
# 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
|
## Player Teleportation
|
||||||
|
|
||||||
### Teleport to another player
|
### Teleport to another player
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ title: World
|
|||||||
|
|
||||||
# Commands for the world management system
|
# 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
|
## World Management
|
||||||
|
|
||||||
### Create a new world
|
### Create a new world
|
||||||
|
|||||||
Reference in New Issue
Block a user