mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 13:14:44 +02:00
Add Serializer for Repairable
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
/*
|
||||
package com.gmail.nossr50.skills.repair.repairables;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import org.bukkit.Material;
|
||||
|
||||
|
||||
public class RepairableFactory {
|
||||
public static Repairable getRepairable(Material itemMaterial, Material repairMaterial, byte repairMetadata, int minimumQuantity, short maximumDurability) {
|
||||
return getRepairable(itemMaterial, repairMaterial, repairMetadata, null, 0, minimumQuantity, maximumDurability, ItemType.OTHER, MaterialType.OTHER, 1);
|
||||
}
|
||||
|
||||
public static Repairable getRepairable(Material itemMaterial, Material repairMaterial, byte repairMetadata, int minimumLevel, int minimumQuantity, short maximumDurability, ItemType repairItemType, MaterialType repairMaterialType, double xpMultiplier) {
|
||||
return getRepairable(itemMaterial, repairMaterial, repairMetadata, null, minimumLevel, minimumQuantity, maximumDurability, repairItemType, repairMaterialType, xpMultiplier);
|
||||
}
|
||||
|
||||
public static Repairable getRepairable(Material itemMaterial, Material repairMaterial, byte repairMetadata, String repairMaterialPrettyName, int minimumLevel, int minimumQuantity, short maximumDurability, ItemType repairItemType, MaterialType repairMaterialType, double xpMultiplier) {
|
||||
// TODO: Add in loading from config what type of repairable we want.
|
||||
return new SimpleRepairable(itemMaterial, repairMaterial, repairMetadata, repairMaterialPrettyName, minimumLevel, minimumQuantity, maximumDurability, repairItemType, repairMaterialType, xpMultiplier);
|
||||
}
|
||||
}
|
||||
*/
|
@ -1,62 +0,0 @@
|
||||
/*
|
||||
package com.gmail.nossr50.skills.repair.repairables;
|
||||
|
||||
import com.gmail.nossr50.config.Unload;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RepairableManager extends Unload {
|
||||
*/
|
||||
/**
|
||||
* Register a repairable with the RepairManager
|
||||
*
|
||||
* @param repairable Repairable to register
|
||||
*//*
|
||||
|
||||
public void registerRepairable(Repairable repairable);
|
||||
|
||||
*/
|
||||
/**
|
||||
* Register a list of repairables with the RepairManager
|
||||
*
|
||||
* @param repairables List<Repairable> to register
|
||||
*//*
|
||||
|
||||
public void registerRepairables(List<Repairable> repairables);
|
||||
|
||||
*/
|
||||
/**
|
||||
* Checks if an item is repairable
|
||||
*
|
||||
* @param type Material to check if repairable
|
||||
*
|
||||
* @return true if repairable, false if not
|
||||
*//*
|
||||
|
||||
public boolean isRepairable(Material type);
|
||||
|
||||
*/
|
||||
/**
|
||||
* Checks if an item is repairable
|
||||
*
|
||||
* @param itemStack Item to check if repairable
|
||||
*
|
||||
* @return true if repairable, false if not
|
||||
*//*
|
||||
|
||||
public boolean isRepairable(ItemStack itemStack);
|
||||
|
||||
*/
|
||||
/**
|
||||
* Gets the repairable with this type
|
||||
*
|
||||
* @param type Material of the repairable to look for
|
||||
*
|
||||
* @return the repairable, can be null
|
||||
*//*
|
||||
|
||||
public Repairable getRepairable(Material type);
|
||||
}
|
||||
*/
|
Reference in New Issue
Block a user