📄
pasted-code-1790408696616.txt
txt
772 lines
▶
You are an expert Minecraft Paper plugin developer.
Build a complete **Custom Recipe Browser GUI addon** that works with the existing **Custom Recipes** plugin by TomMustBe12.
Reference plugin:
https://modrinth.com/plugin/custom-recipes
The existing plugin already handles recipe creation and registration. DO NOT recreate or replace its recipe engine.
The goal of this project is to add a polished **player-facing Recipe Browser / Recipe Book GUI** that reads the recipes created by the existing Custom Recipes plugin and visually displays how to craft them.
# TARGET SERVER
* Minecraft Java 1.21.11
* Paper
* Java 21
* Existing dependency: Custom Recipes
* Standalone addon/plugin
* No economy dependency
* No unnecessary external dependencies
# IMPORTANT ARCHITECTURE
The existing Custom Recipes plugin already provides:
* `/recipe` recipe creation GUI
* 3x3 recipe creation
* Custom recipe persistence
* Vanilla crafting-table integration
* Custom NBT data
* Permission `customrecipes.set`
The addon must NOT duplicate these systems.
Instead:
```text
Existing Custom Recipes
│
│ registered/saved recipes
▼
Custom Recipe GUI Addon
│
├── Recipe Browser
├── Recipe Categories
├── Recipe Search
├── Recipe Viewer
├── Pagination
└── Permission filtering
```
Use the existing plugin's API/classes/data format where available.
If the dependency does not expose a public API for reading recipes, inspect its source/repository and create a compatible integration layer rather than blindly duplicating its internal storage.
# PLUGIN NAME
Use:
`CustomRecipeBook`
Main class:
`com.example.customrecipebook.CustomRecipeBook`
# MAIN PLAYER COMMAND
Add:
`/recipes`
Aliases:
`/recipebook`
`/customrecipebook`
This opens the player Recipe Browser.
DO NOT replace or interfere with the existing `/recipe` command.
The existing `/recipe` command must continue to work exactly as it does.
# RECIPE BROWSER
When a player runs:
`/recipes`
open a 54-slot chest GUI.
Default title:
`Recipe Book`
Display all recipes registered by the existing Custom Recipes plugin.
Each recipe should appear as its resulting item.
Example:
```text
┌─────────────────────────────────────────────────────┐
│ CUSTOM RECIPE BOOK │
│ │
│ [Sword] [Pickaxe] [Armor] [Core] [Food] [Other] │
│ │
│ [R] [R] [R] [R] [R] [R] [R] [R] [R] │
│ [R] [R] [R] [R] [R] [R] [R] [R] [R] │
│ [R] [R] [R] [R] [R] [R] [R] [R] [R] │
│ │
│ [<] Page 1 / 3 [>] │
└─────────────────────────────────────────────────────┘
```
# RECIPE ICON
Each recipe should use its result item as the icon.
Example:
```text
Astral Core
Custom Recipe
Ingredients:
2x Diamond
1x Blaze Rod
1x Ender Pearl
Click to view recipe
```
Read the actual item name, lore, enchantments, NBT and other supported metadata from the existing recipe.
Do NOT replace the actual result item with a generic placeholder.
# RECIPE VIEWER
When the player clicks a recipe, open a detailed 27-slot GUI.
Example:
```text
┌─────────────────────────────────┐
│ Astral Core │
│ │
│ [D] [D] [ ] [ RESULT ] │
│ [ ] [B] [ ] ↓ │
│ [ ] [E] [ ] [Astral Core]│
│ │
│ [ BACK ] [ CLOSE ] │
└─────────────────────────────────┘
```
For shaped recipes:
Display the exact 3x3 arrangement used by the recipe.
For example:
```text
D D
B
E
```
must visually remain:
```text
[D][D][ ]
[ ][B][ ]
[ ][E][ ]
```
Do not rearrange shaped recipes.
# SHAPELESS RECIPES
If the existing recipe is shapeless, display the ingredients in a clean arrangement.
Example:
```text
[D][D][B]
[E][ ][ ]
```
Add:
`Shapeless Recipe `
The player should understand that ingredient positions do not matter.
# INGREDIENT INFORMATION
Hovering over an ingredient should show the actual ingredient ItemStack.
Support everything that the underlying Custom Recipes plugin supports, including custom item metadata/NBT where available.
Do not reduce custom items to only their Material.
For example, if the recipe requires a special named item:
```text
Ancient Fragment
```
the GUI must show that actual item and its lore.
# RESULT INFORMATION
The result slot must show the actual output item.
Preserve:
* Name
* Lore
* Enchantments
* Custom Model Data
* NBT
* Amount
* Item flags
* Other supported item metadata
# RECIPE SEARCH
Add a search button to the main GUI.
Example icon:
```text
[BOOK]
Search Recipes
Click to search
```
Allow players to search by:
* Recipe ID
* Result name
* Result material
* Recipe name
Use a Paper-compatible input system.
If chat input is used, safely handle:
* cancellation
* timeout
* player leaving
* invalid input
# CATEGORIES
Provide optional categories.
Example:
```text
[ALL] [WEAPONS] [TOOLS] [ARMOR] [MATERIALS] [SPECIAL]
```
Categories should be configurable.
Example:
```yaml
categories:
all:
name: "All Recipes"
icon: BOOK
weapons:
name: "Weapons"
icon: NETHERITE_SWORD
tools:
name: "Tools"
icon: NETHERITE_PICKAXE
armor:
name: "Armor"
icon: NETHERITE_CHESTPLATE
materials:
name: "Materials"
icon: DIAMOND
special:
name: "Special"
icon: NETHER_STAR
```
Allow recipe categories to be mapped through configuration.
# PAGINATION
The browser must support unlimited recipes.
Default:
18 or 27 recipes per page.
Buttons:
```text
Previous Page
Next Page
```
Show:
```text
Page 2 / 5
```
Preserve the current:
* Search
* Category
* Page
when navigating.
# PERMISSIONS
Player permission:
```text
customrecipebook.use
```
Default:
true
Admin permission:
```text
customrecipebook.admin
```
Default:
op
Optional recipe-specific permissions:
```text
customrecipebook.recipe.
```
If a recipe has a permission requirement, hide it from players who do not have permission.
Do NOT modify the existing plugin's `customrecipes.set` permission.
That permission belongs to the original recipe creation system.
# RECIPE VISIBILITY
The addon should respect recipe availability/permissions from the underlying Custom Recipes plugin.
If a recipe cannot be crafted by a player according to the original plugin's permissions, do not incorrectly show it as available.
Provide configuration:
```yaml
visibility:
hide-no-permission: true
hide-disabled: true
```
# ADMIN FEATURES
Do NOT create a second recipe creation system.
Instead, provide useful browser management tools for admins.
Command:
`/recipes admin`
Open an admin recipe browser.
Admin actions may include:
* View recipes
* Search recipes
* Inspect recipe data
* Reload addon
* Refresh recipe cache
Do not modify or delete recipes unless the existing plugin provides a safe supported API for doing so.
# RELOAD
Command:
`/recipes reload`
Permission:
`customrecipebook.admin`
It should:
1. Refresh configuration.
2. Re-read available recipes.
3. Rebuild recipe cache.
4. Update categories.
5. Rebuild GUI data.
Do not reload the original plugin unnecessarily.
# AUTOMATIC RECIPE DETECTION
When the server starts:
1. Detect the Custom Recipes plugin.
2. Verify it is enabled.
3. Connect to its recipe system.
4. Load all available recipes.
5. Build the browser cache.
If Custom Recipes is missing:
```text
[CustomRecipeBook] Custom Recipes was not found.
[CustomRecipeBook] Recipe browser disabled.
```
The server must NOT crash.
# DEPENDENCY
Declare Custom Recipes as a required dependency if the addon cannot function without it.
Use the correct plugin name from the target plugin.
The addon must refuse to enable its recipe features when the dependency is unavailable.
# CONFIGURATION
Create:
```text
plugins/CustomRecipeBook/
├── config.yml
├── categories.yml
└── messages.yml
```
Example `config.yml`:
```yaml
settings:
debug: false
dependency:
required-plugin: "CustomRecipes"
gui:
main:
size: 54
title: "Recipe Book"
viewer:
size: 27
title: "%recipe_name%"
recipes-per-page: 27
visibility:
hide-no-permission: true
hide-disabled: true
sounds:
click: UI_BUTTON_CLICK
open: BLOCK_CHEST_OPEN
close: BLOCK_CHEST_CLOSE
navigation:
previous-slot: 45
close-slot: 49
next-slot: 53
```
# MESSAGES
Create:
`messages.yml`
Example:
```yaml
prefix: "RecipeBook » "
no-permission: "You don't have permission to use the recipe book."
no-recipes: "No recipes were found."
reload-success: "Recipe book reloaded."
recipe-not-found: "Recipe not found."
search-prompt: "Type your search in chat."
search-cancelled: "Search cancelled."
search-results: "Showing results for %query% ."
```
# GUI PROTECTION
The GUI must be completely secure.
Players must not be able to:
* Take recipe items.
* Move recipe items.
* Shift-click items.
* Drag items.
* Drop items.
* Number-key swap.
* Double-click collect.
* Place items into GUI.
* Exploit the GUI to duplicate items.
All GUI ItemStacks must be treated as display-only.
# ITEM IDENTITY
Do not identify GUI buttons only by display names.
Use `PersistentDataContainer` keys to identify:
* Recipe buttons
* Category buttons
* Search button
* Back button
* Next button
* Previous button
* Close button
This prevents conflicts with player-created items that happen to have the same name.
# CACHE SYSTEM
Implement an efficient RecipeCache.
It should store:
* Recipe ID
* Result ItemStack
* Recipe type
* Ingredients
* Shape
* Permissions
* Display information
Do not constantly scan configuration files every time a player opens the GUI.
Refresh the cache when:
* Server starts
* `/recipes reload`
* Underlying recipe data changes, if an API/event is available
# API COMPATIBILITY
First inspect the Custom Recipes plugin's source/API.
Use its official API if available.
Do NOT depend on private implementation details unless absolutely necessary.
Create an integration abstraction:
```java
interface RecipeProvider {
Collection getRecipes();
Optional getRecipe(String id);
boolean isAvailable(Player player, RecipeData recipe);
}
```
Then implement:
```java
class CustomRecipesProvider implements RecipeProvider
```
This makes the addon maintainable if the original plugin changes.
# VERSION TARGET
The addon must target:
Minecraft:
`1.21.11`
Java:
`21`
Paper API:
`1.21.11`
The linked Custom Recipes plugin currently lists compatibility with 1.21.5–1.21.11, so use that compatibility target when designing the integration.
# IMPORTANT: DO NOT RECREATE THE ORIGINAL PLUGIN
The original plugin already has a creation GUI where admins can place ingredients, set an output and submit the recipe.
Therefore:
DO NOT implement:
* Another `/recipe` command
* Another recipe registration engine
* Another crafting engine
* Another recipe persistence format
* Another vanilla crafting implementation
Instead, make this addon a **Recipe Book / Recipe Viewer layer on top of Custom Recipes**.
# OPTIONAL ENHANCEMENTS
If the underlying API allows it, also show:
```text
Recipe Type:
Shaped
Recipe ID:
astral_core
Crafting:
Crafting Table
Permission:
customrecipes.astralcore
```
Add a configurable `Craftable` indicator:
```text
✔ You can craft this
```
or:
```text
✘ You cannot craft this
```
Do not let the addon incorrectly determine crafting eligibility; use the underlying plugin's permission/recipe logic wherever possible.
# PROJECT STRUCTURE
Use:
```text
CustomRecipeBook/
├── build.gradle
├── settings.gradle
├── README.md
│
└── src/
└── main/
├── java/
│ └── com/
│ └── example/
│ └── customrecipebook/
│
│ CustomRecipeBook.java
│
│ command/
│ RecipesCommand.java
│
│ integration/
│ RecipeProvider.java
│ CustomRecipesProvider.java
│
│ recipe/
│ RecipeData.java
│ RecipeCache.java
│
│ gui/
│ RecipeBrowserGUI.java
│ RecipeViewerGUI.java
│ GUIManager.java
│
│ listener/
│ InventoryListener.java
│
│ config/
│ ConfigManager.java
│
│ util/
│ ItemBuilder.java
│ TextUtil.java
│ GUIUtil.java
│
└── resources/
├── plugin.yml
├── config.yml
├── categories.yml
└── messages.yml
```
# FINAL REQUIREMENT
Build the COMPLETE plugin.
Do not only provide example code.
The final project must:
* Compile successfully.
* Target Paper 1.21.11.
* Use Java 21.
* Depend on the existing Custom Recipes plugin.
* Keep `/recipe` working.
* Add `/recipes`.
* Display all compatible recipes.
* Show exact shaped recipe layouts.
* Show shapeless recipes.
* Display actual custom items/NBT where supported.
* Support pagination.
* Support search.
* Support categories.
* Support permissions.
* Protect all GUI inventories.
* Handle missing dependency gracefully.
* Include configuration.
* Include messages.
* Include README.
* Have no TODOs for core functionality.
* Have no fake API calls.
* Have no placeholder implementations.
Before finishing, compile the project and fix every compilation error.
Final output:
```text
CustomRecipeBook.jar
```
This JAR should be ready to place into:
```text
plugins/
```
alongside the existing Custom Recipes plugin.
The generation was stopped before any content could be produced.
📄
pasted-code-1790409637819.txt
txt
652 lines
▶
You are an expert Minecraft Java/Paper plugin developer specializing in custom SMP abilities.
I already have a **ClassAbilities** plugin concept for **Paper 1.21.11 / Java 21** with classes such as Berserker, Assassin, Tank, Archer, Vampire, Knight, Mage, Frost, Stormcaller, Ninja, Pyromancer, Golem, and Trader.
Now expand the plugin with a **Rare Ability System**.
## CORE CONCEPT
Not every ability should have the same power.
Create a rarity system:
```text
COMMON
UNCOMMON
RARE
EPIC
LEGENDARY
MYTHIC
DIVINE
```
Most abilities should be normal combat abilities.
Some abilities should be **extremely rare and overpowered**, making them valuable on an SMP.
Rare abilities must have:
* Long cooldowns
* Strong visual effects
* Unique sounds
* Action-bar notifications
* Configurable duration
* Configurable damage
* Configurable radius
* Configurable cooldown
* Configurable rarity
* Configurable availability
Do not make every player automatically receive rare abilities.
---
# 🔥 MYTHIC / LEGENDARY ABILITIES
## 1. Berserker — GOD RAGE
**Rarity:** MYTHIC
When activated:
* Strength III
* Resistance II
* Speed II
* Knockback Resistance
* Red rage particles
* Powerful activation sound
Duration:
```text
8 seconds
```
Cooldown:
```text
180 seconds
```
The ability should create a strong visual effect when activated.
---
## 2. Assassin — VOID STEP
**Rarity:** LEGENDARY
Teleport/dash a significant distance in the direction the player is looking.
On arrival:
* Damage nearby enemies
* Knockback
* Smoke/portal particles
* Teleport sound
Important:
**VOID STEP must respect the server's combat teleport restrictions.**
It must never become an unintended way to escape combat.
---
## 3. Tank — IMMORTAL
**Rarity:** MYTHIC
Temporarily become extremely resistant to damage.
Effects:
* Very high damage reduction
* Knockback resistance
* Slowness
* Heavy defensive particles
Duration:
```text
5 seconds
```
Cooldown:
```text
180 seconds
```
The effect must still have a maximum duration and cooldown.
---
## 4. Archer — DEATH ARROW
**Rarity:** LEGENDARY
The next arrow fired becomes a special Death Arrow.
Effects:
* Massive configurable bonus damage
* Special particle trail
* Impact explosion effect
* Custom sound
The arrow should only receive the bonus once.
---
## 5. Vampire — BLOOD REIGN
**Rarity:** MYTHIC
For a short duration:
* Successful attacks heal the Vampire
* Nearby enemies receive a debuff
* Red particles surround the player
* Blood-drain sound effects
Healing must have a configurable maximum so it cannot create unlimited regeneration.
---
## 6. Knight — DIVINE SHIELD
**Rarity:** MYTHIC
Create a powerful defensive shield.
While active:
* Absorb a configurable amount of damage
* Display shield particles
* Reduce incoming damage
* When the shield ends, release a knockback wave
Example:
```text
Shield Health: 30 hearts
Duration: 8 seconds
Cooldown: 180 seconds
```
---
## 7. Mage — APOCALYPSE
**Rarity:** MYTHIC
Target an area and create a huge magical explosion.
Effects:
* Large configurable radius
* High configurable damage
* Knockback
* Arcane particles
* Explosion sound
Default:
```text
Radius: 8 blocks
Damage: 8 hearts
Cooldown: 240 seconds
```
Do NOT destroy blocks by default.
---
## 8. Frost — ABSOLUTE ZERO
**Rarity:** MYTHIC
Create a powerful freezing zone.
Enemies inside receive:
* Heavy Slowness
* Optional Mining Fatigue
* Snow/ice particles
* Freeze sound
Duration and radius must be configurable.
---
## 9. Stormcaller — HEAVEN'S WRATH
**Rarity:** MYTHIC
Call multiple lightning strikes in a target area.
Effects:
* Several lightning strikes
* Electric particles
* Thunder sounds
* Damage enemies in the area
The number of strikes, radius, damage and delay between strikes must be configurable.
Do not cause unwanted permanent fire spread by default.
---
## 10. Ninja — SHADOW REALM
**Rarity:** LEGENDARY
Temporarily enter a shadow state.
Effects:
* Invisibility
* Speed III
* Smoke particles
* Dark visual effects
* Custom sound
Duration:
```text
6 seconds
```
Players should receive a clear activation notification.
---
## 11. Pyromancer — INFERNO
**Rarity:** MYTHIC
Create a large firestorm around the player.
Effects:
* Damage nearby enemies
* Ignite enemies
* Knockback
* Flame particles
* Fire sound
Do not permanently destroy the environment unless explicitly enabled.
---
## 12. Golem — WORLD BREAKER
**Rarity:** MYTHIC
Slam the ground and create a huge shockwave.
Effects:
* Large radius
* High damage
* Extreme knockback
* Slowness
* Ground/stone particles
* Powerful sound
Default:
```text
Radius: 8 blocks
Damage: 7 hearts
Cooldown: 200 seconds
```
Do not destroy blocks by default.
---
# 💰 13. TRADER — BLACK MARKET
**Rarity:** LEGENDARY
The Trader receives a special ability called:
**BLACK MARKET**
When activated, open a unique trading GUI containing rare and limited items.
Example:
```text
BLACK MARKET
[Rare Item] [Special Item]
[Enchanted Item] [Mystery Item]
[CLOSE]
```
The available items must be configurable.
The Black Market should have:
* Configurable prices
* Configurable items
* Configurable stock
* Configurable refresh time
* Configurable rarity
* Optional limited purchases
The Trader should remain primarily a utility/economy class.
---
# ☠️ ULTRA-RARE DIVINE ABILITIES
Add an additional rarity:
## DIVINE
Divine abilities should be extremely rare.
They should not be automatically available to everyone.
### DEATH MARK
Mark one enemy.
While marked:
* Deal bonus damage to the marked target
* Display a unique particle effect
* Show the target's marked status
The mark expires after a configurable duration.
---
### REALITY BREAK
Create a temporary area where certain custom abilities are disabled.
Players can still use:
* Swords
* Bows
* Shields
* Normal Minecraft combat
Only configurable custom abilities are affected.
---
### OVERDRIVE
Temporarily increase several combat attributes.
Possible effects:
* Strength
* Speed
* Resistance
* Attack Speed
* Knockback Resistance
Duration must be short.
Cooldown must be extremely long.
---
### BLOOD MOON
Create a powerful temporary combat state.
Effects:
* Red atmospheric particles
* Damage dealt provides configurable healing
* Enemies receive a configurable debuff
* Special Blood Moon sounds
* Large visual activation effect
---
### DIVINE REBIRTH
The player receives a special survival charge.
If they receive normally lethal damage:
* Prevent the death
* Restore a configurable amount of health
* Trigger a powerful visual effect
* Consume the Divine Rebirth charge
After activation, the ability enters a very long cooldown.
It must not allow repeated death prevention.
---
# 💎 RARITY SYSTEM
Implement:
```text
COMMON
UNCOMMON
RARE
EPIC
LEGENDARY
MYTHIC
DIVINE
```
Each ability should have a rarity value.
Example:
```yaml
abilities:
god_rage:
rarity: MYTHIC
void_step:
rarity: LEGENDARY
apocalypse:
rarity: MYTHIC
divine_rebirth:
rarity: DIVINE
```
---
# 🎨 RARITY COLORS
Use configurable colors:
```yaml
rarity-colors:
COMMON: ""
UNCOMMON: ""
RARE: ""
EPIC: ""
LEGENDARY: ""
MYTHIC: ""
DIVINE: ""
```
The GUI should display the rarity next to every ability.
Example:
```text
⚔ God Rage
✦ MYTHIC
```
---
# 🎲 RARE ABILITY ACQUISITION
Create a configurable system for obtaining rare abilities.
Possible sources:
* Special loot
* Crates
* Boss drops
* Events
* Admin commands
* Custom crafting
* Rare items
* Server events
Administrators should be able to enable/disable each source.
Do not automatically give every player a Mythic or Divine ability.
---
# ⚙️ CONFIGURATION
Every ability must be configurable.
Example:
```yaml
rare-abilities:
god-rage:
enabled: true
rarity: MYTHIC
duration: 8
cooldown: 180
strength: 3
resistance: 2
speed: 2
apocalypse:
enabled: true
rarity: MYTHIC
radius: 8
damage: 8
cooldown: 240
divine-rebirth:
enabled: true
rarity: DIVINE
health-after-rebirth: 6
cooldown: 600
```
---
# 🛡️ COMBAT COMPATIBILITY
The rare abilities must work with the CombatLog system.
Important:
* Abilities may be usable during combat unless configured otherwise.
* No ability may bypass combat restrictions.
* Teleport-based abilities must respect teleport restrictions.
* `/spawn`, `/team home`, `/team warp`, `/home`, `/warp`, `/tpa`, etc. remain blocked during combat.
* Ender pearls remain usable.
* Abilities must not create unintended combat escapes.
---
# 👑 ADMIN COMMANDS
Add:
```text
/class ability
/class ability info
/class ability give
/class ability remove
/class ability cooldown
/class ability reload
```
Permission:
```text
classabilities.admin
```
---
# 🏆 RARE ABILITY ANNOUNCEMENTS
When a player obtains a **MYTHIC** or **DIVINE** ability, optionally announce it server-wide.
Example:
```text
━━━━━━━━━━━━━━━━━━━━━━
✦ DIVINE ABILITY ✦
━━━━━━━━━━━━━━━━━━━━━━
PlayerName has obtained
DIVINE REBIRTH
━━━━━━━━━━━━━━━━━━━━━━
```
Make the announcement configurable.
---
# 📦 FINAL REQUIREMENTS
Target:
```text
Paper 1.21.11
Java 21
```
Plugin:
```text
ClassAbilities
```
Main package:
```text
me.yourname.classabilities
```
Provide a complete compilable plugin project containing:
* All normal classes
* All rare abilities
* Mythic abilities
* Divine abilities
* Trader Black Market
* Rarity system
* Ability cooldown system
* Ability GUI
* Persistent player data
* Configurable effects
* Configurable sounds
* Configurable particles
* Admin commands
* Combat compatibility
* PlaceholderAPI support
* `plugin.yml`
* `config.yml`
The final plugin should feel like a polished **custom-power Minecraft SMP plugin**, where ordinary abilities are accessible but **MYTHIC and DIVINE abilities are genuinely rare and highly valuable**.
Build the Paper 1.21.11/Java 21 project and configuration.
Add rarity, persistent ownership/cooldowns, ability acquisition, and the ability GUI.
Implement combat-safe Mythic/Legendary/Divine effects and the Trader Black Market.
Register commands, listeners, and optional PlaceholderAPI support.
Created the ClassAbilities Paper 1.21.11 / Java 21 project with the requested Mythic, Legendary, and Divine abilities, rarity-colored ability GUI, persisted ownership and cooldowns, admin commands, acquisition scrolls, optional PlaceholderAPI placeholders, and a configurable, limited-stock Black Market.
Void Step respects the plugin’s combat tag and can still be blocked by other plugins’ teleport restrictions. Ability effects avoid block-damaging explosions and permanent fire. Rare abilities are not granted automatically.
Build verification was not run.
replace void step with the direaction you are faced add permanent fire rec effect make Rare abilities are granted automatically.
Change Void Step to travel in the direction the player is facing.
Add a permanent Fire Resistance effect.
Automatically grant rare abilities to players.
Void Step now travels horizontally in the direction the player is facing, even when they look up or down.
Added configurable permanent Fire Resistance, reapplied on join and respawn.
Void Step now travels horizontally in the direction the player faces, regardless of pitch.
Added configurable permanent Fire Resistance, reapplied on join and respawn.
Enabled automatic grants by default: players receive every enabled ability rated RARE or higher on joining. Existing players receive any missing abilities the next time they join. Use
automatic-grants.minimum-rarityto change the threshold.
its done or not
Yes, all three are done: Void Step follows the direction you face, permanent Fire Resistance is applied on join and respawn, and enabled Rare-or-higher abilities are granted automatically when players join.
package me.yourname.classabilities;
import me.yourname.classabilities.ability.AbilityService;
import me.yourname.classabilities.command.ClassCommand;
import me.yourname.classabilities.data.PlayerDataManager;
import me.yourname.classabilities.gui.AbilityGUI;
import me.yourname.classabilities.gui.BlackMarketGUI;
import me.yourname.classabilities.listener.AbilityListener;
import me.yourname.classabilities.placeholder.ClassAbilitiesExpansion;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class ClassAbilitiesPlugin extends JavaPlugin {
private PlayerDataManager playerDataManager;
private AbilityService abilityService;
private AbilityGUI abilityGUI;
private BlackMarketGUI blackMarketGUI;
@Override
public void onEnable() {
saveDefaultConfig();
playerDataManager = new PlayerDataManager(this);
abilityService = new AbilityService(this, playerDataManager);
abilityGUI = new AbilityGUI(this, abilityService);
blackMarketGUI = new BlackMarketGUI(this, abilityService);
Bukkit.getPluginManager().registerEvents(new AbilityListener(this, abilityService), this);
Bukkit.getPluginManager().registerEvents(abilityGUI, this);
Bukkit.getPluginManager().registerEvents(blackMarketGUI, this);
ClassCommand command = new ClassCommand(this, abilityService);
getCommand("class").setExecutor(command);
getCommand("class").setTabCompleter(command);
getCommand("ability").setExecutor(command);
getCommand("ability").setTabCompleter(command);
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
new ClassAbilitiesExpansion(this).register();
}
}
@Override
public void onDisable() {
if (playerDataManager != null) {
playerDataManager.save();
}
}
public PlayerDataManager getPlayerDataManager() {
return playerDataManager;
}
public AbilityService getAbilityService() {
return abilityService;
}
public AbilityGUI getAbilityGUI() {
return abilityGUI;
}
public BlackMarketGUI getBlackMarketGUI() {
return blackMarketGUI;
}
}