mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-11-13 06:14:21 +01:00
WIP
This commit is contained in:
parent
94f0ff4e22
commit
6d4b7c2a19
2
pom.xml
2
pom.xml
@ -59,7 +59,7 @@
|
||||
<powermock.version>2.0.2</powermock.version>
|
||||
<!-- More visible way how to change dependency versions -->
|
||||
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
|
||||
<bentobox.version>1.6.0</bentobox.version>
|
||||
<bentobox.version>1.13.1</bentobox.version>
|
||||
<level.version>1.5.0</level.version>
|
||||
<!-- Revision variable removes warning about dynamic version -->
|
||||
<revision>${build.version}-SNAPSHOT</revision>
|
||||
|
@ -24,6 +24,7 @@ import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
@ -325,7 +326,7 @@ public class WarpSignsManager {
|
||||
float yaw = Util.blockFaceToFloat(directionFacing);
|
||||
final Location actualWarp = new Location(inFront.getWorld(), inFront.getBlockX() + 0.5D, inFront.getBlockY(),
|
||||
inFront.getBlockZ() + 0.5D, yaw, 30F);
|
||||
user.teleport(actualWarp);
|
||||
Util.teleportAsync(user.getPlayer(), actualWarp, TeleportCause.COMMAND);
|
||||
if (pvp) {
|
||||
user.sendMessage("protection.flags.PVP_OVERWORLD.active");
|
||||
user.getWorld().playSound(user.getLocation(), Sound.ENTITY_ARROW_HIT, 1F, 1F);
|
||||
@ -339,7 +340,7 @@ public class WarpSignsManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Warps a user to the warp owner by owner
|
||||
* Warps a user to the warp owned by owner
|
||||
*
|
||||
* @param world - world to check
|
||||
* @param user - user who is warping
|
||||
@ -421,7 +422,7 @@ public class WarpSignsManager {
|
||||
} else {
|
||||
user.getWorld().playSound(user.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 1F, 1F);
|
||||
}
|
||||
user.teleport(actualWarp);
|
||||
Util.teleportAsync(user.getPlayer(), actualWarp, TeleportCause.COMMAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.junit.After;
|
||||
@ -431,7 +432,8 @@ public class WarpSignsManagerTest {
|
||||
@Nullable
|
||||
User u = User.getInstance(p);
|
||||
wsm.warpPlayer(world, u, uuid);
|
||||
verify(p).teleport(any(Location.class));
|
||||
PowerMockito.verifyStatic(Util.class);
|
||||
Util.teleportAsync(eq(p), any(), eq(TeleportCause.COMMAND));
|
||||
verify(player).sendMessage("warps.player-warped");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user