mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Minor improvements
This commit is contained in:
parent
f71b302f6f
commit
834e26b44e
@ -29,6 +29,7 @@ public class Repair {
|
||||
* Checks if the item is salvageable.
|
||||
*
|
||||
* @param item Item to check
|
||||
*
|
||||
* @return true if the item is salvageable, false otherwise
|
||||
*/
|
||||
public static boolean isSalvageable(ItemStack item) {
|
||||
|
@ -19,6 +19,7 @@ public enum RepairMaterialType {
|
||||
* Get the base permissions associated with this RepairMaterialType.
|
||||
*
|
||||
* @param player The player to check the permissions for
|
||||
*
|
||||
* @return true if the player has permissions, false otherwise
|
||||
*/
|
||||
public boolean getPermissions(Player player) {
|
||||
|
@ -24,6 +24,7 @@ public interface RepairableManager {
|
||||
* 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);
|
||||
@ -32,6 +33,7 @@ public interface RepairableManager {
|
||||
* 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);
|
||||
@ -40,6 +42,7 @@ public interface RepairableManager {
|
||||
* 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);
|
||||
|
@ -37,7 +37,7 @@ public class RepairConfig extends ConfigLoader {
|
||||
|
||||
for (String key : keys) {
|
||||
if (config.contains("Repairables." + key + ".ItemId")) {
|
||||
plugin.getLogger().warning("You are using an old version of the repair.yml file.");
|
||||
plugin.getLogger().warning("You are using an old version of the " + fileName + " file.");
|
||||
plugin.getLogger().warning("You should delete your current file and allow a new one to generate.");
|
||||
plugin.getLogger().warning("Repair will not work properly until you do.");
|
||||
return;
|
||||
@ -103,7 +103,7 @@ public class RepairConfig extends ConfigLoader {
|
||||
short maximumDurability = (config.contains("Repairables." + key + ".MaximumDurability") ? (short) config.getInt("Repairables." + key + ".MaximumDurability") : (itemMaterial != null ? itemMaterial.getMaxDurability() : 0));
|
||||
|
||||
if (maximumDurability <= 0) {
|
||||
reason.add("Maxium durability of " + key + " must be greater than 0!");
|
||||
reason.add("Maximum durability of " + key + " must be greater than 0!");
|
||||
}
|
||||
|
||||
// Item Type
|
||||
|
Loading…
Reference in New Issue
Block a user