[SPIGOT-4159] Player#launchProjectile(Trident.class) creating bugged tridents that crash the server if a player is close enough to pick them up (obviously after the spawned trident has landed) Created: 27/Jul/18  Updated: 27/Jul/18  Resolved: 27/Jul/18

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

Type: Bug Priority: Minor
Reporter: Spottedleaf Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.13, API, Craftbukkit, spigot
Environment:

CB:

[19:08:25 INFO]: This server is running CraftBukkit version git-Bukkit-e70d864 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)

[19:08:25 INFO]: Checking version, please wait...

[19:08:26 INFO]: You are running the latest version

 

Spigot:

[19:10:57 INFO]: This server is running CraftBukkit version git-Spigot-f68f5a8-e70d864 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)
[19:10:57 INFO]: Checking version, please wait...
[19:10:57 INFO]: You are running the latest version

 

Java:

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

 

OS:

Windows 10 v1803

 

Server:

world (contains bugged tridents, watch your step): https://www.dropbox.com/s/qsz622vt9zx1s9z/world.zip?dl=1

 

TestPlugin (source + jar):

As required for reporting 1.13 bugs, source and jar have been included in the single zip file below and is attached to this issue.

https://www.dropbox.com/s/49fjh1pb6uww4ed/testplugin.zip?dl=1


Attachments: Zip Archive testplugin.zip    
Version: [19:08:25 INFO]: This server is running CraftBukkit version git-Bukkit-e70d864 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT) [19:08:25 INFO]: Checking version, please wait... [19:08:26 INFO]: You are running the latest version
Plugin: TestPlugin
Guidelines Read: Yes

 Description   

Since the console does not have a command named "/version", I've included the output of "version" instead (this is for both spigot and craftbukkit).

The bugged tridents which were spawned did not crash the vanilla server, and nor were there any exceptions printed. This is the expected behaviour. This means this a CB/Spigot issue only.

Note that World#spawnEntity(Location, EntityType) does not create bugged tridents. The test plugin includes a method to test this as well.

 

In order to test this bug, please use a clean install of cb or spigot.

 

 

The test plugin included can be used to produce the bugged tridents. In order to do so, connect to the server running the test plugin and type "crashmepls" in chat and press enter. A trident projectile will be launched in the direction you are looking. This projectile will be bugged.

 

Alternatively, a bugged trident projectile can be spawned with the following code:

https://gist.github.com/Spottedleaf/c8811c3d13d6a7091591e4ef2c29f89a

 

In order to produce a non-bugged trident projectile (one which uses World#spawnEntity), connect to the server running the test plugin and type "dontcrashmepls" in chat and press enter. A trident projectile will be launched in the direction you are looking. This projectile will NOT be bugged.

 

 

In order to produce crash results, the following conditions MUST be met:

  1. The server is running Craftbukkit or Spigot
  2. Create a bugged trident projectile (see instructions for that above)
  3. The bugged trident projectile has landed in a block
  4. A player is close enough to the bugged trident projectile such that it could be picked up (the pickup status of the projectile is irrelevant)

An example of thoroughly following the above steps is here:

crash report: https://gist.github.com/Spottedleaf/68cdb7235c0871224629da38061d83b0

server log: https://gist.github.com/Spottedleaf/de5d9405185a4d1fe1a1b507c85c0487

For clarification purposes please note that the crash report and server log are from a single crash, and that it was produced via Spigot.

 

I've also attached the plugin and source to this issue.



 Comments   
Comment by md_5 [ 27/Jul/18 ]

Thanks for the detailed report

Generated at Sat Dec 13 15:20:03 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.