mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Started api and events
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.dre.brewery;
|
||||
|
||||
import com.dre.brewery.api.events.brew.BrewModifyEvent;
|
||||
import com.dre.brewery.lore.BrewLore;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
@@ -120,6 +121,11 @@ public class BIngredients {
|
||||
cookedName = P.p.languageReader.get("Brew_Undefined");
|
||||
Brew.PotionColor.CYAN.colorBrew(potionMeta, potion, true);
|
||||
}
|
||||
BrewModifyEvent modifyEvent = new BrewModifyEvent(brew, BrewModifyEvent.Type.FILL);
|
||||
P.p.getServer().getPluginManager().callEvent(modifyEvent);
|
||||
if (modifyEvent.isCancelled()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
potionMeta.setDisplayName(P.p.color("&f" + cookedName));
|
||||
if (!P.use1_14) {
|
||||
|
||||
Reference in New Issue
Block a user