Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit 8e79a66

Browse files
committed
fix NPE #51
1 parent 54d03ef commit 8e79a66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/cat/nyaa/nyaautils/elytra/FuelManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public boolean useFuel(Player player) {
7070

7171
public void updateItem(ItemStack item, int fuelID, int durability) {
7272
FuelItem fuel = plugin.cfg.fuelConfig.fuel.get(fuelID);
73+
if (fuel == null) {
74+
return;
75+
}
7376
String hex = toHexString(fuelID) + toHexString(durability) + toHexString(new Random().nextInt(65535));
7477
String str = "";
7578
for (int i = 0; i < hex.length(); i++) {

0 commit comments

Comments
 (0)