mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-25 03:42:24 +00:00
Added ShopInitializedEvent
This commit is contained in:
parent
0f1d68e0c1
commit
b455db4172
@ -6,6 +6,7 @@ import com.wasteofplastic.askyblock.ASkyBlock;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.HologramFormat;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.event.ShopInitializedEvent;
|
||||
import de.epiceric.shopchest.external.PlotSquaredShopFlag;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.LocalizedMessage;
|
||||
@ -378,6 +379,7 @@ public class ShopChest extends JavaPlugin {
|
||||
public void onResult(Object result) {
|
||||
if (result instanceof Integer) {
|
||||
int count = (int) result;
|
||||
Bukkit.getServer().getPluginManager().callEvent(new ShopInitializedEvent(count));
|
||||
getLogger().info("Initialized " + count + " Shops");
|
||||
debug("Initialized " + count + " Shops");
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package de.epiceric.shopchest.event;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class ShopInitializedEvent extends Event {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private int amount;
|
||||
|
||||
public ShopInitializedEvent(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user