Skip to content

Weapons

WARNING

This plugin is brand new and still in development. The docs may be incomplete or outdated, if this is the case please contact us here

Your first Godly Weapon

To get started open the weapons config at plugins/GodlyWeapons/weapons.yaml

As an example, we will create a diamond sword that when right clicked will give the holder strength 1 for 15 seconds.
Inside of the weapons.yaml there will be a “weapons” field. This is a list of all the custom weapons you have. For this tutorial I will add an item to this list.

weapons:
- displayName: "<gold>Godly Sword" # Any in game messages/names can have MiniMessage formatting.
lore:
- "<gray>A simple godly sword that will enhance the"
- "<gray>holders abilities."
- ""
- "<bold><#d4af37>ʟᴇɢᴇɴᴅᴀʀʏ"
customModelData: 500 # Custom model data is fully supported so your weapons can have custom textures.
material: "DIAMOND_SWORD"
abilities: []

In this new weapon you can see that we are using a custom model data 500 which will allow you to texture your weapon using texture packs.
We are also using the MiniMessage format which allows us to color & format text however we would like. You can view the format here and there is a visual editor available here.

At the moment, the weapon we have just created is only visual with a custom name, lore, and model data. But we want this weapon to have custom abilities, so how can we achieve this?

weapons:
- displayName: "<gold>Godly Sword"
lore:
- "<gray>A simple godly sword that will enhance the"
- "<gray>holders abilities."
- ""
- "<bold><#d4af37>ʟᴇɢᴇɴᴅᴀʀʏ"
customModelData: 500
material: "DIAMOND_SWORD"
abilities:
- type: "potionEffect"
trigger: "RIGHT_CLICK" # Changes what the holder has to do to get the effect.
activationSound:
name: "BLOCK_NOTE_BLOCK_PLING" # Can be any of the sounds found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
volume: 0.8
pitch: 0.5
activationMessage: "<green>You are now extra strong due to your legendary weapon!"
cooldown: 30 # We don't want the user to be able to spam this, so we can add a cooldown very easily.
cooldownType: "SECONDS"
cooldownSound:
name: "BLOCK_NOTE_BLOCK_PLING"
volume: 0.8
pitch: 0.1
effect:
type: "INCREASE_DAMAGE" # Can be any effect found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
amplifier: 1
duration: 300 # Please note the duration of effects is in ticks, if you wish to use seconds then multiply the seconds by 20
activationChance: 100 # You can make it so that it is not guarenteed to activate.

As you can see, there is quite a lot of customization you can do to make your weapons feel truly unique to your server. MiniMessage is available in all messages so you can make them feel unique.