Class TeleportPlayerIterator

java.lang.Object
com.sk89q.commandbook.util.entity.player.iterators.PlayerIteratorAction
com.sk89q.commandbook.util.entity.player.iterators.TeleportPlayerIterator

public class TeleportPlayerIterator
extends PlayerIteratorAction
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.bukkit.Location loc  
    protected org.bukkit.Location oldLoc  
    protected boolean[] relative  
    protected boolean silent  

    Fields inherited from class com.sk89q.commandbook.util.entity.player.iterators.PlayerIteratorAction

    sender
  • Constructor Summary

    Constructors 
    Constructor Description
    TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, LocationTarget target, boolean silent)  
    TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, org.bukkit.Location loc)  
    TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, org.bukkit.Location loc, boolean silent)  
    TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, org.bukkit.Location loc, boolean silent, boolean[] relative)  
  • Method Summary

    Modifier and Type Method Description
    void onCaller​(org.bukkit.entity.Player player)
    Called when the caller is affected by the action.
    void onInformMany​(org.bukkit.command.CommandSender sender, int affected)
    Called on operation complete if more than one player was affected and the caller was also not affected or the caller was console.
    void onVictim​(org.bukkit.command.CommandSender sender, org.bukkit.entity.Player player)
    Called when a player is a victim and is not the caller.
    java.util.concurrent.CompletableFuture<java.lang.Boolean> perform​(org.bukkit.entity.Player player)
    Perform the action.
    java.util.concurrent.CompletableFuture<java.lang.Boolean> teleport​(org.bukkit.entity.Player player, org.bukkit.Location newLoc)  

    Methods inherited from class com.sk89q.commandbook.util.entity.player.iterators.PlayerIteratorAction

    getSender, iterate, onComplete, onInform

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • loc

      protected final org.bukkit.Location loc
    • oldLoc

      protected org.bukkit.Location oldLoc
    • silent

      protected final boolean silent
    • relative

      protected final boolean[] relative
  • Constructor Details

    • TeleportPlayerIterator

      public TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, org.bukkit.Location loc)
    • TeleportPlayerIterator

      public TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, org.bukkit.Location loc, boolean silent)
    • TeleportPlayerIterator

      public TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, org.bukkit.Location loc, boolean silent, boolean[] relative)
    • TeleportPlayerIterator

      public TeleportPlayerIterator​(org.bukkit.command.CommandSender sender, LocationTarget target, boolean silent)
  • Method Details

    • perform

      public java.util.concurrent.CompletableFuture<java.lang.Boolean> perform​(org.bukkit.entity.Player player)
      Description copied from class: PlayerIteratorAction
      Perform the action.
      Specified by:
      perform in class PlayerIteratorAction
    • teleport

      public java.util.concurrent.CompletableFuture<java.lang.Boolean> teleport​(org.bukkit.entity.Player player, org.bukkit.Location newLoc)
    • onCaller

      public void onCaller​(org.bukkit.entity.Player player)
      Description copied from class: PlayerIteratorAction
      Called when the caller is affected by the action.
      Specified by:
      onCaller in class PlayerIteratorAction
    • onVictim

      public void onVictim​(org.bukkit.command.CommandSender sender, org.bukkit.entity.Player player)
      Description copied from class: PlayerIteratorAction
      Called when a player is a victim and is not the caller.
      Specified by:
      onVictim in class PlayerIteratorAction
    • onInformMany

      public void onInformMany​(org.bukkit.command.CommandSender sender, int affected)
      Description copied from class: PlayerIteratorAction
      Called on operation complete if more than one player was affected and the caller was also not affected or the caller was console.
      Overrides:
      onInformMany in class PlayerIteratorAction