Javadocs + option to make taunts usable or not during pvp

This commit is contained in:
LCastr0 2016-12-08 03:49:59 -02:00 committed by cnr
parent 0af46005e7
commit e50b867184

View File

@ -10,22 +10,51 @@ import mineplex.core.gadget.GadgetManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
/**
* Handles Taunts
*/
public abstract class TauntGadget extends Gadget
{
/** The player that ran the taunt command */
protected Player _player;
/** The milliseconds time the taunt started playing */
protected long _started;
/** Has the taunt effect started yet? */
protected boolean _hasStarted = false;
/** Sets if this specific taunt can be used while in PvP */
private boolean _canPlayWithPvp = false;
/** Sets if this taunt needs to run on updates */
private boolean _shouldPlay = false;
/** Sets when the taunt will run, if set above */
private UpdateType _updateType = UpdateType.TICK;
/**
* @param manager The normal GadgetManager
* @param name The name of the item
* @param desc The lore/description of the item
* @param cost The cost of the item
* @param mat The display material of the item
* @param data The display data of the item
* @param alternativeSalesPackageNames Possible alternative names for this package
*/
public TauntGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data,
String... alternativeSalesPackageNames)
{
super(manager, GadgetType.TAUNT, name, desc, cost, mat, data, 1, alternativeSalesPackageNames);
}
/**
* @param manager The normal GadgetManager
* @param name The name of the item
* @param desc The lore/description of the item
* @param cost The cost of the item
* @param mat The display material of the item
* @param data The display data of the item
* @param yearMonth The year and month of this item, if it is a PPC item
* @param alternativeSalesPackageNames Possible alternative names for this package
*/
public TauntGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data,
YearMonth yearMonth, String... alternativeSalesPackageNames)
{
@ -38,6 +67,11 @@ public abstract class TauntGadget extends Gadget
public abstract void finish();
public void setCanPlayWithPvp(boolean canPlayWithPvp)
{
_canPlayWithPvp = canPlayWithPvp;
}
public void setShouldPlay(boolean shouldPlay)
{
_shouldPlay = shouldPlay;