mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 08:39:04 +00:00
attempt to fix fletchibng crash (#52)
This commit is contained in:
@@ -227,12 +227,11 @@ public class ItemDefinitions {
|
|||||||
* Returns the weight of an item.
|
* Returns the weight of an item.
|
||||||
*/
|
*/
|
||||||
public static double getWeight(int id) {
|
public static double getWeight(int id) {
|
||||||
try {
|
if (id >= 0 && id < definitions.length)
|
||||||
return definitions[id].weight;
|
return definitions[id].weight;
|
||||||
} catch (NullPointerException noId) {
|
|
||||||
System.out.println("WARNING: id " + id + " doesn't have a definition!");
|
System.out.println("WARNING: id " + id + " doesn't have a definition!");
|
||||||
return 0;
|
return 0.0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user