5 Commits

Author SHA1 Message Date
Oliver
c7fb3b0b92 packets, fancynpcs: Update to 1.21.11-pre3 2025-11-25 18:35:43 +01:00
Oliver
9aecf99744 fancynpcs: Update version to 2.8.1 2025-11-25 18:05:01 +01:00
Oliver
1bdf350594 fancyvisuals: Update README.md 2025-11-25 18:00:45 +01:00
Oliver
b285b8f364 docs: Add built in placeholders of FancyCore 2025-11-25 14:33:37 +01:00
Oliver
9cba1bfb31 docs: Update event and punishment service references; add Placeholders API documentation 2025-11-25 13:48:12 +01:00
13 changed files with 105 additions and 9 deletions

View File

@@ -1,2 +1,2 @@
icon: code icon: code
order: 6 order: 7

View File

@@ -12,7 +12,8 @@ FancyCore has its own event system that allows you to listen to various events t
Example for registering a listener for the `PlayerReportedEvent`: Example for registering a listener for the `PlayerReportedEvent`:
```java ```java
EventService eventService = FancyCore.get().getEventService(); EventService eventService = EventService.get();
eventService.registerListener(PlayerReportedEvent.class, (event) -> { eventService.registerListener(PlayerReportedEvent.class, (event) -> {
System.out.println("PlayerReportedEvent fired with report id: " + event.getReport().id()); System.out.println("PlayerReportedEvent fired with report id: " + event.getReport().id());
}); });

View File

@@ -0,0 +1,48 @@
---
icon: dot
order: 7
---
# Placeholder API
FancyCore includes a Placeholders API that allows you to create and manage custom placeholders for use in various plugins.
## Parse placeholders
To parse placeholders in a string, use the `PlaceholderService`'s `parse` method. Here's an example:
```java
PlaceholderService placeholderService = PlaceholderService.get();
String parsedString = placeholderService.parse(player, "Hello, {player_name}! Your rank is {player_rank}.");
```
## Creating a custom placeholder
To create a custom placeholder, implement the `PlaceholderProvider` interface and register it with the `PlaceholderService`. Here's an example of creating a simple placeholder that returns a player's rank:
```java
public class PlayerRankPlaceholder implements PlaceholderProvider {
@Override
public String getName() {
return "Player Rank Placeholder";
}
@Override
public String getIdentifier() {
return "player_rank";
}
@Override
public String parse(FancyPlayer player, String input) {
return player.getRank().getName();
}
}
```
You can then register your placeholder provider with the `PlaceholderService`:
```java
PlaceholderService placeholderService = PlaceholderService.get();
placeholderService.registerPlaceholderProvider(new PlayerRankPlaceholder());
```

View File

