mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-19 05:51:51 +01:00
Add tests for multiple player teleport
This commit is contained in:
parent
199da71be0
commit
5f15cce3f3
@ -22,6 +22,14 @@ class TeleportCommandTest : AbstractCommandTest() {
|
||||
assertLocation(server.getWorld("otherworld")?.spawnLocation, server.getPlayer("Player1")?.location)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Teleport multiple players to other world`() {
|
||||
assertTrue(Bukkit.dispatchCommand(console, "mv tp Player1,Player2 otherworld --unsafe"))
|
||||
Thread.sleep(100) // wait for the player to teleport asynchronously
|
||||
assertLocation(server.getWorld("otherworld")?.spawnLocation, server.getPlayer("Player1")?.location)
|
||||
assertLocation(server.getWorld("otherworld")?.spawnLocation, server.getPlayer("Player2")?.location)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Player no permission to teleport`() {
|
||||
player.performCommand("mv tp otherworld")
|
||||
|
Loading…
Reference in New Issue
Block a user