Just use null.

This commit is contained in:
tastybento 2024-05-11 13:03:50 -07:00
parent 24d81da907
commit aad50eab38
3 changed files with 3 additions and 8 deletions

View File

@ -11,7 +11,6 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.damage.DamageSource;
import org.bukkit.damage.DamageType;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.junit.After;
@ -41,7 +40,7 @@ public class DeathListenerTest {
private World world;
private UUID uuid;
private IslandWorldManager iwm;
private DamageSource ds = DamageSource.builder(DamageType.ARROW).build();
private DamageSource ds = null;
@Before
public void setUp() {

View File

@ -22,7 +22,6 @@ import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.damage.DamageSource;
import org.bukkit.damage.DamageType;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
@ -73,7 +72,7 @@ public class IslandRespawnListenerTest {
@Mock
private Island island;
private DamageSource ds = DamageSource.builder(DamageType.ARROW).build();
private DamageSource ds = null;
/**
*/

View File

@ -23,8 +23,6 @@ import java.util.UUID;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.damage.DamageSource;
import org.bukkit.damage.DamageType;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.inventory.ItemStack;
@ -136,8 +134,7 @@ public class VisitorKeepInventoryListenerTest {
// Default death event
List<ItemStack> drops = new ArrayList<>();
drops.add(new ItemStack(Material.ACACIA_BOAT));
DamageSource ds = DamageSource.builder(DamageType.ARROW).build();
e = new PlayerDeathEvent(player, ds, drops, 100, 0, 0, 0, "Death message");
e = new PlayerDeathEvent(player, null, drops, 100, 0, 0, 0, "Death message");
// Make new
l = new VisitorKeepInventoryListener();
}