# Welcome

The official wiki for Darrionat's Plugins

<img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MM6qdx_-3rVEUQ8XEBA%2F-MM6qy-pLlBNWp5ZOXFI%2FDarrionatPluginsLogo-Square.png?alt=media&amp;token=9e9b7dbc-1b48-4be0-b9af-a650d820c5c1" alt="" width="375">

## About Me

Hi! I'm Darrionat and I am a plugin developer. I started programming in Java at the beginning of 2019. On this wiki, you will find information about my various published plugins. If you cannot find answers to your questions on here, please join my Discord (link below).

{% hint style="warning" %}
This wiki is a work-in-progress, so not everything will be updated completely, and there may be some information missing! If you have any suggestions, let me know!&#x20;
{% endhint %}

## My Plugins

{% content-ref url="/pages/-M6l0TaE3cJb7dCLpqvk" %}
[Bans+](/plugins/bans+)
{% endcontent-ref %}

{% content-ref url="/pages/-M6jvhpqRnhfwdwPIh\_z" %}
[Command Cooldown](/plugins/command-cooldown)
{% endcontent-ref %}

{% content-ref url="/pages/-M6fGDiTdoQ0UkKsk-kQ" %}
[Custom Enchants+](/plugins/custom-enchants+)
{% endcontent-ref %}

{% content-ref url="/pages/-MVclWwCyvkx2Om86fYc" %}
[PrisonPick](/plugins/prisonpick)
{% endcontent-ref %}

## My Platforms

