Skip to content

Classes

Martin Eisengardt edited this page Sep 10, 2017 · 2 revisions

MinigamesLib - Classes

Classes are chosen by players right before a match. They allow players to get some benefit. For example you can create three classes:

  1. lets players choose a potion to jump higher

  2. lets players choose a potion to run faster

  3. gives players a stronger sword

It is up to you to create balanced classes that players choose different ones depending on their style.

To create a class add a section with some internal name inside classes.yml or edit the existing ones.

Common classes properties

Name Default Description
name - Display Name
items - The items, see description below
lore - Some detailed description displayed as text lore
requires_money false set this to true to interact with economy
money_amount 100 Money within economy System for using this class once
requires_permission false set this to true for VIP classes
permission_node - text name of the permission for VIP classes
enabled true set to false to disable this class

Special classes

Some games have special classes identifies by name. For example class "Extra_Life" allos you to get an extra live in sky wars. This is hard coded and cannot be mixed with your own custom class.

Items

Standard items

  • Multiple items will be separated by ';'. Example: "261;262" gives you a bow (id 261) and a single arrow (id 262).
  • Using a ':' character after the item id lets you declare the item variant. Example: "1:3" gives you diorite.
  • By using a '*' at the end you can set the item amount. Example: "1*20" gives you 20 stones (id 1).
  • By using a '=' at the end of the item you can create a display name. Example: "262*15=Sniper" creates 15 arrows called 'Sniper'.
  • By using a '#' you can give one or more enchantments to your items.
  • Enchantments are made of the enchantment name and the level. "262*15#KNOCKBACK:2" gives you a knockback arrow of level 2.

Crackshot

Instead using an id you can use crackshot items:

Simply use the prefix "crackshot:" with gun name, for example "crackshot:python"

potions

Instead using an id you can use potions with effects:

Simply use the prefix "potioneffect:" with effect Name, for example "potioneffect:ABSORPTION:99999#2"

The number 99999 is the time amount this potion is added and the number 2 is the potion level.

enchantments

see https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html for Details

potion effects

see https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html for Details

crackshot weapons

see https://github.com/Shampaggon/CrackShot/wiki/Default-weapons for details

examples

35:14*64;262*15=Sniper;potioneffect:ABSORPTION:99999#2

Clone this wiki locally