@@ -12,7 +12,7 @@ FancyCore provides a comprehensive Punishment API that allows you to manage play
With the Punishment Service, you can easily issue various types of punishments to players. Below are examples of how to use 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 ```java
PunishmentService punishmentService = FancyCore.get().getPunishmentService(); PunishmentService punishmentService = PunishmentService.get();
punishmentService.warnPlayer(player, staff, "reason", duration); punishmentService.warnPlayer(player, staff, "reason", duration);

View File

@@ -0,0 +1,14 @@
---
order: 8
icon: paste
---
# Placeholders
FancyCore provides a set of built-in placeholders that can be used in various parts of the system.
You can use placeholders in almost any text field within FancyCore.
FancyCore also offers an API for creating and parse placeholders programmatically, read more about it in the [API documentation](../api/placeholders.md).
## Built-in Placeholders
* [Player related placeholders](player.md)

View File

@@ -0,0 +1,19 @@
---
icon: dot
title: Player
---
# Player placeholders
| Name | Identfier | Description | Examples outputs |
|------------------------------------------|---------------------------|------------------------------------------------------------|----------------------------------------|
| Player balance (formatted) | `player_balance` | Displays the player's current balance (formatted) | "0", "123", "123.45", "13,123.97" |
| Player balance (raw) | `player_balance_raw` | Displays the player's current balance (raw) | "0", "123", "123.45", "13123.9417" |
| Player chat color (hex) | `player_chat_color` | Displays the player's chat color in hex format | "#FF0000", "#00FF00", "#0000FF" |
| Player first time joined | `player_first_joined` | Displays the date and time the player first joined | "2023-01-01 12:00:00" |
| Player first time joined (raw timestamp) | `player_first_joined_raw` | Displays the raw timestamp of when the player first joined | "1672531200" |
| Player name | `player_name` | Displays the player's name | "Simon", "OliverHD" |
| Player nickname | `player_nickname` | Displays the player's nickname | "Oli" |
| Player play time (formatted) | `player_play_time` | Displays the player's total play time (formatted) | "0s", "5m 30s", "2h 15m" |
| Player play time (ms) | `player_play_time_ms` | Displays the player's total play time in milliseconds | "0", "330000", "8100000" |
| Player UUID | `player_uuid` | Displays the player's UUID | "9b605d04-5a59-4353-bba3-2ddf570eb38a" |

View File

@@ -7,6 +7,17 @@ order: 2
# #
## v2.8.1 [!badge variant="info" text="2025-11-25"]
- Removed support for 1.19.4
- Fixed npcs randomly disappearing
- Fixed skin mirroring for 1.21.9
- Added inverted permission check for `need_permission` action (use prefix `!` to invert)
- Added `/npc rotate <npc> <yaw> <pitch>` command to set NPC orientation
- Added `swing_arm_on_update` config option
- Added `use-minecraft-usercache` feature flag
## v2.8.0 [!badge variant="info" text="2025-10-10"] ## v2.8.0 [!badge variant="info" text="2025-10-10"]
- Added support for 1.21.9 and 1.21.10 - Added support for 1.21.9 and 1.21.10

View File

@@ -6,7 +6,7 @@ plugins {
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
dependencies { dependencies {
paperweight.paperDevBundle("1.21.11-pre2-R0.1-SNAPSHOT") paperweight.paperDevBundle("1.21.11-pre3-R0.1-SNAPSHOT")
compileOnly(project(":libraries:packets:packets-api")) compileOnly(project(":libraries:packets:packets-api"))
testImplementation(project(":libraries:packets")) testImplementation(project(":libraries:packets"))

View File

@@ -1,4 +1,5 @@
- Added support for 1.21.11 - Removed support for 1.19.4
- Fixed npcs randomly disappearing
- Fixed skin mirroring for 1.21.9 - Fixed skin mirroring for 1.21.9
- Added inverted permission check for `need_permission` action (use prefix `!` to invert) - Added inverted permission check for `need_permission` action (use prefix `!` to invert)
- Added `/npc rotate <npc> <yaw> <pitch>` command to set NPC orientation - Added `/npc rotate <npc> <yaw> <pitch>` command to set NPC orientation

View File

@@ -1 +1 @@
2.8.0.312 2.8.1

View File

@@ -6,7 +6,7 @@ plugins {
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
dependencies { dependencies {
paperweight.paperDevBundle("1.21.11-pre2-R0.1-SNAPSHOT") paperweight.paperDevBundle("1.21.11-pre3-R0.1-SNAPSHOT")
// compileOnly("com.fancyinnovations:fancymc:1.21.6-pre2") // compileOnly("com.fancyinnovations:fancymc:1.21.6-pre2")
compileOnly(project(":plugins:fancynpcs:fn-api")) compileOnly(project(":plugins:fancynpcs:fn-api"))

View File

@@ -22,8 +22,7 @@
"1.21.7", "1.21.7",
"1.21.8", "1.21.8",
"1.21.9", "1.21.9",
"1.21.10", "1.21.10"
"1.21.11"
], ],
"channel": "RELEASE", "channel": "RELEASE",
"loaders": [ "loaders": [

View File

@@ -1,5 +1,8 @@
# FancyVisuals # FancyVisuals
> [!IMPORTANT]
> FancyVisuals is not being actively developed anymore.
**Do not use this plugin in production! It is still in development and may contain bugs and unfinished features.** **Do not use this plugin in production! It is still in development and may contain bugs and unfinished features.**
This is a plugin to customise most visual components of your minecraft server. This includes the scoreboard, tablist, This is a plugin to customise most visual components of your minecraft server. This includes the scoreboard, tablist,