Started api and events

This commit is contained in:
Sn0wStorm
2019-10-11 20:44:43 +02:00
parent 49fb0e3d82
commit 519c4821d9
32 changed files with 1400 additions and 264 deletions
+6
View File
@@ -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) {