Creating a New Weapon
Create a new .yml file inside the weapons folder. For example, to create a katana, make a file named katana.yml.
Each weapon needs an ID, base material, custom model data, model name, display name, damage, speed, and durability.
id: katana # Must match the file name and model name. Use lowercase only.
base-material: PAPER
custom-model-data: 10001
model: katana # Model file name
name: "&6Katana"
damage: 8.0
speed: 1.6
durability: 150
The id should be simple and lowercase. Good examples are katana, fire_sword, or dash_dagger.
Abilities
Abilities let weapons do special actions when the player left clicks or right clicks.
There are 4 possible ways to activate an ability: right-click, left-click, shift-right-click, and shift-left-click
Example:
abilities:
right-click:
enabled: true
type: LAUNCH_FORWARD
power: 2.4
cooldown: 8
damage: 20.0 # How much damage an ability should deal
durability-cost: 1
message: "&bYou dashed forward!"
enabled turns the ability on or off. type chooses the ability. power controls how strong it is. cooldown controls how many seconds the player must wait before using it again. durability-cost controls how much durability is removed when the ability is used.
Available ability types: (Suggestions are highly appreciated ❤️)
LAUNCH_UP
LAUNCH_FORWARD
HEAL
LIGHTNING
EXPLOSION
FIREBALL
POISON_CLOUD
FREEZE_BLAST
BLINDING_FLASH
WITHER_CURSE
LIFE_STEAL
GROUND_SLAM
TORNADO
PUSH_AWAY
PULL_ENEMIES
METEOR_STRIKE
BLOOD_SLASH
ENDER_STEP
SMOKE_SCREEN
FIRE_RING
ICE_PRISON
THUNDER_DASH
SOUL_BURST
VENOM_STRIKE
RAGE_MODE
GUARDIAN_SHIELD
STAR_FALL
SAND_STORM
WATER_BLAST
DRAGON_BREATH
PHANTOM_LEAP
Rarities
Possible rarities:
Add rarity: <type> under your weapon name
COMMON
UNCOMMON
RARE
EPIC
LEGENDARY
MYTHIC
Durability
Durability controls how many times the weapon can be used before it breaks.
durability: 150
attack-durability-cost: 1
durability is the max durability. attack-durability-cost is how much durability is removed when the weapon hits something.
You can also set durability cost for each ability:
abilities:
right-click:
durability-cost: 2
If durability-cost is set to 0, the ability will not remove durability.
Cooldowns
Cooldowns stop players from spamming abilities.
cooldown: 8 # in seconds
The cooldown also shows on the item in the hotbar, just like a regular Minecraft item cooldown.
Recipes
Recipes let players craft custom weapons.
recipe:
enabled: true
shape:
- " I " # Include a space ' ' to leave that slot empty
- " I "
- " S "
ingredients:
I:
material: IRON_INGOT
amount: 1
S:
material: STICK
amount: 1
The recipe shape must have exactly 3 rows. Each letter in the shape must match an ingredient below it.
Models & Textures
Put model files in:
plugins/funcysUltimateCustomWeapons/uploads/models/item
Put texture files in:
plugins/funcysUltimateCustomWeapons/uploads/textures/item
The weapon’s model value must match the model file name.
model: katana
This means the model file should be named:
katana.json
Video Example:
a
Full Example
id: katana
base-material: PAPER
custom-model-data: 10001
model: katana
name: "&6Katana"
lore:
- "&eRight click to dash forward."
amount: 1
damage: 8.0
speed: 1.6
durability: 150
attack-durability-cost: 1
stackable: false
max-stack-size: 1
abilities:
right-click:
enabled: true
type: LAUNCH_FORWARD
power: 2.4
cooldown: 8
durability-cost: 1
message: "&bYou dashed forward!"
recipe:
enabled: true
shape:
- " I "
- " I "
- " S "
ingredients:
I:
material: IRON_INGOT
amount: 1
S:
material: STICK
amount: 1