Fix test
This commit is contained in:
parent
80d8867eb0
commit
40b110f835
|
@ -354,7 +354,7 @@ public class WarpSignsManager {
|
|||
//By checking if the teleport succeeded before sending the messages,
|
||||
//we prevent issues where no one teleported, but people still
|
||||
//get messages about it.
|
||||
Util.teleportAsync(user.getPlayer(), actualWarp, TeleportCause.COMMAND).whenComplete((tpResult, ignored) -> {
|
||||
Util.teleportAsync(user.getPlayer(), actualWarp, TeleportCause.COMMAND).thenAccept(tpResult -> {
|
||||
if(!tpResult) return;
|
||||
|
||||
User warpOwner = Objects.requireNonNull(User.getInstance(signOwner));
|
||||
|
|
|
@ -428,6 +428,7 @@ public class WarpSignsManagerTest {
|
|||
when(p.getLocation()).thenReturn(location);
|
||||
@Nullable
|
||||
User u = User.getInstance(p);
|
||||
PowerMockito.when(Util.teleportAsync(any(), any(), any())).thenReturn(CompletableFuture.completedFuture(true));
|
||||
wsm.warpPlayer(world, u, uuid);
|
||||
PowerMockito.verifyStatic(Util.class);
|
||||
Util.teleportAsync(eq(p), any(), eq(TeleportCause.COMMAND));
|
||||
|
|
Loading…
Reference in New Issue