Added and Fixed lots of JavaDocs

This commit is contained in:
Sn0wStorm
2019-11-25 22:16:16 +01:00
parent c287b6350f
commit 16c03f9da1
32 changed files with 513 additions and 308 deletions
@@ -9,10 +9,10 @@ import org.bukkit.inventory.meta.PotionMeta;
import org.jetbrains.annotations.NotNull;
/**
* A Brew has been created or modified
* Usually happens on Filling from cauldron, distilling and aging.
* Modifications to the Brew or the PotionMeta can be done now
* Cancelling reverts the Brew to the state it was before the modification
* A Brew has been created or modified.
* <p>Usually happens on filling from cauldron, distilling and aging.
* <p>Modifications to the Brew or the PotionMeta can be done now
* <p>Cancelling reverts the Brew to the state it was before the modification
*/
public class BrewModifyEvent extends BrewEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
@@ -25,11 +25,17 @@ public class BrewModifyEvent extends BrewEvent implements Cancellable {
this.type = type;
}
/**
* Get the Type of modification being applied to the Brew.
*/
@NotNull
public Type getType() {
return type;
}
/**
* Get the BrewLore to modify lore on the Brew
*/
@NotNull
public BrewLore getLore() {
return new BrewLore(getBrew(), (PotionMeta) getItemMeta());
@@ -42,7 +48,7 @@ public class BrewModifyEvent extends BrewEvent implements Cancellable {
/**
* Setting the Event cancelled cancels all modificatons to the brew.
* Modifications to the Brew or ItemMeta will not be applied
* <p>Modifications to the Brew or ItemMeta will not be applied
*/
@Override
public void setCancelled(boolean cancelled) {
@@ -60,13 +66,44 @@ public class BrewModifyEvent extends BrewEvent implements Cancellable {
return handlers;
}
/**
* The Type of Modification being applied to the Brew.
*/
public enum Type {
CREATE, // A new Brew is created with arbitrary ways, like the create command
FILL, // Filled from a Cauldron into a new Brew
DISTILL, // Distilled in the Brewing stand
AGE, // Aged in a Barrel
UNLABEL, // Unlabeling Brew with command
STATIC, // Making Brew static with command
UNKNOWN // Unknown modification, unused
/**
* A new Brew is created with arbitrary ways, like the create command.
* <p>Cancelling this will disallow the creation
*/
CREATE,
/**
* Filled from a Cauldron into a new Brew.
*/
FILL,
/**
* Distilled in the Brewing stand.
*/
DISTILL,
/**
* Aged in a Barrel.
*/
AGE,
/**
* Unlabeling Brew with command.
*/
UNLABEL,
/**
* Making Brew static with command.
*/
STATIC,
/**
* Unknown modification, unused.
*/
UNKNOWN
}
}