[SPIGOT-2779] NPE when spawning fireworks Created: 17/Nov/16  Updated: 17/Nov/16  Resolved: 17/Nov/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Sander Gielisse Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.11, bug
Environment:

Running the latest Spigot 1.11 server jar, tried on both Windows 10 and Ubuntu 14.04 running Java 8.

This server is running CraftBukkit version git-Spigot-d60de0a-a951a88 (MC: 1.11) (Implementing API version 1.11-R0.1-SNAPSHOT)



 Description   

I am using the following line of code to spawn a firework.
location.getWorld().spawn(location, Firework.class);

Which generated an exception java.lang.NullPointerException; with a stack trace as follows (executed from below to top):
at net.minecraft.server.v1_11_R1.EntityFireworks.<init>(EntityFireworks.java:33) ~[spigot.jar:git-Spigot-d60de0a-a951a88]
at org.bukkit.craftbukkit.v1_11_R1.CraftWorld.createEntity(CraftWorld.java:1150) ~[spigot.jar:git-Spigot-d60de0a-a951a88]
at org.bukkit.craftbukkit.v1_11_R1.CraftWorld.spawn(CraftWorld.java:1183) ~[spigot.jar:git-Spigot-d60de0a-a951a88]
at org.bukkit.craftbukkit.v1_11_R1.CraftWorld.spawn(CraftWorld.java:850) ~[spigot.jar:git-Spigot-d60de0a-a951a88]


Generated at Thu Apr 03 15:33:19 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.