@@ -575,17 +575,14 @@ public static EntityCollisionWithEntityEvent createEntityCollisionWithEntity(Gam
575575 * @param cause The cause of the event, can be null
576576 * @param entity The entity involved in this event
577577 * @param location The location of death
578- * @param droppedItems The items to drop
579578 * @param exp The experience to give, or take for negative values
580579 * @return A new instance of the event
581580 */
582- public static EntityDeathEvent createEntityDeath (Game game , Cause cause , Entity entity , Location location , Collection <ItemStack > droppedItems ,
583- int exp ) {
581+ public static EntityDeathEvent createEntityDeath (Game game , Cause cause , Entity entity , Location location , int exp ) {
584582 Map <String , Object > values = Maps .newHashMap ();
585583 values .put ("game" , game );
586584 values .put ("cause" , Optional .fromNullable (cause ));
587585 values .put ("entity" , entity );
588- values .put ("droppedItems" , droppedItems );
589586 values .put ("location" , location );
590587 values .put ("exp" , exp );
591588 return createEvent (EntityDeathEvent .class , values );
@@ -632,13 +629,15 @@ public static EntityDisplaceEvent createEntityDisplace(Game game, Entity entity,
632629 * Creates a new {@link EntityDropItemEvent}.
633630 *
634631 * @param game The game instance for this {@link GameEvent}
632+ * @param cause The cause of this event
635633 * @param entity The entity involved in this event
636634 * @param droppedItems The items to drop
637635 * @return A new instance of the event
638636 */
639- public static EntityDropItemEvent createEntityDropItem (Game game , Entity entity , Collection <ItemStack > droppedItems ) {
637+ public static EntityDropItemEvent createEntityDropItem (Game game , Cause cause , Entity entity , Collection <ItemStack > droppedItems ) {
640638 Map <String , Object > values = Maps .newHashMap ();
641639 values .put ("game" , game );
640+ values .put ("cause" , Optional .fromNullable (cause ));
642641 values .put ("entity" , entity );
643642 values .put ("droppedItems" , droppedItems );
644643 return createEvent (EntityDropItemEvent .class , values );
@@ -1131,7 +1130,6 @@ public static PlayerChatEvent createPlayerChat(Game game, Player player, Command
11311130 * @param player The player involved in this event
11321131 * @param location The location of death
11331132 * @param deathMessage The message to show to the player because they died
1134- * @param droppedItems The items to drop
11351133 * @param exp The experience to give, or take for negative values
11361134 * @param newExperience The new experience the player will have towards the next level
11371135 * @param newLevel The new level the player will have after death
@@ -1140,7 +1138,7 @@ public static PlayerChatEvent createPlayerChat(Game game, Player player, Command
11401138 * @return A new instance of the event
11411139 */
11421140 public static PlayerDeathEvent createPlayerDeath (Game game , Cause cause , Player player , Location location , Text deathMessage ,
1143- Collection < ItemStack > droppedItems , int exp , int newExperience , int newLevel , boolean keepsLevel , boolean keepsInventory ) {
1141+ int exp , int newExperience , int newLevel , boolean keepsLevel , boolean keepsInventory ) {
11441142
11451143 Map <String , Object > values = Maps .newHashMap ();
11461144 values .put ("game" , game );
@@ -1152,7 +1150,6 @@ public static PlayerDeathEvent createPlayerDeath(Game game, Cause cause, Player
11521150 values .put ("location" , location );
11531151 values .put ("human" , player );
11541152 values .put ("living" , player );
1155- values .put ("droppedItems" , droppedItems );
11561153 values .put ("exp" , exp );
11571154 values .put ("newExperience" , newExperience );
11581155 values .put ("newLevel" , newLevel );
@@ -1166,12 +1163,14 @@ public static PlayerDeathEvent createPlayerDeath(Game game, Cause cause, Player
11661163 *
11671164 * @param game The game instance for this {@link GameEvent}
11681165 * @param player The player involved in this event
1166+ * @param cause The cause of the event
11691167 * @param droppedItems The items to drop
11701168 * @return A new instance of the event
11711169 */
1172- public static PlayerDropItemEvent createPlayerDropItem (Game game , Player player , Collection <ItemStack > droppedItems ) {
1170+ public static PlayerDropItemEvent createPlayerDropItem (Game game , Player player , Cause cause , Collection <ItemStack > droppedItems ) {
11731171 Map <String , Object > values = Maps .newHashMap ();
11741172 values .put ("game" , game );
1173+ values .put ("cause" , Optional .fromNullable (cause ));
11751174 values .put ("entity" , player );
11761175 values .put ("droppedItems" , droppedItems );
11771176 values .put ("player" , player );
0 commit comments