Minor improvements

This commit is contained in:
TfT_02 2013-09-19 21:41:33 +02:00
parent f71b302f6f
commit 834e26b44e
4 changed files with 7 additions and 2 deletions

View File

@ -29,6 +29,7 @@ public class Repair {
* Checks if the item is salvageable. * Checks if the item is salvageable.
* *
* @param item Item to check * @param item Item to check
*
* @return true if the item is salvageable, false otherwise * @return true if the item is salvageable, false otherwise
*/ */
public static boolean isSalvageable(ItemStack item) { public static boolean isSalvageable(ItemStack item) {

View File

@ -19,6 +19,7 @@ public enum RepairMaterialType {
* Get the base permissions associated with this RepairMaterialType. * Get the base permissions associated with this RepairMaterialType.
* *
* @param player The player to check the permissions for * @param player The player to check the permissions for
*
* @return true if the player has permissions, false otherwise * @return true if the player has permissions, false otherwise
*/ */
public boolean getPermissions(Player player) { public boolean getPermissions(Player player) {

View File

@ -24,6 +24,7 @@ public interface RepairableManager {
* Checks if an item is repairable * Checks if an item is repairable
* *
* @param type Material to check if repairable * @param type Material to check if repairable
*
* @return true if repairable, false if not * @return true if repairable, false if not
*/ */
public boolean isRepairable(Material type); public boolean isRepairable(Material type);
@ -32,6 +33,7 @@ public interface RepairableManager {
* Checks if an item is repairable * Checks if an item is repairable
* *
* @param itemStack Item to check if repairable * @param itemStack Item to check if repairable
*
* @return true if repairable, false if not * @return true if repairable, false if not
*/ */
public boolean isRepairable(ItemStack itemStack); public boolean isRepairable(ItemStack itemStack);
@ -40,6 +42,7 @@ public interface RepairableManager {
* Gets the repairable with this type * Gets the repairable with this type
* *
* @param type Material of the repairable to look for * @param type Material of the repairable to look for
*
* @return the repairable, can be null * @return the repairable, can be null
*/ */
public Repairable getRepairable(Material type); public Repairable getRepairable(Material type);

View File

@ -37,7 +37,7 @@ public class RepairConfig extends ConfigLoader {
for (String key : keys) { for (String key : keys) {
if (config.contains("Repairables." + key + ".ItemId")) { 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("You should delete your current file and allow a new one to generate.");
plugin.getLogger().warning("Repair will not work properly until you do."); plugin.getLogger().warning("Repair will not work properly until you do.");
return; 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)); short maximumDurability = (config.contains("Repairables." + key + ".MaximumDurability") ? (short) config.getInt("Repairables." + key + ".MaximumDurability") : (itemMaterial != null ? itemMaterial.getMaxDurability() : 0));
if (maximumDurability <= 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 // Item Type