项目作者: juampa99

项目描述 :
RPG plugin for Spigot
高级语言: Kotlin
项目地址: git://github.com/juampa99/RPGfy.git
创建时间: 2021-06-12T21:33:55Z
项目社区:https://github.com/juampa99/RPGfy

开源协议:GNU General Public License v3.0

下载


RPGfy Plugin for Spigot

RPGfy is a spigot plugin that adds a compendium of RPG elements to minecraft.

Table of contents

Features:

  • Customizable healthbars (see config.yml)
  • Custom item generator (/spawngear command)
  • Drop tables (see Droptable section)
  • Save custom items and add them to the drop tables (see Custom Items section)

Upcoming features (in order of priority):

  • Better effects for weapons
  • More types of weapons
  • Special abilities for weapons/armor
  • Questing
  • Combo effects

Commands

spawngear

Gives a custom weapon or armor to the caller

  1. /spawngear <custom_item_name>
  2. /spawngear armor <type> <name> <armor?> <armor_toughness?> <effect1?> <value1?> ... <effectN?> <valueN?>
  3. /spawngear weapon <type> <name> <damage?> <attack_speed?> <effect1?> <value1?> ... <effectN?> <valueN?>

example:
/spawngear armor helmet Cap 10 5 Repel 2

Would generate a helmet with name “Cap”, 10 armor, 5 armor toughness and repel effect

(Parameters marked with “?” are optional)


list

Shows a list of current registered effects or custom items

  1. /list <effects/items>

Droptable

Edit the droptable.yml file located in the plugins/RPGfy folder to
add custom droptables to entities.

Each entry must look like this:

  1. <mobname>:
  2. drop:
  3. item1:
  4. name: <itemname1>
  5. dropchance: <dropchancePercentage1>
  6. item2:
  7. name: <itemname2>
  8. dropchance: <dropchancePercentage2>

See droptable.yml for a real example

Supported item traits












































Trait Description Bounds Default Required
name Name of the item - Defaults to the type of the item No
type Must match the name of a custom item
or a MATERIAL, example: DIAMOND_SWORD, MyCustomArmor
- Nothing, the item won’t be created Yes
dropchance Drop chance of the item specified as percentage, example: 0.01, 1, 10 1.0E-16 - 100 Nothing, item won’t be created Yes
minQuantity Minimum amount of item that will drop if it does drop 0 - 64 0 No
maxQuantity Max amount of item that will drop if it does drop 1 - 64 1 No

Custom Items

Custom items are loaded through a config YAML file in the plugin’s configuration folder,
they can be spawned using the /spawngear command or added to a mob’s droptable.

General item traits




































Trait Description Accepts Default Required
name Name of the item Text Defaults to the type of the item No
type Must match the name of a custom item
or a MATERIAL, example: DIAMOND_SWORD, MyCustomArmor
Material or custom item name Nothing, the item won’t be created Yes
lore Item description Text Empty string No
effects Item effects, must match the type of item (an armor effect if items is armor, weapon effect if weapon is a weapon)
must be written as a list (see above for an example or in the custom_items.yml)
List of effects No effects No

Weapon-specific traits































Trait Description Accepts Default Required
damage Weapon damage 0 - inf Defaults to the damage of the type of the item No
attackSpeed Delay between attacks in seconds 0 - inf Defaults to the attack speed of the type of the item No
skin Weapon skin Red/White/Grey/Brown/Cyan Defaults to the weapon’s base skin (usually cyan) No

Armor-specific traits























Trait Description Accepts Default Required
armor Armor value 0 - inf Defaults to the armor’s base value No
armor Armor value 0 - inf Defaults to the armor’s base value No

For sake of simplicity I used “inf”, but the actual max value is 2,147,483,647 (max integer value).

Healthbar

Displays monster’s health over their head

Developers

Documentation in progress

Effects

To create new effects, go to the item/effect/entity/impl and create a new object extending either
WeaponEffect or ArmorEffect, pass the name of the effect to the parent class, and implement
methods. Remember cooldown() and duration() unit is TPS, multiply the seconds you want the
cooldown or duration to last by the constant MinecraftServer.TPS

After you’re done with your effect, go to Rpgfy (main class) and register your effect in the
method registerEffects() just like the rest.

Items

To create new item classes, create a new class extending either Weapon or ArmorPiece.

Known Issues

  • Conflagrate doesn’t work underground

Ideas

  • Taunt armor/shield effect