mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 05:05:18 +01:00
Made the /[gamemode] spawn command a delayed teleport command
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1069
This commit is contained in:
parent
fe570bd47d
commit
5bddee702e
@ -3,6 +3,7 @@ package world.bentobox.bentobox.api.commands.island;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||||
|
import world.bentobox.bentobox.api.commands.DelayedTeleportCommand;
|
||||||
import world.bentobox.bentobox.api.user.User;
|
import world.bentobox.bentobox.api.user.User;
|
||||||
import world.bentobox.bentobox.lists.Flags;
|
import world.bentobox.bentobox.lists.Flags;
|
||||||
|
|
||||||
@ -11,7 +12,7 @@ import world.bentobox.bentobox.lists.Flags;
|
|||||||
* @author Poslovitch
|
* @author Poslovitch
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public class IslandSpawnCommand extends CompositeCommand {
|
public class IslandSpawnCommand extends DelayedTeleportCommand {
|
||||||
|
|
||||||
public IslandSpawnCommand(CompositeCommand parent) {
|
public IslandSpawnCommand(CompositeCommand parent) {
|
||||||
super(parent, "spawn");
|
super(parent, "spawn");
|
||||||
@ -33,7 +34,7 @@ public class IslandSpawnCommand extends CompositeCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
getIslands().spawnTeleport(getWorld(), user.getPlayer());
|
this.delayCommand(user, () -> getIslands().spawnTeleport(getWorld(), user.getPlayer()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user