{% content-ref url="/pages/-M6fs6bs7QwtrGbDTGBM" %}
[Broken mention](broken://pages/-M6fs6bs7QwtrGbDTGBM)
{% endcontent-ref %}

{% content-ref url="/pages/-M6fwf6-QM32DZzcbzDQ" %}
[Broken mention](broken://pages/-M6fwf6-QM32DZzcbzDQ)
{% endcontent-ref %}

{% content-ref url="/pages/-M6fvW-TxYcNhbLW9Hk-" %}
[Broken mention](broken://pages/-M6fvW-TxYcNhbLW9Hk-)
{% endcontent-ref %}

## Help contribute to my development!

{% content-ref url="/pages/-M6fuBTUYcLyAIyKctuE" %}
[Broken mention](broken://pages/-M6fuBTUYcLyAIyKctuE)
{% endcontent-ref %}


# Bans+

An advanced banning plugin with a custom GUI, staff channel, and MySQL support

![](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6l0HJACV04XAC8tR_s%2F-M6l0jQpWfUqiX64VYA1%2Fbans%2B.png?alt=media\&token=a57c76a6-8b5b-4e37-a7b8-14ffae148d21)

## Description

Bans+ offers a simplistic way to ban players with a GUI. Bans+ also has MySQL support, so it can be used among multiple servers. Bans+ also has a staff channel that will announce all actions done by staff in. Bans+ aims to make lives easier for a server owner and the staff ordering the ban.

## Plugin Downloads & Changelogs

Spigot MC: [https://www.spigotmc.org/resources/bans.76083/](https://www.spigotmc.org/resources/bans-mysql-support-banning-gui-advanced-system.76083/)

## Features

* Permanent Bans
* Temporary Bans
* Help Messages
* IP Bans
* Mutes
* Warns
* MySQL Support
* Staff Messages
* Configurable GUI
* Configurable messages
* Update checker
* Pre-configured GUI
* bStats
* Player Average CPS Test


# Commands & Permissions


# Configuration Files


# GUIs


# MySQL


# Trivia


# Command Cooldown

The best plugin for adding cooldowns to commands and preventing spam! 1.7-1.21 support!

![](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6fEY18VuCweySnZ3g-%2Fuploads%2F6e50Xr7579diP6SihIaA%2FCommand-Cooldown-Banner1.png?alt=media\&token=8b156b95-2a2a-4b98-a3b5-5395b6539cde)

## Description

Command Cooldown is an administrative plugin for Minecraft servers (support for Bukkit/Spigot and BungeeCord). Administrators can create cooldowns that will make a player wait before they can execute a certain command again. Command Cooldown can be used to help prevent spam as well.

## Plugin Downloads & Changelogs

Spigot MC: [https://www.spigotmc.org/resources/command-cooldown.73696/](https://www.spigotmc.org/resources/command-cooldown-1-7-1-15-support-add-cooldowns-to-commands.73696/)\
DevBukkit: <https://dev.bukkit.org/projects/command-cooldowns>

## Features

* Place a cooldown on **ANY** command!
* Sync cooldowns through BungeeCord with our **MySQL** Support
* Edit command cooldowns in a GUI editor `/cc editor`
* See your current cooldowns `/cc cooldowns`
* See other player's current cooldowns `/cc cooldowns UUID/playerName`
* Bypass cooldowns with a command `/cc bypass`
* Bypass cooldowns with permissions `commandcooldown.bypass.command_here`. Example: `commandcooldown.bypass.warp_shop`
* Remove all current cooldowns `/cc removecooldowns playerName`
* Automatic **time formatting** in plugin messages and the GUI Editor
* Customizable messages in **messages.yml**
* Automatically checks for updates
* Automatically updates config.yml every new update
* Add aliases to commands! Example: `/cc` and `/commandcooldown` are aliases for the same command
* Text prompts to help create Command Cooldowns
* Automatic time formatting `(s=seconds, m=minutes, h=hours, d=day, w=week, y=year)`.
* Change cooldowns via permissions. Example: `commandcooldown.warp_home.30` will set the player's default cooldown for `/warp home` to 30 seconds.

{% content-ref url="/pages/-M6kw8v8SrPacl1\_Wnn7" %}
[Commands & Permissions](/plugins/command-cooldown/commands-and-permissions)
{% endcontent-ref %}

{% content-ref url="/pages/-M6ky1f\_VfL-FfU9Nfs9" %}
[Configuration Files](/plugins/command-cooldown/configuration-files)
{% endcontent-ref %}

{% content-ref url="/pages/eMdag9YMbBh67D7257J9" %}
[MySQL](/plugins/command-cooldown/mysql)
{% endcontent-ref %}

{% content-ref url="/pages/-M6kyOyjF6viq\_nwclKX" %}
[Trivia](/plugins/command-cooldown/trivia)
{% endcontent-ref %}


# Commands & Permissions

List of commands and permissions

### Base Command - /cc

Permission: commandcooldown.use

| **Command**                   | **Description**                                | Permission                          |
| ----------------------------- | ---------------------------------------------- | ----------------------------------- |
| /cc help \[page]              | Shows a help list                              | commandcooldown.help                |
| /cc list                      | Shows a list of all cooldowns                  | commandcooldown.list                |
| /cc bypass                    | Bypasses all cooldowns                         | commandcooldown.bypass              |
| /cc reload                    | Reloads the config.yml                         | commandcooldown.reload              |
| /cc editor                    | Enter the command cooldown GUI editor          | commandcooldown.editor              |
| /cc removecooldowns \[player] | Removes all current cooldowns from a player    | commandcooldowns.removecooldowns    |
| /cc cooldowns                 | Prints out the player's current  cooldows      | commandcooldown.cooldowns (default) |
| /cc cooldowns \[UUID/player]  | Prints the current cooldowns of a given player | commandcooldown.cooldowns.others    |

### Other Permissions

| Permission                               | Description                                                                                                                                          |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| commandcooldown.bypass.command\_here     | Bypass a certain command with permission. Spaces are replaced with underscores                                                                       |
| commandcooldown.**command**.**cooldown** | <p>Example: commandcooldown.home.30</p><p>This would change the cooldown to 30 seconds for a player/group instead of the default for the command</p> |


# Configuration Files

Files of Command Cooldown

### General Configurations&#x20;

{% content-ref url="/pages/-MH2XGPHBYcLms-vgMAt" %}
[cooldowns.yml](/plugins/command-cooldown/configuration-files/cooldowns.yml)
{% endcontent-ref %}

{% content-ref url="/pages/-M6kyE3fBIqdmS9Lletr" %}
[config.yml](/plugins/command-cooldown/configuration-files/config.yml)
{% endcontent-ref %}

{% content-ref url="/pages/-MH2WvYG0n-pI0\_FiTAs" %}
[messages.yml](/plugins/command-cooldown/configuration-files/messages.yml)
{% endcontent-ref %}


# cooldowns.yml

Default for example

```
# The label (base) of the command
tpa:
  # Where the cooldowns are defined
  cooldowns:
    # This * symbol must be here! This is the base cooldown for the entire command.
    # Set this cooldown to 0 if you only want cooldowns on certain arguments
    *: 60
    # These are the arguments
    Notch: 30
    Darrionat: 30
  # Aliases are labels that can also trigger the cooldown. I.g. /factions and /f
  aliases:
    - etpa
    - tpahere
repair:
  cooldowns:
    *: 30
    hand: 20
    abc *: 50
    abc d: 40
  aliases:
    - repairs
```


# config.yml

```
# If enabled, the plugin will check for available updates when enabled
checkUpdates: true
# Informs a player know when they are bypassing a cooldown
sendBypassMessage: true
# Database support
mysql:
  enabled: false
  host: localhost
  port: 3306
  database: name
  username: root
  password: password
```


# messages.yml

```
bypassCooldown: '&eBypassing cooldowns'
noLongerBypassing: '&eNo longer bypassing cooldowns'
onCooldown: '&cYou still have &e%time% &cleft on that command'
reload: "&eReloading all configs"
resetCooldowns: '&aReset %player%s cooldowns'
errors:
  noPermission: '&cYou do not have the permission &e%perm%'
  onlyPlayers: '&cOnly players can use that command!'
  useOnlinePlayerOrUUID: '&cUse a UUID or name of an online player!'
baseMessage:
  - '&a&lCommand Cooldown %version%'
  - '  &7/cc help'
helpHeader: '&a&lHelp Page &f%page%&7/&f%pageAmount%'
activeCooldowns:
  header: '&a%player%s Active Cooldowns:'
  commandWithActiveCooldown: '&e%command%'
  remainingTime: '  &e%time% &aremaining'
  noActiveCooldowns: '&a%player% has no active cooldowns'
commands:
  editor: '&a/cc editor &7- Opens up the cooldown editor'
  bypass: '&a/cc bypass &7 - Bypass all cooldowns'
  cooldowns: '&a/cc cooldowns [player/UUID] - View a players active cooldowns'
  removecooldowns: '&a/cc removecooldowns [player] - Resets a players cooldowns'
  reload: '&a/cc reload &7- Reloads all configs'
```


# MySQL

Command Cooldown stores data locally by default. In particular, all cooldown data of players is stored in the plugin's `playerdata` folder.&#x20;

**What is stored in the database?** Two important things are stored in the database: The command a player has a cooldown for **AND** when that cooldown will end.

**Why is this helpful?** If you, the administrator, want cooldowns to apply across multiple servers linked through BungeeCord, you must use the database connection.&#x20;

Example: Assume Player1 has a cooldown on `/tpa` on Server1 that ends in 30 minutes. By default, if Player1 uses /tpa on Server2, then the player will have no cooldown, **BUT** if the plugin is using the database connection, then the player will not be able to run `/tpa` *only if Server2 also has a cooldown on* `/tpa`*.*&#x20;

The database connection can be enabled in the plugin's `config.yml` file. A full plugin restart is required once enabled.


# Trivia

Fun facts or interesting information

{% hint style="info" %}
Trivia contains more hidden details but that are quite important to the plugin
{% endhint %}

### bStats

Command Cooldown utilizes bStats. This allows the developer to view the current standing of usage for the plugin.


# Custom Enchants+

Custom enchants, scrolls, custom GUI's, and more!

![](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6fHeWM_bOL4fpZSD7e%2F-M6fHf8X5TzsE528_2N_%2FCustomEnchantsPlusNew.png?alt=media\&token=e279106f-b2a9-4d2e-bfb4-cf19e3d72ff8)

## Description

Custom Enchants+ is a custom enchantment plugin that offers many unique, never-seen-before enchantments. Some enchantments have been created by suggestions, creativity, and inspiration from other enchantments. This plugin allows **customization** for all enchantments.<br>

## Plugin Downloads & Changelogs

Spigot MC: <https://www.spigotmc.org/resources/custom-enchants-plus.72678/>

## Features

* 40+ [Custom Enchants](/plugins/custom-enchants+/enchants)
* 5 [Scrolls](/plugins/custom-enchants+/scrolls)
* [Wands](/plugins/custom-enchants+/wands)
* 3 [Animated Custom Gui's](/plugins/custom-enchants+/guis)
  * [Enchanter ](/plugins/custom-enchants+/guis#the-enchanter)- Obtain Custom Enchantments
  * [Tinkerer ](/plugins/custom-enchants+/guis#the-tinkerer)- Exchange Enchants for EXP
  * [Anvil ](/plugins/custom-enchants+/guis#the-anvil)- Forge Items Together
* [Highly Configurable](/plugins/custom-enchants+/configuration-files)
* 1.8.8-1.16.x Support
* [Advanced Commands](/plugins/custom-enchants+/commands-and-permissions)
* No Hard Dependencies
* [ActionBar Integration](/plugins/custom-enchants+/trivia#actionbar)
* [Custom Sounds](/plugins/custom-enchants+/trivia#sounds-and-particles)
* [Custom Particles](/plugins/custom-enchants+/trivia#sounds-and-particles)
* [Custom Blocks](/plugins/custom-enchants+/custom-blocks)
* [bStats Integration](/plugins/custom-enchants+/trivia#bstats)
* [Built-In API](/plugins/custom-enchants+/api)
* [HolographicDisplays Integration](/plugins/custom-enchants+/dependencies#holographicdisplays)

{% content-ref url="/pages/-M6fGYdDT3XS9\_IRSPWV" %}
[API](/plugins/custom-enchants+/api)
{% endcontent-ref %}

{% content-ref url="/pages/-M6fMMYpJhCqFBxf1-In" %}
[Commands & Permissions](/plugins/custom-enchants+/commands-and-permissions)
{% endcontent-ref %}

{% content-ref url="/pages/-M6fJAzMI7qduB5WfqS5" %}
[Configuration Files](/plugins/custom-enchants+/configuration-files)
{% endcontent-ref %}

{% content-ref url="/pages/-M6j2bVrUtEm03p0PDQz" %}
[Custom Blocks](/plugins/custom-enchants+/custom-blocks)
{% endcontent-ref %}

{% content-ref url="/pages/-MGtin6F8bygPzx0JZLQ" %}
[Dependencies](/plugins/custom-enchants+/dependencies)
{% endcontent-ref %}

{% content-ref url="/pages/-M6f\_Hp65VYMpvjxc-MB" %}
[Enchantments](/plugins/custom-enchants+/enchants)
{% endcontent-ref %}

{% content-ref url="/pages/-M6j238sAJceo-1d9\_Pu" %}
[GUIs](/plugins/custom-enchants+/guis)
{% endcontent-ref %}

{% content-ref url="/pages/-M6f\_MZ95AEqT5FjhC2E" %}
[Scrolls](/plugins/custom-enchants+/scrolls)
{% endcontent-ref %}

{% content-ref url="/pages/-M6j0yW1K1WF4Zq3vKVA" %}
[Trivia](/plugins/custom-enchants+/trivia)
{% endcontent-ref %}


# API

Information about the API for Custom Enchants+

## How to utilize CustomEnchants+'s API

{% hint style="info" %}
All API methods can be found [HERE](https://github.com/Darrionat/CustomEnchantsAPI/blob/master/CustomEnchantsAPI.java)
{% endhint %}

Within your plugin.yml add

```
softdepend: [CustomEnchantsPlus]
```

If you want CustomEnchants+ to be absolutely necessary to your plugin do this instead

```
depend: [CustomEnchantsPlus]
```

#### Add CustomEnchants+ to your Java Project as an external library

#### Utilize the API by using the static methods within CustomEnchantsAPI

Example:

```
CustomEnchantsAPI.openGui(player, CustomEnchantGui.ENCHANTER);
```

#### Obtaining a specific custom enchantment

Example:

```
Enchantment enchant = CustomEnchantment.EXPLOSIVE_ARROW;
```

#### Obtaining a scroll

Example:

```
Scroll scroll = Scrolls.ENCHANTMENT_REMOVAL;
```


# Commands & Permissions

List of commands and permissions

### Base Command

Permission: customenchants.admin\
Players with this permission will be able to use all commands listed below\
The console will only be able to use  the commands that are marked **true** 'Console Can Use' column

| **Command**                                                 | **Description**                                                                                                                                         | Console Can Use |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| /ce                                                         | Displays the current version                                                                                                                            | **true**        |
| /ce help \[page]                                            | Returns a page of help messages                                                                                                                         | true            |
| /ce placetable                                              | Places a custom enchantment table - Opens GUI                                                                                                           |                 |
| /ce removetable                                             | Removes a custom enchantment table                                                                                                                      |                 |
| /ce placeanvil                                              | Places a custom enchantment table - Opens GUI                                                                                                           |                 |
| /ce removeanvil                                             | Removes a custom enchantment anvil                                                                                                                      |                 |
| /ce placetinkerer                                           | Places a custom enchantment tinkerer - Opens GUI                                                                                                        |                 |
| /ce removetinkerer                                          | Removes custom tinkerer                                                                                                                                 |                 |
| /ce reload                                                  | Reloads the config.yml and holograms (if enabled)                                                                                                       | **true**        |
| /ce \[enchant] \[level]                                     | Adds a custom enchantment to an item                                                                                                                    |                 |
| /ce list                                                    | Displays a list of available enchantments, along with hover text                                                                                        |                 |
| /ce enablegui \[gui]                                        | Enable a particular gui                                                                                                                                 | **true**        |
| /ce disablegui \[gui]                                       | Disable a particular gui                                                                                                                                | **true**        |
| /ce enableworld \[world]                                    | Enables the world the player is currently in. \[world] is optional for players, but required for the console.                                           | **true**        |
| /ce disableworld                                            | Disables the world the player is currently in. \[world] is optional for players, but required for the console.                                          | **true**        |
| /ce worldlist                                               | Sends a message for all enabled worlds                                                                                                                  | **true**        |
| /ce updateitems \[player]                                   | Runs the automatic lore updater through a player's inventory and enderchest. To affect all players, use the "**\***" argument instead of a player name. | **true**        |
| /ce givescroll \[player] \[scroll]                          | Gives a certain scroll to a player                                                                                                                      | **true**        |
| /ce giveToken \[enchantment] \[enchantment Level] \[player] | Gives an enchantment token to a player. To affect all players, use the "**\***" argument instead of a player name.                                      | **true**        |

### Other Commands

| Command   | Description                | Permission             | Aliases                                 |
| --------- | -------------------------- | ---------------------- | --------------------------------------- |
| /enchants | Opens up the Enchanter gui | customenchants.enchant | enchantingtable, ench, enchs, enchtable |
| /tinker   | Opens up the Tinkerer gui  | customenchants.tinker  | tink, tinkerer                          |
| /anvil    | Opens up the Anvil gui     | customenchants.anvil   | anv                                     |

### Other Permissions

| Permission                  | Description                                                                      |
| --------------------------- | -------------------------------------------------------------------------------- |
| customenchants.\*           | Gives all permissions                                                            |
| customenchants.ignoreworlds | Allows a player to ignore disabled worlds                                        |
| customenchants.towny.bypass | Allows a player to bypass CustomEnchants+ Towny protection, if Towny is enabled. |


# Configuration Files

Files of Custom Enchants+

### General Configurations&#x20;

{% content-ref url="/pages/-M6fJFESmDcJR9joPC2S" %}
[config.yml](/plugins/custom-enchants+/configuration-files/config.yml)
{% endcontent-ref %}

### Configurations for specific enchantment qualities

{% content-ref url="/pages/-M6fJHKn4yN5Aqe\_000W" %}
[enchants.yml](/plugins/custom-enchants+/configuration-files/enchants.yml)
{% endcontent-ref %}

### Configuration for all enchantment lores

{% content-ref url="/pages/-M6fJOJfZbZYzVKIycXu" %}
[lores.yml](/plugins/custom-enchants+/configuration-files/untitled)
{% endcontent-ref %}

### Messages sent to players

{% content-ref url="/pages/-M6fT-GKW6T6Y-aTamUs" %}
[messages.yml](/plugins/custom-enchants+/configuration-files/messages.yml)
{% endcontent-ref %}


# config.yml

```
checkUpdates: true
checkLoreUpdates: true
EnchantGUI Name: Enchanter
TinkerGUI Name: Tinker
AnvilGUI Name: Anvil
selectEnchantGuiName: 'Select an enchantment'
EnchanterEnabled: true
TinkererEnabled: true
AnvilEnabled: true
OnlyCustomAnvil: false
OnlyCustomEnchantmentTable: false
OnlyCustomCauldron: false

defaultMaxSlots: 3
enchantExpCost: 40
forgeExpPerEnchantment: 15
enabledWorlds:
- world
- world_nether
- world_the_end
upgradeExistingEnchantsOnEnchant:
  enabled: true
  percent: 50
rarity:
  normalPercentage: 95
  rarePercentage: 4
  legendaryPercentage: 1
vanillaEnchantmentTable:
  buttonPercentagesForCustomEnchant:
    1: 25
    2: 50
    3: 75
holograms:
  enabled: false
  addItemLine: true
  anvil:
    - '&cForge &7your &dCustom Enchants'
    - '&7together within &cThe Anvil'
  enchanter:
    - '&dEnchant &7your weapons, armor'
    - '&7and tools with &dcustom enchantments'
    - '&7in &dThe Enchanter'
  tinker:
    - '&eSacrafice &7your enchantments for'
    - '&eexperience &7in &eThe Tinkerer'
scrolls:
  enchantmentRemovalScroll:
    percentage: 5
    material: REDSTONE
    name: '&cEnchantment Removal Scroll'
    lore:
      - '&7Drag and drop this on to a custom &denchanted &7item to'
      - '&7choose an &dEnchantment &7to &cremove permanently.'
  enchantmentUpgradeScroll:
    material: EMERALD
    percentage: 5
    name: '&aEnchantment Upgrade Scroll'
    lore:
      - '&7Drag and drop this on to a custom &denchanted &7item to'
      - '&7choose an enchantment &aupgrade.'
  slotUpgradeScroll:
    material: PAPER
    percentage: 5
    name: '&aSlot Upgrade Scroll'
    lore:
      - '&7Drag and drop this on to a custom &denchanted'
      - '&7item to get &a+1 Slot&7.'
  itemRepairScroll:
    material: ANVIL
    percentage: 5
    name: '&cItem Repair Scroll'
    lore:
      - '&7Drag and drop this on to a custom &denchanted &7item'
      - '&7to &creapir &7all durability'
  renamingScroll:
    material: NAME_TAG
    percentage: 5
    name: '&eRenaming Scroll'
    lore:
      - '&7Drag and drop this on to a custom &denchanted'
      - '&7item to &erename &7it.'
enchantmentToken:
  material: SUNFLOWER
  name: '&dEnchantment Token &7- %enchantment%'
  lore:
    - '&7Drag and drop this on to any item you want to apply'
    - '&7the &denchantment &7on to. Only works with compatible'
    - '&eitems &7and &denchantments&7.'
wand:
  crafting:
    enabled: true
  material: BLAZE_ROD
  name: '&dMystical Wand'
```


# enchants.yml

```
Autosmelt:
  enabled: true
  name: '&9Autosmelt'
  rarity: NORMAL
ComboStun:
  enabled: true
  name: '&9Combo: Stun'
  rarity: NORMAL
  Title:
    Enabled: true
    Message: '&cSTUNNED'
  ActionBar:
    Enabled: true
    Message: '&cUnstunned In: %time% seconds'
DeepSeaDiver:
  enabled: true
  name: '&9Deep Sea Diver'
  rarity: NORMAL
DoubleJump:
  enabled: true
  name: '&9Double-Jump'
  rarity: RARE
ElectrostaticArrow:
  enabled: true
  name: '&9Electrostatic Arrow'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cElectrostatic Arrow: %time%s remaining'
EternalLight:
  enabled: true
  name: '&9Eternal Light'
  rarity: NORMAL
ExplodingHit:
  enabled: true
  name: '&9Exploding Hit'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cExploding Hit: %time%s remaining'
Explosive:
  enabled: true
  name: '&9Explosive'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cExplosive: %time%s remaining'
Featherweight:
  enabled: true
  name: '&9Featherweight'
  rarity: NORMAL
FightOrFlight:
  enabled: true
  name: '&9Fight-Or-Flight'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cFight-Or-Flight: %time%s remaining'
FlamingAura:
  enabled: true
  name: '&9Flaming Aura'
  rarity: NORMAL
Foraging:
  enabled: true
  name: '&9Foraging'
  rarity: NORMAL
  timePerLevel: 1
FreezingCore:
  enabled: true
  name: '&9Freezing Core'
  rarity: NORMAL
GreenThumb:
  enabled: true
  name: '&9Green Thumb'
  rarity: NORMAL
GodofThunder:
  enabled: true
  name: '&9God of Thunder'
  rarity: NORMAL
HardHeaded:
  enabled: true
  name: '&9Hard Headed'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cHard Headed: Arrow Deflected'
HealingTouch:
  enabled: true
  name: '&9Healing Touch'
  rarity: NORMAL
Homing:
  enabled: true
  name: '&9Homing'
  rarity: LEGENDARY
HotFeet:
  enabled: true
  name: '&9Hot Feet'
  rarity: NORMAL
Knowledge:
  enabled: true
  name: '&9Knowledge'
  rarity: NORMAL
LuckyStrike:
  enabled: true
  name: '&9Lucky Strike'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cLucky Strike: 3x Damage Inflicted'
Mage:
  enabled: true
  name: '&9Mage'
  rarity: RARE
  radius: 3
  damage: 6
  cooldown: 5
  actionBar:
    enabled: true
    message: '&dMage: %time%s remaining'
Magnet:
  enabled: true
  name: '&9Magnet'
  rarity: NORMAL
MegaLongBow:
  enabled: true
  name: '&9Mega-Long Bow'
  rarity: NORMAL
NaturalHealing:
  enabled: true
  name: '&9Natural Healing'
  rarity: RARE
ObsidianLaced:
  enabled: true
  name: '&9Obsidian Laced'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cObsidian Laced: %time%s remaining'
OreRadar:
  enabled: true
  name: '&9Ore Radar'
  rarity: RARE
  ActionBar:
    Enabled: true
    disableMessage: '&cOre Radar: Disabled'
    enableMessage: '&cOre Radar: &aEnabled'
Overlord:
  enabled: true
  name: '&9Overlord'
  rarity: NORMAL
Pullbow:
  enabled: true
  name: '&9Pullbow'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cPullbow: %time%s remaining'
ScatterShot:
  enabled: true
  name: '&9Scatter Shot'
  rarity: RARE
SharpenedBlade:
  enabled: true
  name: '&9Sharpened Blade'
  rarity: NORMAL
SneakAttack:
  enabled: true
  name: '&9Sneak Attack'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cSneak Attack: %time%s remaining'
SprintDrain:
  enabled: true
  name: '&9Sprint Drain'
  rarity: NORMAL
SugarRush:
  enabled: true
  name: '&9Sugar Rush'
  rarity: NORMAL
Summoner:
  enabled: true
  name: '&9Summoner'
  rarity: NORMAL
Swagger:
  enabled: true
  name: '&9Swagger'
  rarity: NORMAL
Tank:
  enabled: true
  name: '&9Tank'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cTank: Resistance Activated'
Telebow:
  enabled: true
  name: '&9Telebow'
  rarity: NORMAL
  ActionBar:
    Enabled: true
    Message: '&cTelebow: %time%s remaining'
Telekinesis:
  enabled: true
  name: '&9Telekinesis'
  rarity: RARE
Thrust:
  enabled: true
  name: '&9Thrust'
  rarity: NORMAL
```


# lores.yml

```
DoubleJump:
- '&7Have the ability to'
- '&bdouble-jump &7(%cooldownTime%s cooldown)'
- '&7and take no fall damage'
Tank:
- '&7If below &c4 hearts&7, gain'
- '&eResistance %level% &7for 4s'
NaturalHealing:
- '&7Gain &cRegeneration %level%'
- '&7for 5s when hit'
ObsidianLaced:
- '&7Ignore &cexplosion &7damage'
- '&7on hit (%cooldownTime%s cooldown)'
ExplodingHit:
- '&7Hitting an enemy will'
- '&7create a &c%level% explosion'
- '&7(5s cooldown)'
GodOfThunder:
- '&7Every &efourth &7hit will'
- '&7strike your opponent with'
- '&elightning &7to take away'
- '&a%dmgPercent%% &7of their health'
Telebow:
- '&7Sneak and shoot to'
- '&dteleport &7to your arrow'
- '&7(%cooldownTime%s cooldown) Reduce'
- '&7your cooldown by 3s every shot'
Explosive:
- '&7Arrows create a &c%level%'
- '&cexplosion &7on impact'
- '&7(5s cooldown)'
MegaLongBow:
- '&7Instantly shoot an arrow'
- '&7every second and gain'
- '&aJump Boost %jumpBoostLevel% (%jumpBoostLevel%s)'
ComboStun:
- '&7Every &efifth &7hit will'
- '&estun &7your opponent for %time%s'
Pullbow:
- '&7Pull %target%'
- '&7when shot (7s cooldown)'
SugarRush:
- '&7Gain speed while'
- '&7wearing these pants.'
- '&a%percent%% &7faster'
EternalLight:
- '&7Permanent &aNight-Vision'
DeepSeaDiver:
- '&7Permanent &bWater-Breathing'
Swagger:
- '&7Gain &cStrength %level% &7but'
- '&7suffer &2Nausea %level%'
FightOrFlight:
- '&7Gain &eSpeed 3 &7(%time%s)'
- '&7when reaching &c%heartAmt% hearts'
- '&7(10s cooldown)'
SneakAttack:
- '&cTeleport &7behind your enemy'
- '&7by sneaking when &cattacked'
- '&7(%cooldownTime%s cooldown)'
FreezingCore:
- '&7Have a %percent%% chance'
- '&7to add &bSlowness %slownessLevel% &7(%time%s)'
- '&7to your opponent when hit'
HotFeet:
- '&7Permanent &cFire-Resistance'
Overlord:
- '&7Increase your &chealth'
- '&7by &c%health% hearts &7while wearing'
Featherweight:
- '&7Permanent &eHaste %level%'
LuckyStrike:
- '&7Have a &a%percent%% &7chance'
- '&7to do &c3x damage &7to'
- '&7your opponent.'
ElectroStaticArrow:
- '&7Shoot an arrow that will'
- '&7strike opponents in a &a3 &7block'
- '&7radius with &elightning &7for'
- '&c%hearts% hearts &7(30s cooldown)'
Magnet:
- '&7Items within a &a%level% block'
- '&7radius will gravitate towards you'
SprintDrain:
- '&7Give &bSlowness 1 &7(%slowTime%s) to'
- '&7your enemy and gain &eSpeed 1 &7(%speedTime%s)'
FlamingAura:
- '&7Have a &a%percent%% &7chance'
- '&7to set your enemy on &cfire'
SharpenedBlade:
- '&7Do &a%percent%% &7more'
- '&7damage to your enemy'
HardHeaded:
- '&7Have a &a%percent%% &7chance'
- '&7to deflect an arrow for no damage'
ScatterShot:
- '&7Shoot &a%amount% &7arrows with'
- '&7every shot'
Thrust:
- '&7Every &efour &7shots, hit your'
- '&7enemy with &bPunch %punch%'
HealingTouch:
- '&aHeal &7both you and who you'
- '&7strike by &c%hearts% hearts'
Homing:
- '&7Arrows will &chome &7to targets'
- '&7within a &a%radius% block &7radius'
Knowledge:
- '&7Have a &a%percent%% &7chance to'
- '&7get &a2x EXP &7while mining'
Autosmelt:
- '&a%percent%% &7of blocks will be'
- '&7automatically &csmelted'
OreRadar:
- '&7Detect nearby &bores &7in a &a%radius% block'
- '&7radius. (&eRight-Click&7) item to toggle'
GreenThumb:
- '&7Affect dirt and grass in'
- '&7a &a%radius% &7block radius'
Summoner:
- '&dSummon &cWither Skulls &7when hitting'
- '&7an opponent'
Foraging:
- '&7Let your axe take control'
- '&7and take down trees easily for &a%time%s'
Telekinesis:
- '&7All drops will be automatically'
- '&aadded &7to your inventory'
Mage:
- '&7Shoot rays of &dmagic &7towards'
- '&7your target (%cooldown%s cooldown)'
```


# messages.yml

### English

```
prefixEnabled: true
prefix: '&7[&6CustomEnchants+&7]&f'
noPermission: '&cYou do not have the permission ''%perm%'''
onlyPlayersOpenGui: '&cOnly players may open a GUI!'
onlyPlayersCommand: '&cOnly players may run that command!'
guiDisabled: '&cThat Gui is disabled!'
reload: '&aReloaded config.yml'
enchantsDisabled: '&cAll enchants are disabled in this world! Enable them with &a/ce enableworld'
worldNameRequired: '&cA world name is required! &6/ce [enableWorld/disableWorld] [worldName]'
worldDNE: '&cThat world does not exist!'
worldAlreadyEnabled: '&cThis world is already enabled!'
worldAlreadyDisabled: '&cThis world is already disabled!'
worldToggle: '&7Successfully toggled world to %state%'
worldList: '&6World List: &7%worldList%'
noEnabledWorlds: '&cThere are no enabled worlds!'
useNumberForTier: '&cYou must use a number for the tier!'
invalidEnchant: '&cInvalid enchantment!'
levelOutOfBounds: '&cUse levels %startLevel%-%maxLevel%'
enchantAir: '&cYou cannot enchant air!'
wrongTarget: '&cYou must be holding a %enchantTarget% for this enchantment!'
alreadyHasEnchant: '&cThis item already has that enchantment!'
noSlots: '&7This item has no slots remaining!'
cantBreakAnvil: '&cYou can''t break a custom enchant anvil!'
airBlockAtAnvil: '&cThat block is air! Please look at a block to place the anvil at.'
removeAirAtAnvil: '&cThat block is air! Please create an anvil first.'
errorAnvil: '&cThere was an error! The anvilData.yml file does not exist.'
notCustomAnvil: '&cThis block is not a custom enchantment anvil!'
cantBreakTinkerer: '&cYou can''t break a custom enchantment tinkerer!'
airBlockAtTinkerer: '&cThat block is air! Please look at a block to place the tinkerer at.'
removeAirAtTinkerer: '&cThat block is air! Please create a tinkerer first.'
errorTinkerer: '&cThere was an error! The tinkerData.yml file does not exist.'
notCustomTinkerer: '&cThis block is not a custom enchantment tinkerer!'
cantBreakEnchantTable: '&cYou can''t break a custom enchant table!'
airBlockAtEnchantTable: '&cThat block is air! Please look at a block to place the
  enchanting table at.'
removeAirAtEnchantTable: '&cThat block is air! Please create a table first.'
errorEnchantTable: '&cThere was an error! The enchantData.yml file does not exist.'
notCustomEnchantTable: '&cThis block is not a custom enchantment table!'
expNeeded: '&cYou need &e%expNeeded% more levels &cbefore you can enchant'
contactTheDev: '&4Something went wrong. &cContact the Developer of the plugin (Darrionat)'
insertedCustomEnchantedItems: '&eInsert Custom Enchanted Items'
exitTable: '&eExit Table'
insertItemToEnchant: '&dInsert Item to Enchant'
noSlotsRemaining: '&cNo Enchantment Slots'
enchantItem: '&DEnchant Item &7- &e%expCost% Levels'
exitTinkerer: '&eExit Tinkerer'
tinkerDesc: '&7Tinkering removes enchants for EXP'
# getExpDesc: ''
tinkerItemLore:
  - '&7Receive &e0&7-&e%expCost% EXP &7Levels'
  - '&7Potentially receive an &fEnchantment Scroll'
tinkerSuccessful: '&7You removed your enchants for &e%exp% EXP Levels'
tinkerItem: '&eExchange Enchantments for EXP'
combineItemsLore: '&7Combine two items together'
cost: '&e%cost% Levels'
forgeTogether: '&cForge Items Together'
enableGui: '&6/ce enable [gui] &7- Enable a Gui'
disableGui: '&6/ce disable [gui] &7- Disable a Gui'
guiList: '&6Gui List: &7Anvil, Enchanter, Tinkerer'
toggledGui: '&6The Gui &e%guiName% &6was set to &e%state%'
availableEnchants: '&6Available Enchants &7(%enchantCount%)'
helpTopMessage: '&6&l%pluginName% v%version% Commands'
helpPages: '&6Page %page%/%pageAmt%'
noAvailableEnchantments: '&cThere are no available enchantments for that item!'
updatedItemInInventory: '&7Your &c%type% &7in your &eInventory &7has been updated'
updatedItemInEnderChest: '&7Your &c%type% &7in your &dEnderChest &7has been updated'
updateItems: '&6/ce updateitems [player] &7- Updates lores to match lores.yml'
updatedItemSuccessfully: '&7Checked the lores of custom items in inventories of &e%player% &asuccessfully'
playerNotOnline: '&cThat player is not online!'
giveScroll: '&6/ce givescroll [player] [scroll] &7- Gives a scroll to a player'
canOnlyUseOneScroll: '&cYou can only use one scroll at a time!'
noScrollsInCreative: '&cYou cannot use scrolls while in creative!'
scrollRename: '&7Say what you would like to &erename &7your item to!'
scrollRenameActive: '&cYou need to finish renaming your current item first!'
scrollRenameSuccessful: '&7Your item has been renamed to &f%name%'
giveToken: '&6/ce giveToken [enchant] [level] [player] &7- Gives an enchantment token'
slots: '&cSlots &7%usedSlots%/%maxSlots%'
rarityPrefixes:
  normal: ''
  rare: '&dRARE '
  legendary: '&6LEGENDARY '
baseMessages:
- '&6&l%pluginName% v%version% By: Darrionat'
- '  &6Type ''/ce help'' for commands'
helpMessages:
- '&6/ce help [page] &7- Shows help messages'
- '&6/ce placetable &7- Places custom table'
- '&6/ce removetable &7- Removes custom table'
- '&6/ce placeanvil &7- Places custom anvil'
- '&6/ce removeanvil &7- Removes custom anvil'
- '&6/ce placetinkerer &7- Places custom tinkerer'
- '&6/ce removetinkerer &7- Removes custom tinkerer'
- '&6/ce reload &7- Reloads the config.yml'
- '&6/ce [enchant] [level] &7- Enchant an item'
- '&6/ce list &7- Shows available enchants'
- '&6/enchants &7- Opens up the enchanter GUI'
- '&6/tinker &7- Opens up the tinker GUI'
- '&6/anvil &7- Open up the anvil GUI'
- '&6/ce enablegui [gui] &7- Enable a Gui'
- '&6/ce disablegui [gui] &7- Disable a Gui'
- '&6/ce enableworld [worldName] &7- Enable enchants in this world'
- '&6/ce disableworld [worldName] &7- Disable enchants in this world'
- '&6/ce worldlist &7- See enabled worlds'
- '&6/ce updateitems [player] &7- Updates lores to match lores.yml'
- '&6/ce givescroll [player] [scroll] &7- Gives a scroll to a player'
- '&6/ce giveToken [enchant] [level] [player] &7- Gives an enchantment token'
```


# Custom Blocks

Information about custom blocks

## Custom Blocks

Custom blocks are a feature within Custom Enchants+ that allows users to open up a [GUI](/plugins/custom-enchants+/guis) by right-clicking the block. Each custom block has its own material already assigned to it. Custom blocks can be placed down or removed within [commands](/plugins/custom-enchants+/commands-and-permissions). Each custom block is directly correlated to a GUI. A custom block will not work if the world they are in is disabled.

![](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6j9i7wthQfB-RFyrCm%2F-M6j9nZg0pyu61B9E-ay%2Fimage.png?alt=media\&token=dd267fbe-23ed-4f3c-b94e-1d851a226f5c)

### Types

| Custom Block                                              | Material          |
| --------------------------------------------------------- | ----------------- |
| [Anvil](/plugins/custom-enchants+/guis#the-anvil)         | ANVIL             |
| [Enchanter](/plugins/custom-enchants+/guis#the-enchanter) | ENCHANTING\_TABLE |
| [Tinkerer](/plugins/custom-enchants+/guis#the-tinkerer)   | CAULDRON          |

### Placing & Removing

Each custom block has its own placement [command ](/plugins/custom-enchants+/commands-and-permissions)and removal command. Custom blocks can not be removed by breaking them.

###

### Data Files

Each custom blocks has its own .yml file to be saved to.

| Custom Block | File Name      |
| ------------ | -------------- |
| Anvil        | anvilData.yml  |
| Enchanter    | tableData.yml  |
| Tinkerer     | tinkerData.yml |


# Dependencies

Integration with other plugins

#### Enabling **a Dependency**

1. Add the plugin to the server
2. Go into Custom Enchant's+ config.yml
3. Go to the configuration section `holograms` and then set 'enabled' to true.
4. Save the config.yml
5. Restart your server

{% hint style="warning" %}
Note: A dependency will not integrate properly if you do not enable it within the config.yml of Custom Enchants+
{% endhint %}

### HolographicDisplays

Custom Enchants+ has a soft dependency on Holographic Displays. This allows for holograms to be enabled or disabled. These holograms can be configured to an admin's liking within the [config.yml](/plugins/custom-enchants+/configuration-files/config.yml). Holograms are reloaded with the command `/ce reload` These holograms can be seen with [Custom Blocks](/plugins/custom-enchants+/custom-blocks)

### Event Compatability

All [enchantments ](/plugins/custom-enchants+/enchants)function on certain events. However, CustomEnchants+ forces Bukkit to run the events within CustomEnchants+ later than other plugins, so CustomEnchants+ will not fire enchantment events if another plugin cancels them first. This is good for allowing plugins that have protected regions such as WorldGuard or a Skyblock plugin to prevent a player from using enchantments within that area.


# Enchantments

Information about enchantments

## Enchanting

A player can access the [enchanter ](/plugins/custom-enchants+/guis#the-enchanter)[GUI ](/plugins/custom-enchants+/guis)by using /enchantingtable (/ench), by clicking on a [custom block](/plugins/custom-enchants+/custom-blocks), or by using an [Enchantment Token](/plugins/custom-enchants+/enchants#enchantment-tokens). Within the enchanter GUI, a player is able to add custom enchantments. An admin is also able to add custom enchantments with [commands](/plugins/custom-enchants+/commands-and-permissions). All enchantments also hold a configurable [rarity ](/plugins/custom-enchants+/enchants#rarities)and [lore](/plugins/custom-enchants+/enchants#lores). Custom enchantments can also be acquired through the vanilla enchantment table, this can be customized in the [config.yml](/plugins/command-cooldown/configuration-files/config.yml).&#x20;

### Rarities

Every enchantment contains a rarity, defined in the [enchants.yml](/plugins/custom-enchants+/configuration-files/enchants.yml). These rarities are harder to obtain, in ascending order: NORMAL, RARE, AND LEGENDARY. The percentage for each type of rarity is defined within the [config.yml](/plugins/custom-enchants+/configuration-files/config.yml).

### Slots

Each enchantment uses a slot on the current item. The default max slots is defined within the config.yml. Max slots can be upgraded with the [Slot Upgrade Scroll](/plugins/custom-enchants+/scrolls#slot-upgrade). Slots replaced the previous system of tiers.

### Lores

Each enchantment has a lore. Lores can be configured within the [lores.yml](/plugins/custom-enchants+/configuration-files/untitled) config. Lores are displayed in this format...

```
[Enchantment Name] [Level]
[Lore, Line 1]
[Lore, Line 2]
...
```

Enchantment levels are displayed in roman numerals.

#### Lore Updater

When the lores.yml file is changed, all custom enchanted items will be updated to the same format. The updater runs when a player joins, a player opens an inventory, and when the `/ce updateitems [player]` command is ran. The lore updater will run through the inventories of chests when opened. The lore updater was implemented in update [v3.0 BETA](https://www.spigotmc.org/resources/%E2%9C%A8custom-enchants-plus-35-enchants-scrolls-actionbar-1-12-1-15%E2%9C%A8.72678/update?update=333093). It was proven useful because v3.0 introduced [slots](/plugins/custom-enchants+/enchants#slots), so there were no major bugs within the lore. The lore updater also works on [Scrolls](/plugins/custom-enchants+/scrolls). The lore updater does not affect any part of the lore that is not part of Custom Enchants+

### Enchantment Tokens

Enchantment tokens are simple items that can be acquired through the command`/ce giveToken [enchantment] [level] [player]`. Enchantment tokens may be applied to any items that are compatible with them. The enchantments follow the same rules for compatibility; however, enchantments that already exist on the item **can be upgraded** by adding an enchantment token with a **higher level** of the enchantment.&#x20;

![](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MSeRgvx8LbHugInGQb-%2F-MSeSeO00c1vt4lezHq8%2Fjavaw_SN8hcIj3iR.png?alt=media\&token=0811eec3-2e7d-494e-84ed-fd829f91a260)

### Bows

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6izfEWHuebHqKA3g26%2F-M6j-Jvo46itlj7lsZSR%2Fimage.png?alt=media&amp;token=06a6227b-98f3-434e-a2e5-d1a0302de9cb" alt=""></div>

| Enchantment         | Description                                                  | Max Level | Default Rarity |
| ------------------- | ------------------------------------------------------------ | --------- | -------------- |
| Explosive           | Shoot exploding arrows                                       | 3         | NORMAL         |
| Telebow             | Sneak and shoot to teleport to where the arrow lands         | 3         | NORMAL         |
| Mega-Long Bow       | Instantly shoot an arrow every second and gain Jump Boost    | 3         | NORMAL         |
| Pullbow             | Pull your target towards you                                 | 2         | NORMAL         |
| Electrostatic Arrow | Strike the hit target with lightning and deal true damage    | 5         | NORMAL         |
| Sprint Drain        | Give your target slowness 1 and gain speed 1                 | 3         | NORMAL         |
| Scattershot         | Shoot multiple arrows every shot                             | 3         | RARE           |
| Thrust              | Every four hits, hit your opponent with Punch                | 4         | NORMAL         |
| Homing              | Arrows home towards the nearest target within a given radius | 3         | LEGENDARY      |

### Swords

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6izfEWHuebHqKA3g26%2F-M6j-nMOT8fhajF2SYDn%2Fimage.png?alt=media&amp;token=049e85ed-2fe9-4953-ac29-6ceeeaf0aade" alt=""></div>

| Enchantment     | Description                                                                                     | Max Level | Default Rarity |
| --------------- | ----------------------------------------------------------------------------------------------- | --------- | -------------- |
| Exploding Hit   | Creates an explosion on hit                                                                     | 3         | NORMAL         |
| God of Thunder  | Every four hits, strike your opponent with lightning and take away a percentage of their health | 4         | NORMAL         |
| Combo: Stun     | Every five hits, stun your target in place                                                      | 3         | NORMAL         |
| Lucky Strike    | On hit, have a percentage to do 3x damage                                                       | 3         | NORMAL         |
| Sharpened Blade | Do x% more damage                                                                               | 3         | NORMAL         |
| Healing Touch   | Heal you and your target when hitting them                                                      | 4         | NORMAL         |

### Helmets

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6izfEWHuebHqKA3g26%2F-M6j-zau-88swuRPLb_5%2Fimage.png?alt=media&amp;token=5d26f677-1bdc-4a7b-8cde-e80394ef9c77" alt=""></div>

| Enchantment    | Description                                       | Max Level | Default Rarity |
| -------------- | ------------------------------------------------- | --------- | -------------- |
| Eternal Light  | Permanent Night Vision                            | 1         | NORMAL         |
| Deep Sea Diver | Permanent Water Breathing                         | 1         | NORMAL         |
| Swagger        | Gain strength but also become dizzy               | 2         | NORMAL         |
| Magnet         | Attract items within a certain radius towards you | 5         | NORMAL         |
| Hard Headed    | Have a percentage to deflect an arrow             | 5         | NORMAL         |

### Chestplates

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6izfEWHuebHqKA3g26%2F-M6j0AeDrK49F0nUtAQD%2Fimage.png?alt=media&amp;token=2447bc63-0786-419b-8af5-4ee353b0764e" alt=""></div>

| Enchantment    | Description                                      | Max Level | Default Rarity |
| -------------- | ------------------------------------------------ | --------- | -------------- |
| Tank           | Gain resistance when below 4 hearts              | 3         | NORMAL         |
| Obsidian Laced | Ignore explosion damage on hit (30s cooldown)    | 3         | NORMAL         |
| Freezing Core  | Have a chance to add slowness 2 to your opponent | 5         | NORMAL         |
| Overlord       | Increase your health while wearing               | 5         | NORMAL         |

### Leggings

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6izfEWHuebHqKA3g26%2F-M6j0Qc9ccV08fPriNh3%2Fimage.png?alt=media&amp;token=9a9be9c4-b36e-4159-91bd-67051f031fc6" alt=""></div>

| Enchantment     | Description                                          | Max Level | Default Rarity |
| --------------- | ---------------------------------------------------- | --------- | -------------- |
| Natural Healing | Gain Regeneration for 5s when hit                    | 3         | RARE           |
| Sugar Rush      | Gain speed while wearing these pants. x% faster      | 5         | NORMAL         |
| Sneak Attack    | Teleport behind your enemy by sneaking when attacked | 3         | NORMAL         |
| Flaming Aura    | Have an x% chance to set your enemy on fire          | 4         | NORMAL         |

### Boots

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6izfEWHuebHqKA3g26%2F-M6j0bL2m3tc3doqVe28%2Fimage.png?alt=media&amp;token=1216b30b-5de3-45cb-8ba6-315af0bf7c59" alt=""></div>

| Enchantment     | Description                                             | Max Level | Default Rarity |
| --------------- | ------------------------------------------------------- | --------- | -------------- |
| Double-Jump     | Have the ability to double-jump and take no fall damage | 3         | RARE           |
| Fight-or-Flight | Gain speed when reaching 4 hearts                       | 3         | NORMAL         |
| Hot Feet        | Gain permanent fire resistance                          | 1         | NORMAL         |
| Featherweight   | Gain permanent haste                                    | 3         | NORMAL         |

### Tools

Enchantments that can be applied to swords, axes, pickaxes, hoes, and shovels

| Enchantment | Description                                                                                                              | Max Level | Default Rarity |
| ----------- | ------------------------------------------------------------------------------------------------------------------------ | --------- | -------------- |
| Telekinesis | Drops automatically go into the player's inventory. Cooperative with [Foraging](/plugins/custom-enchants+/enchants#axes) | 1         | RARE           |

### Pickaxes

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6izfEWHuebHqKA3g26%2F-M6j0msH0X85C-EZxE1J%2Fimage.png?alt=media&amp;token=26551a6c-e55e-48d5-aae0-096fbfad5e2b" alt=""></div>

| Enchantment | Description                                  | Max Level | Default Rarity |
| ----------- | -------------------------------------------- | --------- | -------------- |
| Knowledge   | Have an x% chance to get 2x EXP while mining | 5         | NORMAL         |
| Autosmelt   | x% of blocks will be automatically smelted   | 5         | NORMAL         |
| Ore Radar   | Detect nearby ores within an x block radius. | 3         | RARE           |

### Axes

| Enchantment | Description                                                                  | Max Level | Default Rarity |
| ----------- | ---------------------------------------------------------------------------- | --------- | -------------- |
| Summoner    | Summon x (the same amount as level) wither skulls that fire at your opponent | 3         | NORMAL         |
| Foraging    | Cut down trees with one swing. Duration of (x \* level) seconds              | 5         | NORMAL         |

### Hoes

| Enchantment | Description                                | Max Level | Default Rarity |
| ----------- | ------------------------------------------ | --------- | -------------- |
| Green Thumb | Affect dirt and grass in an x block radius | 3         | NORMAL         |

### Wands

| Enchantment | Description                                                                          | Max Level | Default Rarity |
| ----------- | ------------------------------------------------------------------------------------ | --------- | -------------- |
| Mage        | Shoot rays of magic towards your target (Default Cooldown = 5 seconds, customizable) | 1         | RARE           |

### Books

Books are also able to be enchanted. They function with all GUI's. Books can also be seen within the [Selector GUI](/plugins/custom-enchants+/guis#selector-gui).


# GUIs

All GUI's and their descriptions

## Custom GUI

A custom GUI, graphical user interface, is a feature within that gives players a unique way of enchanting. GUI's can be opened up by [Custom Blocks](/plugins/custom-enchants+/custom-blocks) or with [commands](/plugins/custom-enchants+/commands-and-permissions). Each GUI is animated, in the terms of items  moving around within the GUI while the player is interacting with it.&#x20;

### Enchanter

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jF8jNFj7sEuNKPFYk%2F-M6jGT4EbJuKPKzQLXYx%2F2020-05-07_09-13-52.gif?alt=media&amp;token=319c376f-8396-442b-a975-f4a2283ef360" alt="GIF of the Enchanter GUI"></div>

As first GUI to be introduced to Custom Enchants+, it is definitely also the most important. The Enchanter is to be used to add [Enchantments](/plugins/custom-enchants+/enchants). The Enchanter will refuse items with no remaining slots. The Enchanter will also refuse items types that are not able to be enchanted.&#x20;

#### Upgrading Existing Enchantments

The Enchanter has a chance to increase an item's already-existing enchantments when enchanting. The default percentage is 50%. This percentage can be configured within the [config.yml](/plugins/custom-enchants+/configuration-files/config.yml). Every successful upgrade will roll a chance for an upgrade again. So by default: one upgrade is a 50% chance, two upgrades  is a 25% chance, three upgrades is a 12.5% chance, and so on.

### Tinkerer

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jV1F7JwZb67RaJEIl%2F2020-05-07_10-17-37.gif?alt=media&amp;token=21151c07-2c46-4d02-a924-540be1132fee" alt="GIF of the Tinkerer GUI"></div>

The Tinkerer is a unique GUI that allows a player to remove their custom enchantments in return for EXP. The given is experience is determined by [`used_slots`](/plugins/custom-enchants+/enchants#slots)`* enchantExpCost`. enchantExpCost is defined within the config.yml.

#### Obtaining Scrolls

[Scrolls](/plugins/custom-enchants+/scrolls) can be obtained from tinkering. By default, each scroll has a 5% chance from tinkering, this percentage can be configured in the config.yml.

### Anvil

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jVN9k3ldnpWhod31b%2F2020-05-07_10-19-26.gif?alt=media&amp;token=9e8d4d8e-39e3-49fc-b5dd-1f75eebde463" alt="GIF of the Anvil GUI"></div>

The Anvil GUI allows a player to forge two items together. At least one item must contain a custom enchantment to be utilized. The Anvil does support Vanilla enchantments. Forging two items costs the player experience. The total amount of experience is calculated by `the total amount of enchantments * forgeExpPerEnchantment`. Forging does not increase the max number of slots on either item. Books may be used within the Anvil GUI.

### Selector

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jdEZSpxaWzZyd-W7t%2Fimage.png?alt=media&amp;token=9061d077-851b-442d-b881-4d2a653e7372" alt=""></div>

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jd9LkxFGa1Gh9dnbD%2Fimage.png?alt=media&amp;token=85a7b1ac-e7d1-4a87-97c4-dd197e26fb21" alt=""></div>

The Selector GUI is displayed when a player activates either the [Enchantment Upgrade Scroll](/plugins/custom-enchants+/scrolls#enchantment-upgrade) or the [Enchantment Removal Scroll](/plugins/custom-enchants+/scrolls#enchantment-removal). It allows the user to select an enchantment for the scroll to perform its action.


# Scrolls

All scrolls and their descriptions

## Scrolls

Scrolls are custom items that have special effects for [custom enchanted](/plugins/custom-enchants+/enchants) items. Each scroll is highly configurable within the [config.yml](/plugins/custom-enchants+/configuration-files/config.yml). By default, each scroll has a 5% chance to be obtained from the [Tinkerer](/plugins/custom-enchants+/guis#tinkerer). These percentages are added together, so overall, a player has a 25% chance to obtain a scroll from tinkering by default. A player can not obtain two scrolls from tinkering one item.

### Enchantment Removal

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jdVsgpdMvH73wbXN4%2F-M6jdz-02Uuj37HH7Z1S%2Fimage.png?alt=media&amp;token=78d6bf93-22d3-44c4-9409-0e007254ad1c" alt=""></div>

### Enchantment Upgrade

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jdVsgpdMvH73wbXN4%2F-M6jde2MmB52w_AtFzYA%2Fimage.png?alt=media&amp;token=95f3d92d-4203-4eec-9ad5-3c63aeff8f69" alt=""></div>

### Item Rename

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jdVsgpdMvH73wbXN4%2F-M6jdv5eHGwdhiA_7CDz%2Fimage.png?alt=media&amp;token=e5d81fef-c1a3-464f-a3c6-1fc502b54040" alt=""></div>

### Item Repair

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jdVsgpdMvH73wbXN4%2F-M6jdrQEWFtmA31WpTMp%2Fimage.png?alt=media&amp;token=f570874c-31fb-46d6-91e2-e36d70accca8" alt=""></div>

### Slot Upgrade

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jdVsgpdMvH73wbXN4%2F-M6jdlkddDjS7pdNecYM%2Fimage.png?alt=media&amp;token=51edf2a7-7c17-452b-85be-1836fcd25c00" alt=""></div>


# Wands

Custom items that can be crafted which hold unique enchantments

![Usage of the wand enchantment Mage](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MVlbj70MtXIHFCMo5A-%2F-MVlbvGZ0FWFAqjWM1ft%2FWand-Enchantment-CustomEnchantsPlus-Resized.gif?alt=media\&token=5c33104e-fe6a-42e5-b13e-802b0403e4fe)

### Obtaining a Wand

Wands are obtainable via crafting. The crafting recipe for a Wand is 2 diamonds in a vertical line above a blaze rod (a sword formation with the blaze rod as the stick). The recipe is not customizable; however, it most likely will be in the future.

![](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MT2M3Qc0FesjUMAaXu1%2F-MT2PQAzNoJQFRkkD0Vt%2Fjavaw_WCx7SQ6eh9.png?alt=media\&token=73f6ea01-9f34-4961-8e11-544f25dda870)

### Configuration

The Wand's name and material can be configured within the [config.yml](/plugins/custom-enchants+/configuration-files/config.yml).

### Enchanting

As of v4.3, enchantments may only be added to Wands via [Enchantment Tokens](/plugins/custom-enchants+/enchants#enchantment-tokens). \
[Click here to see all Wand Enchantments.](/plugins/custom-enchants+/enchants#wands)


# Trivia

Fun facts or interesting information

{% hint style="info" %}
Trivia contains more hidden details but that are quite important to the plugin
{% endhint %}

### Action Bar

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6je5KAGBYCMIFSg4in%2F-M6jguJfa53beYCz8dKt%2Fimage.png?alt=media&amp;token=0cbb8865-e1f5-469e-be78-a4039bb20c44" alt=""></div>

The action bar is displayed right above a player's hot bar. It is displayed for most enchantments with cooldowns. It informs the user how long until their cooldown is over.

### bStats

Custom Enchants+ utilizes bStats. This allows Darrionat to view the current standing of usage for the plugin.

### Combo: Stun

#### Effect

Combo: Stun gives the struck entity slowness 255.

#### Title

When stunning a player, they will be displayed with a screen showing them how long they are stunned for.

### Explosive Cooldown

During the 5 second cooldown of explosive. The player may not shoot arrows. This is an intended feature to help 'nerf' explosive.

### Homing Arrows

20 seconds after being fired, homing arrows will lose their ability to home. This was implemented to prevent permanent floating arrows if there is a bugged entity.

### Sounds and Particles

Many enchantments have custom sounds or particles. Flaming Aura signals that the opponent has been set on fire with a sound. Lucky strike gives off of a flash effect whenever it hits.


# PrisonPick

Prison Servers | Enchant Upgrades | Inventory Management

PrisonPick completely changes your Prison server and will add a fun new leveling aspect to it! Every player is given a unique pickaxe that they can upgrade with enchantments.

Fully supporting players having the same pickaxe over Bungee by using a MySQL database. Upgrades can be bought with experience levels, tokens from TokenManager, or in the future currency from Vault. A PAPI expansion can also be used to fetch player statistics.

![Example of a player's pickaxe](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MVgdOJXVxEd7MV_IV_r%2F-MVgdraZgR5RJNvfIVK3%2Fjavaw_8pFbDucI4L.png?alt=media\&token=d13434a1-fbb0-49b6-9a43-18daea12fc43)

### Features

* 6 [Custom Enchantments](/plugins/prisonpick/enchantments) that can be upgraded
* A custom [GUI ](/plugins/prisonpick/guis)opened when a custom pickaxe is interacted with
* Admin [commands ](/plugins/prisonpick/commands-and-permissions)and a [HelpGUI ](/plugins/prisonpick/guis#help-gui)that gives information on base and subcommands
* [TokenManager ](/plugins/prisonpick/dependencies#tokenmanager)support and a [PAPI Expansion](/plugins/prisonpick/placeholders)
* Extremely configurable [files](/plugins/prisonpick/configuration-files)
* A pickaxe [update timer](/plugins/prisonpick/inventory-management#update-timer)
* [MySQL ](/plugins/prisonpick/saving-data#mysql-database)support
* Option to get [enchantment data](/plugins/prisonpick/saving-data) from the item instead of a file/database
* 1.8 to 1.16.x support
* Feature to [put blocks in player's inventory](/plugins/prisonpick/inventory-management#blocks-to-inventory)
* Automatically [give player dropped experience](/plugins/prisonpick/inventory-management#exp-to-inventory)

{% hint style="info" %}
Note: throughout the PrisonPick Wiki, the words "custom item" are used instead of "pickaxe." This is explained in the warning [here](/plugins/prisonpick/configuration-files/config.yml-1.0.2).&#x20;
{% endhint %}

{% content-ref url="/pages/-MVd3a7eHfFD7xY1o59y" %}
[Commands & Permissions](/plugins/prisonpick/commands-and-permissions)
{% endcontent-ref %}

{% content-ref url="/pages/-MVd3e\_JgqfYnxdRER50" %}
[Configuration Files](/plugins/prisonpick/configuration-files)
{% endcontent-ref %}

{% content-ref url="/pages/-MVd3lQwyYUK3X\_H-XkQ" %}
[Dependencies](/plugins/prisonpick/dependencies)
{% endcontent-ref %}

{% content-ref url="/pages/-MVd3zBmBR66E13lVGgc" %}
[Enchantments](/plugins/prisonpick/enchantments)
{% endcontent-ref %}

{% content-ref url="/pages/-MVd4Du97MhYg0gpc5JY" %}
[GUIs](/plugins/prisonpick/guis)
{% endcontent-ref %}

{% content-ref url="/pages/-MVd406-gmyDAk4GwPH8" %}
[Inventory Management](/plugins/prisonpick/inventory-management)
{% endcontent-ref %}

{% content-ref url="/pages/-MVdDmbWQt-Gh0O47PIg" %}
[Placeholders](/plugins/prisonpick/placeholders)
{% endcontent-ref %}

{% content-ref url="/pages/-MVd42uBFmUw3RjeiR8A" %}
[Saving Data](/plugins/prisonpick/saving-data)
{% endcontent-ref %}


# Autosell

Detailed information on how Autosell works

Autosell is a feature that allows a player to automatically sell their items for whatever type of economy the plugin uses. The player is able to automatically sell items if the option is enabled within the [config.yml](/plugins/prisonpick/configuration-files/config.yml-1.0.2). Autosell can be used when blocks [go directly to a player's inventory](/plugins/prisonpick/inventory-management#blocks-to-inventory) or it can be used via a timer.

### Ranks

A rank gives a player access to a set of selling [prices](/plugins/prisonpick/autosell#prices). \
Ranks can be created within the [autosell.yml](/plugins/prisonpick/configuration-files/autosell.yml) file. Ranks have names that will not be displayed, but they should be seen in a player's permissions.&#x20;

#### Giving a Player a Rank

To give a player a rank, you must give them the permission `prisonpick.rank.rankName`.

{% hint style="info" %}
If a player has multiple ranks, and two or more have a price for the same item, the highest selling price will be used.
{% endhint %}

### Prices

A price is a combination of a selling material and a sell value. To set a price for a rank, within the [autosell.yml](/plugins/prisonpick/configuration-files/autosell.yml), you can add a price by adding `itemtype: sellPrice` to the rank's config section.\
If there is an invalid material, a warning will be printed in the console and the item will not be taken into account.\
For the full list of valid item types, click [here](https://github.com/CryptoMorin/XSeries/blob/master/src/main/java/com/cryptomorin/xseries/XMaterial.java).


# Commands & Permissions

Detailed Information on all commands and their permissions

Command information can also be seen with **/prisonpick help** or with the [Help GUI](broken://pages/-MVd4AbgyhgroeesCT3g).\
If a player does not send enough arguments for the subcommand that they used, they will be sent the help message for that command. \
Commands that directly affect a player using the command cannot be run by the console.

### Commands

| Command                                              | Function                                                                                                                                       | Console Can Use |
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| /prisonpick                                          | Shows base message                                                                                                                             | true            |
| /prisonpick bypass                                   | Allows a player to be able to move a pickaxe in their inventory                                                                                | **false**       |
| /prisonpick help                                     | More command information                                                                                                                       | true            |
| /prisonpick helpGui                                  | Opens a GUI that contains more command information                                                                                             | **false**       |
| /prisonpick reload                                   | Reloads all config files and settings                                                                                                          | true            |
| /prisonpick removePickaxe \[player]                  | Removes a pickaxe from a specified player                                                                                                      | true            |
| /prisonpick resetPlayer \[player]                    | Resets all of a player's enchantments and their blocks mined to 0                                                                              | true            |
| /prisonpick setEnchant \[player] \[enchant] \[level] | Sets a player's level for a specific enchantment                                                                                               | true            |
| /prisonpick syncData \[file/db] confirm              | Copies all player data from the given location to the other location. More info [here](/plugins/prisonpick/saving-data#the-sync-data-command). | true            |

### Permissions

All permissions are based on the format of **prisonpick.subCommand**. So for example, a valid permission would be **prisonpick.setenchant**. \
Without permission for a specific command, a player will not be able to use that command. Opped players will have permission for all commands.&#x20;


# Configuration Files

All config files can be customized to a high degree. They will be automatically saved if the files do not already exist when the plugin is initialized. \
All messages can be configured as well.\
When the reload command is run, the configuration services within the plugin will automatically reload all settings from the configs.

{% hint style="warning" %}
Files that save data are not considered to be a config file, look at [this page](/plugins/prisonpick/saving-data) for data files
{% endhint %}

### Auto Update

All configuration files will be automatically updated to include all settings, remove settings that no longer exist, and the version will also be in the config.\
\
**Why does this matter?**\
The configs do not need to be deleted/recreated in order to get the newer settings.\
Configs do not need to be deleted and recreated in order to delete outdated settings.\
If there is a bug, it is easy for the developer to find out what version you are using by looking at your configuration files.\
\
**The disadvantage of Automatic Updates**\
Unless specified, the updater will remove all comments. This is due to how the Spigot API handles YAML configurations, they do not save comments along with the data. I'm still looking for a workaround and there should be a fix to this in the future; however, it's not on the top of my to-do list.\
This single disadvantage is not large enough for me to remove the updater due to its incredible usefulness.

{% content-ref url="/pages/-MVd9cn6FAiol-eLkwIZ" %}
[config.yml](/plugins/prisonpick/configuration-files/config.yml-1.0.2)
{% endcontent-ref %}

{% content-ref url="/pages/-MVd9vWxB0cYtVYLsleJ" %}
[enchants.yml](/plugins/prisonpick/configuration-files/enchants.yml-1.0.2)
{% endcontent-ref %}

{% content-ref url="/pages/-MVdA3OOBfscmBVLJz-n" %}
[messages.yml](/plugins/prisonpick/configuration-files/messages.yml-1.0.2)
{% endcontent-ref %}


# autosell.yml

{% hint style="warning" %}
To create a rank, it needs to be underneath the configuration section `prisonpick.rank`.
{% endhint %}

```
# The autosell.yml file defines what blocks sell for what prices.
# 
# Since most prison servers function by groups and ranks, different permissions can have different prices
#
# Instead of depending on multiple permission plugins, PrisonPick looks at the permissions of a player instead.
# 
# For example, if a player has the permission prisonpick.rank.a and that permission has DIAMOND_BLOCK 
# for 50 (type of currency), then the player will be given 50 of the configured currency.
# 
# These permissions must be in the format `prisonpick.rank.{GROUP}`
# 
# If a player has more than one of the following permissions, and a certain item is found in both, 
# the player will be sold the higher priced item.

prisonpick.rank:
  a:
    DIAMOND_BLOCK: 500
    EMERALD_BLOCK: 750
  b:
    DIAMOND_BLOCK: 750
    EMERALD_BLOCK: 1000
```


# config.yml

1.0.2

{% hint style="danger" %}
Within the config.yml the material of the pickaxe can be changed to any material. However, it is **highly recommended** to **ONLY** use a pickaxe material. Using a different material such as *OAK\_LOG* could potentially lead to unexpected bugs or effects, mainly with enchantments.\
\
If you experience a bug by using a non-pickaxe material, you may make a bug report, but do not expect functionality to come to a specific item.
{% endhint %}

{% hint style="info" %}
Within the custom item lore, the placeholder %owner% can be used to display the owner's username, and %minedBlocks% can be used to show the mined block stat of the owner.
{% endhint %}

```
pickaxe:
  # The name of the pickaxe, %player% will be replaced with the owner's name
  name: '&6%player%s &ePickaxe'
  slot: 0
  material: DIAMOND_PICKAXE
  # Determines whether to set the pickaxe to unbreakable or not
  unbreakable: true
  lore:    
    lines:
      - '&2&lStatistics'
      - '&aOwner &b%owner%'
      - '&aBlocks mined &b%minedBlocks%'
      - ''
      - '%enchantmentsSection%'
    # Enchantments section can be inserted into the lore with the
    # %enchantmentsSection% placeholder
    # If a line contains this placeholder, it will be replaced with the lines below
    enchantmentsSection:
      headerEnabled: true
      header: '&c&lEnchantments'
      enchant: "&e%enchantName% &f%enchantLevel%"
# TokenManager support. This must be true to set TokenManager as the main economy
tokenManager:
  enabled: false
  # How prices are displayed
  display: '&f%tokens% Tokens'
# How prices are displayed
experience:
  display: '&f%expLevels% Levels'
# The amount of upgrade an enchantment by based upon the type of click
enchantLevelUpgrade:
  leftClick: 1
  rightClick: 10
  shiftRightClick: 100
# Inventory Options
inventory:
  # If false, will prevent a player from moving the pickaxe in their inventory
  allowMovePickaxe: false
  # If false, will not let player drop the custom item
  allowDropPickaxe: false
  # If false, will not drop custom item on death
  dropPickaxeOnDeath: false
  givePickaxeOnJoin: true
  # If true, this will completly delete the item that was in the pickaxe's assigned slot;
  # otherwise, move the item into a different slot or drop naturally
  replaceItemInHotbarSlot: false
  # Updates the pickaxe's lore or NBT tags
  updatePickaxeOnJoin: true
  # A timer that is ran 
  timer:
    enabled: true
    # The amount of seconds between each time the timer runs
    seconds: 15
    # Removes pickaxes that do not belong to the player
    # Also removes duplicated pickaxes
    removeIllegalPickaxes: true
    # Gives a player a pickaxe if they don't have one that they own in their inventory
    givePickaxe: true
    # Updates the lore or NBT tags of the pickaxe
    updatePickaxe: true
blockBreak:
  # Puts items directly into a player's inventory
  itemsToInventory: true
  # If true, doesn't drop EXP on the ground, but gives it to player instead
  autoPickupExp: true
# GUI settings
pickaxeGui:
  name: 'Pickaxe'
  rows: 5
  fillItemMaterial: BLACK_STAINED_GLASS_PANE
# Database support
mysql:
  enabled: false
  host: localhost
  port: 3306
  database: name
  username: root
  password: password
```


# enchants.yml

1.0.2

```
enchantData:
  # This determines where the enchantment data will be fetched from. Having this set to false will 
  # mean that player's enchantments will be determined from their saved data (config file or database). 
  # However, if true, the enchantments will be fetched from the NBT tag of the item.
  getEnchantsFromItem: false
clickTypeAmount:
  leftClick: 1
  rightClick: 10
  shiftRightClick: 100
  middleClick: MAX
guiLore:
  - '%description%'
  - ''
  - '&eCurrent Level &f%currentLevel%/%maxLevel%'
  - '&ePrice &f%price%'
  - ''
  - '&fLeft-Click &7To Add &f%leftClickAmount% &7Level'
  - '&fRight-Click &7To Add &f%rightClickAmount% &7Levels'
  - '&fShift Right-Click &7To Add &f%shiftRightClickAmount% &7Levels'
  - '&fMiddle-Click &7To Add &f%middleClickAmount% &7Levels'
efficiency:
  maxLevel: 100
  levelsPerVanillaLevel: 20
  gui:
    slot: 28
    cost: 50
    material: DIAMOND_PICKAXE
    displayName: '&e&lEFFICIENCY'
    description: '&fMine blocks faster'
fortune:
  maxLevel: 100
  levelsPerVanillaLevel: 20
  gui:
    slot: 29
    cost: 50
    material: EMERALD
    displayName: '&a&lFORTUNE'
    description: '&fMultiply the amount of drops you mine'
haste:
  maxLevel: 5
  levelsPerPotionLevel: 1
  gui:
    slot: 30
    cost: 50
    material: FEATHER
    displayName: '&6&lHASTE'
    description: '&fGain levels of haste'
speed:
  maxLevel: 5
  levelsPerPotionLevel: 1
  gui:
    slot: 32
    cost: 50
    material: SUGAR
    displayName: '&e&lSPEED'
    description: '&fGain levels of speed'
jumpBoost:
  maxLevel: 4
  levelsPerPotionLevel: 1
  gui:
    slot: 33
    cost: 50
    material: RABBIT_FOOT
    displayName: '&a&lJUMP BOOST'
    description: '&fAbility to jump higher'
nightVision:
  maxLevel: 1
  levelsPerPotionLevel: 1
  gui:
    slot: 34
    cost: 50
    material: ENDER_EYE
    displayName: '&d&lNIGHT VISION'
    description: '&fGain night vision'
```


# messages.yml

1.0.2

```
prefix:
  enabled: true
  prefix: '&7[&6Prison Pick&7]&f '
errors:
  notEnoughMoney: '&cYou do not have enough to afford this enchantment'
  onlyPlayers: '&cOnly players can send that command!'
  noPermission: '&cYou do not have the permission %permission%!'
  playerNotOnline: '&cThat player is not online!'
  invalidEnchant: '&cThat is an invalid enchantment'
  notANumber: '&cThat is not a valid integer'
  notValidLevel: '&cNot a valid level! Send a level from 0 to %maxLevel%'
messages:
  pickaxeRemoved: '&aSuccessfully removed %player%s pickaxe'
  setEnchantment: '&aSuccessfully set &e%player%s &aenchantment &e%enchantment% &ato level &e%level%'
  resetPlayer: '&aSuccessfully &creset &aall enchantments from &e%player%'
  toggleBypass: '&aBypassing set to &e%status%'
  reloaded: '&aSuccessfully reloaded all files and settings'
commandMessages:
  baseMessages:
    - '&7[&6Prison Pick&7] &7Author: &6Darrionat'
    - '  &7Type &6/pp help &7for more information'
  help:
    header: '&6Help Page &f%page%&7/&f%pageAmount%'
    help: '&6/pp help [page] &7- More command information'
    helpgui: '&6/pp helpgui &7- Opens a Gui that contains more command information'
    removePickaxe: '&6/pp removePickaxe [player] &7- Removes a players item'
    setEnchant: '&6/pp setEnchant [player] [enchant] [level] &7- Sets a players level for a particular enchantment'
    syncData: '&6/pp syncData [file/db] confirm &7 - Syncs the data from the selected data location to the other'
    resetPlayer: '&6/pp resetPlayer [player] &7- Resets &call &7of a players enchantments to &a0'
    bypass: '&6/pp bypass &7- Allows a player to be able to move a pickaxe in their inventory'
    reload: '&6/pp reload &7- Reloads all config files and settings'
```


# Dependencies

Information about required/non-required plugins that PrisonPick can work with

Dependencies are split up into 2 categories. Hard-dependencies, which are required, and soft-dependencies, which are not required, but offer extra features. \
\
As of now, PrisonPick has 2 hard dependencies, but they are not required for you to download them, as they are shaded within the plugin.jar itself. These shaded libraries are [XSeries](https://github.com/CryptoMorin/XSeries) and [NBTEditor](https://github.com/BananaPuncher714/NBTEditor). Although these are technically hard dependencies, you do not have to consider them at all if you are solely an administrator.\
\
PrisonPick also has a soft dependency on [TokenManager ](https://www.spigotmc.org/resources/tokenmanager.8610/)and an expansion for [PlaceholderAPI](https://www.spigotmc.org/resources/placeholderapi.6245/). For detailed information on the PAPI expansion, [click here](/plugins/prisonpick/placeholders).

{% content-ref url="/pages/-MVdDmbWQt-Gh0O47PIg" %}
[Placeholders](/plugins/prisonpick/placeholders)
{% endcontent-ref %}

### TokenManager

TokenManager is an economy plugin that PrisonPick can use for upgrading [enchantments](/plugins/prisonpick/enchantments). This will replace the default currency of EXP levels. This can be enabled in the [config.yml](/plugins/prisonpick/configuration-files/config.yml-1.0.2).\
<https://www.spigotmc.org/resources/tokenmanager.8610/>

### Vault

Vault is an economy plugin that PrisonPick can use for upgrading enchantments.\
Download here: <https://www.spigotmc.org/resources/vault.34315/>

### XSeries

XSeries is a library that allows PrisonPick to be highly compatible with older versions. XSeries allows for things such as potion effects, enchantments, and mostly item types to be used without major exceptions or failures.&#x20;

### NBTEditor

NBTEditor is used to save data to a specific item. With this library, custom data can be easily saved to an item. For example, pickaxes can have a designated owner, preventing other players from using that pickaxe.


# Enchantments

Information about pickaxe enchantments

Enchantments can be added through the [Pickaxe GUI](broken://pages/-MVd48ILCL_-ODJ8cUjp). Enchantments must all have a defined cost, slot of where they are displayed in the GUI, max level, and display information. Enchantments can also have other settings within the [enchants.yml](/plugins/prisonpick/configuration-files/enchants.yml-1.0.2) depending on what they inherit. All enchantments have a minimum level of 1 and must have a unique name.

## Vanilla Enchantments

Custom enchantments that extend the VanillaEnchantment class add a vanilla enchantment to the item based upon what level the custom enchantment is. This is based upon a setting called `levelsPerVanillaLevel`. The level of the vanilla enchantment is calculated as follows:\
\
**Example**:\
`levelsPerVanillaLevel: 30`\
`Custom enchant level = 65`\
`65/30 = 2.17 -> 2`\
*Always rounded down as an integer*

### Efficiency

Efficiency increases the speed at which the tool can mine. The mining speed is fully based upon that of the vanilla enchantment and does not use unique attributes, packets, etc.

#### Enchantment Information

| Default Max Level | Default levels/vanilla level |
| ----------------- | ---------------------------- |
| 100               | 20                           |

### Fortune

Fortune increases the number of drops that a player can get from certain ores and materials. The vanilla fortune calculation is actually canceled and PrisonPick does its own calculation that is the exact same. This is because Spigot API was not consistent across versions, so I had to create my own loot table. All calculations are the exact same as those on [this page](https://minecraft.gamepedia.com/Fortune).

{% hint style="info" %}
The custom calculation of Fortune will not affect the calculation of non-custom items.
{% endhint %}

#### Currently Supported Ores&#x20;

| Ore             |
| --------------- |
| Coal Ore        |
| Nether Quartz   |
| Diamond Ore     |
| Emerald Ore     |
| Nether Gold Ore |
| Lapis Lazuli    |
| Redstone        |

#### Enchantment Information

| Default Max Level | Default levels/vanilla level |
| ----------------- | ---------------------------- |
| 100               | 20                           |

## Potion Enchantments

Potion enchantments give a particular potion effect when the custom item is held. All potion effects given by an enchantment have an unlimited duration. The level of the potion also depends on the level of the custom enchantment. This is calculated by a setting called `levelsPerPotionLevel`. The level of the potion is calculated as follows:\
\
**Example**:\
`levelsPerPotionLevel: 2`\
`Speed enchant level = 3`\
`3/2 = 1.5 -> Speed 1`\
*Always rounded down as an integer*

{% hint style="info" %}
Potion effects are added when a player switches their current item to the pickaxe. So if you just upgraded the enchantment and you don't have the effect, try switching items.
{% endhint %}

### Haste

The custom enchantment of Haste gives the potion effect [Haste](https://minecraft.gamepedia.com/Haste). This will increase how fast the player digs.

| Default Max Level | Default levels/potion level |
| ----------------- | --------------------------- |
| 5                 | 1                           |

### Speed

The custom enchantment of Speed gives the potion effect [Speed](https://minecraft.gamepedia.com/Speed). This will increase how fast the player runs.&#x20;

{% hint style="info" %}
This enchantment may not be a potion enchantment in the future, but rather, it may change the attribute of the player's walking speed. - This will depend on user feedback.
{% endhint %}

| Default Max Level | Default levels/potion level |
| ----------------- | --------------------------- |
| 5                 | 1                           |

### Jump Boost

The custom enchantment of Jump Boost gives the potion effect [Jump Boost](https://minecraft.gamepedia.com/Jump_Boost). This will change how fast the player can jump.

| Default Max Level | Default levels/potion level |
| ----------------- | --------------------------- |
| 4                 | 1                           |

### Night Vision

The custom enchantment of Night Vision will give the potion effect [Night Vision](https://minecraft.gamepedia.com/Night_Vision). This will change how easily the player can see in the dark.&#x20;

{% hint style="warning" %}
Setting the max level of this enchantment to higher than 1 will do nothing unless you also change the default levels/potion level. Doing this would mean the player needs to upgrade the enchantment enough times to actually get the potion effect; however, this is not recommended. It is recommended that you instead, increase the price of this enchantment and keep the default max level as 1.
{% endhint %}

| Default Max Level | Default levels/potion level |
| ----------------- | --------------------------- |
| 1                 | 1                           |


# GUIs

A GUI is a menu that can be opened by a player

Being available to players, the GUIs in PrisonPick serve a similar purpose: to make it easy for the player to perform an action or fetch information. The [Help GUI](/plugins/prisonpick/guis#help-gui) and the [Pickaxe GUI](/plugins/prisonpick/guis#pickaxe-gui) both do this. Items may not be removed from the GUI and the player will be prevented from clicking any items in their inventory as well.

## Help GUI

The Help GUI is a GUI that can be opened when a player uses the command `/prisonpick helpgui`. The player will be presented with a menu of base commands which, if applicable, can be clicked to view their subcommands.\
The fill material for both the Base Command GUI and the SubCommand GUI is black stained glass panes.\
\
The Help GUI is most likely the least customizable aspect of the plugin because it is only available to admins and is automatically changed based upon how many commands there are. This is so that I, the developer, do not have to change a part of the GUI every time I add/remove/change a command in the plugin.

### Base Command GUI

If a command has subcommands it's presented as a CHEST\_MINECART; otherwise, it will be presented as a MINECART. Every base command will be displayed with the item name being the base command and the lore being subcommands. The base command will be displayed with its most basic alias, such as `/prisonpick`.

{% hint style="info" %}
The lore will most likely include a description of the base command when there is a base command added that does not have any subcommands.
{% endhint %}

![A base command within the Base Command GUI](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MVfzW6aOJsRWJ07VbjV%2F-MVg19CmBzQMt883LyF3%2Fjavaw_8teGAB4BNA.png?alt=media\&token=c7e7ce6c-4826-4f89-ade1-c87623cfe8d9)

### Subcommands GUI

Subcommands are displayed through this GUI. Each subcommand will be displayed as a MINECART because a subcommand cannot have a subcommand. Detailed information about subcommands can be found within the lore of the item. This information is fetched from the [messages.yml](/plugins/prisonpick/configuration-files/messages.yml-1.0.2), so the information of subcommands can be customized to a degree.

![A subcommand within the Subcommand GUI](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MVg2Jiv0qvAR_bn0Yn2%2F-MVg2PiyQluSi-oT4KD2%2Fjavaw_mKi71G8iOQ.png?alt=media\&token=5e4273df-3e80-48a0-8126-b6296dd59c66)

## Pickaxe GUI

The Pickaxe GUI is opened when a player right-clicks their custom item. This GUI is used to upgrade [enchantments](/plugins/prisonpick/enchantments). The displayed name of the GUI, the number of rows in the GUI, and the fill item \[an item that occupies all empty slots] for the GUI can all be customized within the [config.yml](/plugins/prisonpick/configuration-files/config.yml-1.0.2). Adding an enchantment will update the player's items to whatever new stats they have. Where/how this data is saved is mentioned [here](/plugins/prisonpick/saving-data).\
\
Enchantments can also be upgraded in different amounts based upon the click type. This can be changed in the [enchants.yml](/plugins/prisonpick/configuration-files/enchants.yml-1.0.2). Setting any of these to **MAX** will make it automatically calculate the max amount of levels that it can upgrade with the player's current balance.

| Click Type        | Upgrade Amount |
| ----------------- | -------------- |
| Left-Click        | 1              |
| Right-Click       | 10             |
| Shift Right-Click | 100            |
| Middle-Click      | MAX            |

{% hint style="info" %}
There will most likely be a way to display any item you want in the pickaxe GUI in the future. This will allow for placeholders, stats, etc to be displayed.
{% endhint %}

![The Night Vision enchantment within the Pickaxe GUI](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-MVg3FijZ88yK8wdfcsI%2F-MVg6-bpmCsMRJH0TFvN%2Fjavaw_0HU4taahUT.png?alt=media\&token=ff17bbc4-865e-474a-bfab-ffca5f35aa08)


# Inventory Management

How the plugin manages a player's inventory

PrisonPick is able to manage a player's inventory and their custom item. It has multiple features that allow for a unique experience, and all features listed below can be toggled within the [config.yml](/plugins/prisonpick/configuration-files/config.yml-1.0.2).&#x20;

{% hint style="danger" %}
If any player has multiple pickaxes that they are the owner of, they most likely have found a way to duplicate them. Although the [update timer](/plugins/prisonpick/inventory-management#update-timer) will remove illegal items (if enabled), please report this and attempt to find out how the player duplicated their custom item.
{% endhint %}

### Breaking Blocks

When the player breaks a block, the plugin can do the following things, if they are enabled:

#### Blocks to Inventory

When a player mines, blocks will be directly put into their inventory. This can be applied to all blocks that are broken by the player. Drops will also be changed according to what level of [Fortune](/plugins/prisonpick/enchantments#fortune) the player is using.\
If the player's inventory is full, by default, drops will be dropped on the ground - this is configurable.

#### Autosell

When the setting `blockBreak.itemsToInventory.autosell` is enabled in the [config.yml](/plugins/prisonpick/configuration-files/config.yml-1.0.2), if the player is able to sell the material that they are collecting, the material will be sold instead of being given to the player. For detailed information on how it's determined if a player can autosell an item, click [here](/plugins/prisonpick/autosell).

#### EXP to Inventory

When a player mines, any experience that is dropped will directly be given to the player.

### Player Join

#### Give Custom Item

If a player does not have a custom item that they own within their inventory, they will be given a new custom item. Depending on how [data is saved](/plugins/prisonpick/saving-data), their stats may be restored.

#### Update Custom Item

When a player joins, the lore of their pickaxe will be automatically updated to their statistics. If nothing has changed, the lore will be the exact same.

### Prevent Drop

If this option is enabled, it will prevent the player from dropping their custom item.

### Prevent Drop on Death

If enabled, a player's custom item will be dropped when a player dies. This only applies to custom item's that the player is the owner of.

### Prevent Movement

This option will prevent players from moving their pickaxe within their inventory. A player in creative mode or a player using [`/pp bypass`](/plugins/prisonpick/commands-and-permissions#commands) will bypass this prevention.&#x20;

### Update Timer

The update timer, if enabled, will \[by default] run every 15 seconds. This loops through all players and runs a series of actions based upon which options are enabled. By default, all below are enabled.

#### Give Custom Item

Gives players a custom item if they do not have one they own in their inventory. This uses the same function as on [player join](/plugins/prisonpick/inventory-management#give-custom-item).

#### Remove Illegal Items

This loops through player's inventory and if they have a duplicated custom item or an item that does not belong to them, it will be deleted.

#### Update Custom Item

Updates the lore of a custom item. The same as [this](/plugins/prisonpick/inventory-management#update-custom-item).


# Placeholders

PrisonPick's optional expansion for PlaceholderAPI

Using the external [PlaceholderAPI ](https://www.spigotmc.org/resources/placeholderapi.6245/)(PAPI) expansion for PrisonPick, different data can be fetched. Using a placeholder where a plugin parses a string for placeholders will result in the placeholders being replaced with the returned values.\
\
PrisonPick fetches the data that is returned based upon how the plugin is configured. For more information on saving data and configuration, [click here](/plugins/prisonpick/saving-data).

### Installation

1. Download the expansion from here. \[Not yet published]
2. Add this .jar file to the /plugins/PlaceholderAPI/expansions folder on the server
3. Restart PlaceholderAPI

### Placeholders

Currently, there are two different types of statistics that are supported: number of blocks mined and enchantment levels. Placeholder parameters are not case-sensitive.

{% hint style="info" %}
For enchantments with names that are longer than one word, use `_` to separate words within the placeholder.
{% endhint %}

{% tabs %}
{% tab title="Placeholders" %}

| Placeholder               | Returned String                                                           |
| ------------------------- | ------------------------------------------------------------------------- |
| %prisonPick\_blocksMined% | Gets the player's statistic for total blocks mined with their custom item |
| %prisonPick\_enchantName% | Gets the player's level of the defined enchantment                        |
| {% endtab %}              |                                                                           |

{% tab title="Examples" %}

| Input                                       | Output                |
| ------------------------------------------- | --------------------- |
| `Blocks Mined: %prisonPick_blocksMined%`    | `Blocks Mined: 534`   |
| `Jump Boost Level: %prisonPick_jump_boost%` | `Jump Boost Level: 3` |
| {% endtab %}                                |                       |
| {% endtabs %}                               |                       |


# Saving Data

The different ways PrisonPick can store a player's data and statistics

PrisonPick stores data in different ways depending on how it is configured. Enchantments can be fetched from the [NBT tag](/plugins/prisonpick/saving-data#from-nbt-tag) of a custom item, the [local file](/plugins/prisonpick/saving-data#local-file), or a [MySQL database](/plugins/prisonpick/saving-data#mysql-database). The blocks mined statistic can only be fetched from the local file or a MySQL database.

### Local File

A player's data is **always** saved locally, and that file can be found within `/plugins/PrisonPick/data/playerUUID.yml`This does not mean that data is always fetched from it.&#x20;

### MySQL Database

If enabled in the [config.yml](/plugins/prisonpick/configuration-files/config.yml-1.0.2), data will also be stored within a MySQL database.\
If data is saved to a database, all statistics will be fetched from the database, unless enchantments are fetched [from the item](/plugins/prisonpick/saving-data#from-nbt-tag) instead. If there is an SQLException, data will be fetched from the local file instead.

### Enchantments

Enchantments are always stored in the NBT tag of a custom item and within their local file.

#### From NBT Tag

If the option `getEnchantsFromItem` is enabled within the [enchants.yml](/plugins/prisonpick/configuration-files/enchants.yml-1.0.2), enchantments will be **always** fetched from the NBT tag of the item. This means that if a player loses their pickaxe or if the pickaxe is removed from their inventory, all enchantments will be reset for that player. By default, this is false, meaning that the enchantment level depends on the [local file](/plugins/prisonpick/saving-data#local-file) and/or a database.

### The Sync Data Command

The `/prisonpick syncData [file/db] confirm` command is a very unique command and one that probably won't be used often. This command copies all existing data from the given location and also sets those values at the other. **It will not remove any other existing data, but it will overwrite pre-existing stats for a player.**&#x20;

{% hint style="info" %}
The `confirm` argument exists to protect users from running this command accidentally or using it incorrectly. It must be remembered that the location you specify will be the **FROM** and the location you don't specify will be the **TO**.&#x20;
{% endhint %}

**File to Database Sync Example**

You just enabled my database, but you've been running PrisonPick for quite some time, so a lot of my players have statistics. To minimize the number of workarounds you have to do, there's a command built directly for this. To copy the stats from the [local files](/plugins/prisonpick/saving-data#local-file) found within the data folder to the database, you just type `/prisonpick syncData file confirm`.

#### Database to File Sync Example

You have a server that's been using PrisonPick and a MySQL database, and you are planning on setting up another server on your network that uses the same data as the other. It's not necessary if you are using a database, but highly recommended that you run the command `/prisonpick syncdata db confirm` on the newer server. This will sync the data from the database to this new server.\
\
Even though within this example the local files are not being used, if a database occurs, PrisonPick will use the local file instead, so making sure both are the same is good practice.

{% hint style="danger" %}
Take caution while using this command. Syncing data **will overwrite** data if the data is not the same.
{% endhint %}


# PluginLib

A library for making the creation of plugins easier

A project that aims to make the creation of plugins a faster and easier process. This project supports Minecraft 1.8.8-1.16.x.

## Maven

To add the library to your local Maven project, add the following to your pom.xml

#### Repository

```markup
<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
```

#### Dependency

```markup
<dependency>
  <groupId>com.github.darrionat</groupId>
	<artifactId>PluginLib</artifactId>
	<version>version</version>
</dependency>
```

#### Shading

```markup
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
                <relocations>
                    <relocation>
                        <pattern>me.darrionat.pluginlib</pattern>
                        <!-- Make sure to change the package below -->
                        <shadedPattern>my.plugin.utils</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
```

## Documentation

{% hint style="info" %}
The JavaDocs also contain plenty of information, make sure to read them before using a method!
{% endhint %}

todo: page links


# Creating Your Plugin

The first step of adding this library to your project

### The Plugin Class

The class that you want to represent your plugin needs to extend `me.darrionat.pluginlib.Plugin`.&#x20;

```java
package me.darrionat.fakeplugin.FakePlugin;

import me.darrionat.fakeplugin.ErrorManager();

import me.darrionat.pluginlib.ErrorHandler;
import me.darrionat.pluginlib.Plugin;

public class FakePlugin extends Plugin {

	public void initPlugin() {
	  // Initializes your command
		new FakeCommand(this);
	}

	public ErrorHandler getErrorHandler() {
		return new ErrorManager();
	}

	@Override
	public void onDisable() {
		
	}
}
```

Typically, when you extend JavaPlugin, you use `onEnable()` but the `Plugin` superclass does some things behind the scenes before it starts your plugin, so you need to use `initPlugin()` instead.

When your plugin is disabled, `onDisable()` will be run.

### Error Handlers

Every plugin is required to have an `ErrorHandler`. More information about the `ErrorHandler` interface can be found [here](/libraries/pluginlib/errorhandler).&#x20;


# Commands

PluginLib offers a simple way to create your commands and handles a few errors in the process

### Creating a Command

To create a command within your plugin, you can do the following

#### Add the command to your plugin.yml

```yaml
name: FakePlugin
author: Darrionat
main: me.darrionat.FakePlugin
description: A fake plugin with commands
version: 1.0.0
api-version: 1.13

commands:
  ban:
    usage: /<command>
```

### Create a BaseCommand

```java
package me.darrionat.fakeplugin.commands;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

import me.darrionat.pluginlib.Plugin;
import me.darrionat.pluginlib.commands.BaseCommand;

public class FakeCommand extends BaseCommand {

	public FakeCommand(Plugin plugin) {
		super(plugin);
	}

	@Override
	public String getCommandLabel() {
		return "ban";
	}

	@Override
	protected void runNoArgs(CommandSender sender, Command command, String label, String[] args) {
		/*
		 * Do stuff
		 */
	}
}
```

Since the class above has no subcommands defined, it will always simply just run the `runNoArgs`method.

### SubCommands

A SubCommand is defined as a command that uses the same label as its parent BaseCommand but it has a different first argument.&#x20;

For example, your plugin has the base command `/ban`. You can add subcommands such as `/ban list` or `/ban player`.&#x20;

#### Adding a SubCommand to your BaseCommand

To add a SubCommand to a BaseCommand, you can use `BaseCommand#addSubCommand(SubCommand)`.

```java
public FakeCommand(Plugin plugin) {
		super(plugin);
		addSubCommand(new FakeSubCommand(this, plugin));
}
```

#### Example of a SubCommand Class

```java
package me.darrionat.fakeplugin.commands;

import org.bukkit.command.CommandSender;

import me.darrionat.pluginlib.Plugin;
import me.darrionat.pluginlib.commands.BaseCommand;
import me.darrionat.pluginlib.commands.SubCommand;

public class FakeSubCommand extends SubCommand {

	public FakeSubCommand(BaseCommand parentCommand, Plugin plugin) {
		super(parentCommand, plugin);
	}
	
	@Override
	public String getSubCommand() {
		// /ban list
		return "list";
	}

	@Override
	public int getRequiredArgs() {
		/*
		 * /ban list <- one argument
		 * This should always be greater than or equal to 1
		 */
		return 1;
	}

	@Override
	public boolean onlyPlayers() {
		return false;
	}

	@Override
	protected void runCommand(CommandSender sender, String[] args) {
		/*
		 * Do stuff
		 */
	}
}
```


# Configs

Page Coming Soon


# ErrorHandler

Page Coming Soon


# Gui

Page Coming Soon


# SpigotMC Bot

A bot with the ability to watch plugin updates and post them to a channel

{% hint style="warning" %}
Notice: This bot utilizes both Spiget and SpigotMC api. SpigotMC's api may take a multiple hours for the version to be updated after a resource is updated. This means that the bot may not post updates for a few hours after an update is created on SpigotMC.
{% endhint %}

![](https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M9n-0Y0yEEWX5pAPgOG%2F-M9n-9LZaeW7iTwzL7nJ%2Fspigot.png?alt=media\&token=36850352-f70b-434c-9b05-faeb2f2d85c6)

## Description

The SpigotMC bot created by Darrionat is able to track plugin updates, look up plugins, and more! \
SpigotMC bot utilizes DiscordJS.

## [Invite Link](https://discord.com/oauth2/authorize?client_id=603751943982153740\&scope=bot\&permissions=8)

## [Source Code](https://github.com/Darrionat/PluginBot)

{% content-ref url="/pages/-M9nePyuUck82wUon2nm" %}
[Commands](/discord-bot/spigotmc-bot/commands)
{% endcontent-ref %}


# Commands

List of commands and their functionalities

{% hint style="info" %}
All commands use the 'p!' prefix
{% endhint %}

### General Commands

These commands do not require any permissions

| Command                     | Description                                                                                                           |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| p!help \[Optional: command] | <p>p!help: Displays the list of commands</p><p>p!help \[command]: Gives information about a specified command</p>     |
| p!invite                    | Gives a link to invite the bot to a server                                                                            |
| p!ping                      | Returns the bot's ping                                                                                                |
| p!plugin \[resource\_id]    | Gives information about a specific resource                                                                           |
| p!stats                     | Shows some bot statistics                                                                                             |
| p!wiki                      | Sends a link to this wiki                                                                                             |
| p!search \[resource\_name]  | Searches for the top resources with the given name. Use -n \[size] at the end of the command to increase search size. |

### Administrator Commands

These commands all require the Administrator permission

| Command                           | Description                                                                     |
| --------------------------------- | ------------------------------------------------------------------------------- |
| p!add \[resource\_id] \[#channel] | Starts to watch for plugin updates and will post updates in the defined channel |
| p!list                            | Gives a list of watched resources and their channels to post in                 |
| p!remove \[resource\_id]          | Stops watching a resource in its defined channel                                |


