mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 03:04:44 +02:00
Misc code fixes
This commit is contained in:
@ -10,28 +10,28 @@ public interface Salvageable {
|
||||
*
|
||||
* @return the type of this salvageable
|
||||
*/
|
||||
public Material getItemMaterial();
|
||||
Material getItemMaterial();
|
||||
|
||||
/**
|
||||
* Gets the material of the items dropped when salvaging this item
|
||||
*
|
||||
* @return the material of the salvage drop
|
||||
*/
|
||||
public Material getSalvageMaterial();
|
||||
Material getSalvageMaterial();
|
||||
|
||||
/**
|
||||
* Gets the ItemType value for this salvageable item
|
||||
*
|
||||
* @return the ItemType for this salvageable
|
||||
*/
|
||||
public ItemType getSalvageItemType();
|
||||
ItemType getSalvageItemType();
|
||||
|
||||
/**
|
||||
* Gets the MaterialType value for this salvageable item
|
||||
*
|
||||
* @return the MaterialType for this salvageable
|
||||
*/
|
||||
public MaterialType getSalvageMaterialType();
|
||||
MaterialType getSalvageMaterialType();
|
||||
|
||||
/**
|
||||
* Gets the maximum quantity of salvage materials ignoring all other salvage bonuses
|
||||
@ -40,14 +40,14 @@ public interface Salvageable {
|
||||
*
|
||||
* @return the maximum number of items
|
||||
*/
|
||||
public int getMaximumQuantity();
|
||||
int getMaximumQuantity();
|
||||
|
||||
/**
|
||||
* Gets the maximum durability of this item before it breaks
|
||||
*
|
||||
* @return the maximum durability
|
||||
*/
|
||||
public short getMaximumDurability();
|
||||
short getMaximumDurability();
|
||||
|
||||
/**
|
||||
* Gets the base salvage durability on which to calculate bonuses.
|
||||
@ -56,19 +56,19 @@ public interface Salvageable {
|
||||
*
|
||||
* @return the base salvage durability
|
||||
*/
|
||||
public short getBaseSalvageDurability();
|
||||
short getBaseSalvageDurability();
|
||||
|
||||
/**
|
||||
* Gets the minimum salvage level needed to salvage this item
|
||||
*
|
||||
* @return the minimum level to salvage this item, or 0 for no minimum
|
||||
*/
|
||||
public int getMinimumLevel();
|
||||
int getMinimumLevel();
|
||||
|
||||
/**
|
||||
* Gets the xpMultiplier for this salvageable
|
||||
*
|
||||
* @return the xpMultiplier of this salvageable
|
||||
*/
|
||||
public double getXpMultiplier();
|
||||
double getXpMultiplier();
|
||||
}
|
||||
|
@ -11,14 +11,14 @@ public interface SalvageableManager {
|
||||
*
|
||||
* @param salvageable Salvageable to register
|
||||
*/
|
||||
public void registerSalvageable(Salvageable salvageable);
|
||||
void registerSalvageable(Salvageable salvageable);
|
||||
|
||||
/**
|
||||
* Register a list of salvageables with the SalvageManager
|
||||
*
|
||||
* @param salvageables List<Salvageable> to register
|
||||
*/
|
||||
public void registerSalvageables(List<Salvageable> salvageables);
|
||||
void registerSalvageables(List<Salvageable> salvageables);
|
||||
|
||||
/**
|
||||
* Checks if an item is salvageable
|
||||
@ -27,7 +27,7 @@ public interface SalvageableManager {
|
||||
*
|
||||
* @return true if salvageable, false if not
|
||||
*/
|
||||
public boolean isSalvageable(Material type);
|
||||
boolean isSalvageable(Material type);
|
||||
|
||||
/**
|
||||
* Checks if an item is salvageable
|
||||
@ -36,7 +36,7 @@ public interface SalvageableManager {
|
||||
*
|
||||
* @return true if salvageable, false if not
|
||||
*/
|
||||
public boolean isSalvageable(ItemStack itemStack);
|
||||
boolean isSalvageable(ItemStack itemStack);
|
||||
|
||||
/**
|
||||
* Gets the salvageable with this type
|
||||
@ -45,5 +45,5 @@ public interface SalvageableManager {
|
||||
*
|
||||
* @return the salvageable, can be null
|
||||
*/
|
||||
public Salvageable getSalvageable(Material type);
|
||||
Salvageable getSalvageable(Material type);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||
|
||||
|
||||
public class SimpleSalvageableManager implements SalvageableManager {
|
||||
private HashMap<Material, Salvageable> salvageables;
|
||||
private final HashMap<Material, Salvageable> salvageables;
|
||||
|
||||
public SimpleSalvageableManager() {
|
||||
this(55);
|
||||
|
Reference in New Issue
Block a user