mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 05:28:59 +00:00
Added and Fixed lots of JavaDocs
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user