Paper/CraftBukkit-Patches/0027-Firework-Meta-Crash-Fix.patch
Zach Brown 19972e09b8 Update SpigotMC's patches
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK
e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge
d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch
068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
2014-11-30 16:16:48 -06:00

32 lines
1.1 KiB
Diff

From 6bf639a2025d60282de7a822ba0bf148f71dd59a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 15 Jun 2013 21:34:48 +1000
Subject: [PATCH] Firework Meta Crash Fix
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
index 0f7da6b..5a409ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
@@ -145,7 +145,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
case BURST:
return 4;
default:
- throw new AssertionError(type);
+ throw new IllegalStateException(type.toString()); // Spigot
}
}
@@ -162,7 +162,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
case 4:
return Type.BURST;
default:
- throw new AssertionError(nbt);
+ throw new IllegalStateException(Integer.toString(nbt)); // Spigot
}
}
--
2.1.0