mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-23 04:47:34 +01:00
!Small refactor
This commit is contained in:
parent
30906b102a
commit
d975908e10
@ -9,8 +9,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
import net.Indyuce.mmoitems.api.crafting.ConfigMMOItem;
|
||||
import net.Indyuce.mmoitems.api.crafting.CraftingStation;
|
||||
import net.Indyuce.mmoitems.api.crafting.CraftingStatus.CraftingQueue;
|
||||
import net.Indyuce.mmoitems.api.event.PlayerUseCraftingStationEvent;
|
||||
import net.Indyuce.mmoitems.api.crafting.IngredientInventory;
|
||||
import net.Indyuce.mmoitems.api.event.crafting.PlayerUseCraftingStationEvent;
|
||||
import net.Indyuce.mmoitems.api.item.util.ConfigItem;
|
||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||
import net.Indyuce.mmoitems.api.util.message.Message;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.Indyuce.mmoitems.api.event.blocks;
|
||||
package net.Indyuce.mmoitems.api.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import net.Indyuce.mmoitems.api.block.CustomBlock;
|
||||
import net.Indyuce.mmoitems.api.event.PlayerDataEvent;
|
||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||
|
||||
public class CustomBlockDropEvent extends PlayerDataEvent {
|
@ -1,4 +1,4 @@
|
||||
package net.Indyuce.mmoitems.api.event.crafting;
|
||||
package net.Indyuce.mmoitems.api.event;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.event.HandlerList;
|
||||
@ -7,7 +7,6 @@ import net.Indyuce.mmoitems.api.crafting.CraftingStation;
|
||||
import net.Indyuce.mmoitems.api.crafting.recipe.CraftingRecipe;
|
||||
import net.Indyuce.mmoitems.api.crafting.recipe.Recipe;
|
||||
import net.Indyuce.mmoitems.api.crafting.recipe.RecipeInfo;
|
||||
import net.Indyuce.mmoitems.api.event.PlayerDataEvent;
|
||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||
|
||||
public class PlayerUseCraftingStationEvent extends PlayerDataEvent {
|
@ -1,50 +0,0 @@
|
||||
package net.Indyuce.mmoitems.api.event.crafting;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import net.Indyuce.mmoitems.api.crafting.condition.Condition;
|
||||
|
||||
public class ConditionLoadEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final String format;
|
||||
private final String[] args;
|
||||
|
||||
private Condition condition;
|
||||
|
||||
/*
|
||||
* based on mythic mobs registration API, this event is called whenever a
|
||||
* condition is loaded. if the event doesn't return anything then the
|
||||
* condition could not be loaded.
|
||||
*/
|
||||
public ConditionLoadEvent(String format, String[] args) {
|
||||
this.format = format;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public void register(Condition condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
public Condition getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public String[] getArguments() {
|
||||
return args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package net.Indyuce.mmoitems.api.event.crafting;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import net.Indyuce.mmoitems.api.crafting.ingredient.Ingredient;
|
||||
|
||||
public class IngredientLoadEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final String format;
|
||||
private final String[] args;
|
||||
|
||||
private Ingredient ingredient;
|
||||
|
||||
/*
|
||||
* based on mythic mobs registration API, this event is called whenever a
|
||||
* ingredient is loaded. if the event doesn't return anything then the
|
||||
* ingredient could not be loaded.
|
||||
*/
|
||||
public IngredientLoadEvent(String format, String[] args) {
|
||||
this.format = format;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public void register(Ingredient ingredient) {
|
||||
this.ingredient = ingredient;
|
||||
}
|
||||
|
||||
public Ingredient getIngredient() {
|
||||
return ingredient;
|
||||
}
|
||||
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public String[] getArguments() {
|
||||
return args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ import net.Indyuce.mmoitems.api.crafting.ingredient.Ingredient;
|
||||
import net.Indyuce.mmoitems.api.crafting.recipe.CraftingRecipe;
|
||||
import net.Indyuce.mmoitems.api.crafting.recipe.Recipe;
|
||||
import net.Indyuce.mmoitems.api.crafting.recipe.RecipeInfo;
|
||||
import net.Indyuce.mmoitems.api.event.crafting.PlayerUseCraftingStationEvent;
|
||||
import net.Indyuce.mmoitems.api.event.PlayerUseCraftingStationEvent;
|
||||
import net.Indyuce.mmoitems.api.item.util.ConfigItem;
|
||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||
import net.Indyuce.mmoitems.api.util.message.Message;
|
||||
|
@ -27,7 +27,7 @@ import net.Indyuce.mmoitems.MMOItems;
|
||||
import net.Indyuce.mmoitems.api.ConfigFile;
|
||||
import net.Indyuce.mmoitems.api.block.CustomBlock;
|
||||
import net.Indyuce.mmoitems.api.droptable.DropTable;
|
||||
import net.Indyuce.mmoitems.api.event.blocks.CustomBlockDropEvent;
|
||||
import net.Indyuce.mmoitems.api.event.CustomBlockDropEvent;
|
||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||
import net.Indyuce.mmoitems.listener.CustomBlockListener;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user