Add IceMage kit and playstyle support
Introduce a new IceMage kit and wire playstyle support across the plugin. Changes include: - Add IceMageKit with aggressive/defensive active & passive abilities, item distribution, and lifecycle hooks; caches ability instances and given items to reduce allocations. - Register IceMageKit in SpeedHG on plugin startup. - Update KitCommand to require a playstyle argument, validate it, select the kit's playstyle, and provide tab-completion for playstyles. - Extend KitEventDispatcher with IceMage-specific handlers: spawn a circular volley of snowballs on ability use (cancelling the original projectile), mark spawned snowballs with persistent data, and apply freeze/slow effects on hit. - Adjust GoblinKit to use a plugin getter and make inner ability classes static to avoid capturing the outer instance. - Update language lines and plugin.yml usage to reflect the new /kit <kitName> <playstyle> usage. These changes implement the IceMage feature and ensure proper playstyle selection and event handling while keeping allocations low and behavior consistent.
This commit is contained in:
@@ -45,9 +45,10 @@ craft:
|
||||
|
||||
commands:
|
||||
kit:
|
||||
usage: '<red>Usage: /kit <kitName></red>'
|
||||
usage: '<red>Usage: /kit <kitName> <playstyle></red>'
|
||||
kitNotFound: '<red><kit> is not a registered kit!</red>'
|
||||
selected: '<green>You have selected <kit> as your Kit!</green>'
|
||||
playstyleNotFound: '<red><playstyle> is not an available playstyle!</red>'
|
||||
selected: '<green>You have selected <kit> as your Kit with playstyle <playstyle>!</green>'
|
||||
|
||||
scoreboard:
|
||||
title: '<gradient:red:gold><bold>SpeedHG</bold></gradient>'
|
||||
|
||||
@@ -9,4 +9,4 @@ depend:
|
||||
commands:
|
||||
kit:
|
||||
description: 'Select kits via command'
|
||||
usage: '/kit <kitName>'
|
||||
usage: '/kit <kitName> <playstyle>'
|
||||
Reference in New Issue
Block a user