mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixed NPE with repairing items that rely on metadata.
This commit is contained in:
parent
2f15c71412
commit
d644b4c331
@ -21,6 +21,7 @@ Version 1.3.09
|
||||
= Fixed bug with locale strings when trying to teleport to a non-existent player
|
||||
= Fixed bug with Tree Feller changing durability before checking for axe splintering
|
||||
= Fixed bug with Repair Mastery permission due to typo
|
||||
= Fixed bug with repairing items that use metadata
|
||||
! API methods can now only be used in a static way
|
||||
! Changed Spout settings to be in their own config file (spout.yml)
|
||||
|
||||
|
@ -205,17 +205,9 @@ public class SimpleRepairManager implements RepairManager {
|
||||
ItemStack[] contents = inventory.getContents();
|
||||
for (int i = 0; i < contents.length; i++) {
|
||||
ItemStack item = contents[i];
|
||||
|
||||
//DEBUG TIME!
|
||||
|
||||
if (item == null) {
|
||||
System.out.println("The item is null.");
|
||||
System.out.println("Content length: " + contents.length);
|
||||
System.out.println("Current contents: " + i);
|
||||
}
|
||||
else {
|
||||
System.out.println("The item is: " + item.toString());
|
||||
System.out.println("Content length: " + contents.length);
|
||||
System.out.println("Current contents: " + i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item.getTypeId() == itemId) {
|
||||
@ -223,6 +215,7 @@ public class SimpleRepairManager implements RepairManager {
|
||||
location = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (location != -1) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user