Package org.bukkit.entity

# Class Player.Spigot

java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
org.bukkit.entity.Player.Spigot

Enclosing interface:
  Player

public static class Player.Spigot extends Entity.Spigot

## Constructor Summary

Constructors
Constructor
Description
`Spigot()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`getCollidesWithEntities()`
Deprecated.
see `LivingEntity.isCollidable()`
`Set<Player>`
`getHiddenPlayers()`
Gets all players hidden with `Player.hidePlayer(org.bukkit.entity.Player)`.
`int`
`getPing()`
`@NotNull InetSocketAddress`
`getRawAddress()`
Gets the connection address of this player, regardless of whether it has been spoofed or not.
`void`
`respawn()`
Respawns the player if dead.
`void`
`sendMessage(@NotNull BaseComponent... components)`
Deprecated.
`void`
`sendMessage(BaseComponent component)`
Deprecated.
`void`
`sendMessage(ChatMessageType position, @NotNull BaseComponent... components)`
Deprecated.
This is unlikely the API you want to use.
`void`
`sendMessage(ChatMessageType position, @Nullable UUID sender, @NotNull BaseComponent... components)`
Deprecated.
use `sendMessage` methods that accept `Component`
`void`
`sendMessage(ChatMessageType position, @Nullable UUID sender, BaseComponent component)`
Deprecated.
use `sendMessage` methods that accept `Component`
`void`
`sendMessage(ChatMessageType position, BaseComponent component)`
Deprecated.
This is unlikely the API you want to use.
`void`
`setCollidesWithEntities(boolean collides)`
Deprecated.
`LivingEntity.setCollidable(boolean)`

### Methods inherited from class org.bukkit.command.CommandSender.Spigot

`sendMessage, sendMessage`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Spigot

public Spigot()

## Method Details

### getRawAddress

@NotNull public @NotNull InetSocketAddress getRawAddress()
Gets the connection address of this player, regardless of whether it has been spoofed or not.

Returns:
  the player's connection address

### getCollidesWithEntities

@Deprecated public boolean getCollidesWithEntities()
Deprecated.
see `LivingEntity.isCollidable()`
Gets whether the player collides with entities

Returns:
  the player's collision toggle state

### setCollidesWithEntities

@Deprecated public void setCollidesWithEntities(boolean collides)
Deprecated.
`LivingEntity.setCollidable(boolean)`
Sets whether the player collides with entities

Parameters:
  `collides` - whether the player should collide with entities or not.

### respawn

public void respawn()
Respawns the player if dead.

### getHiddenPlayers

@NotNull public Set<Player> getHiddenPlayers()
Gets all players hidden with `Player.hidePlayer(org.bukkit.entity.Player)`.

Returns:
  a Set with all hidden players

### sendMessage

@Deprecated public void sendMessage(@NotNull BaseComponent component)
Deprecated.
Description copied from class: `CommandSender.Spigot`
Sends this sender a chat component.

Overrides:
  `sendMessage` in class `CommandSender.Spigot`
Parameters:
  `component` - the components to send

### sendMessage

@Deprecated public void sendMessage(@NotNull @NotNull BaseComponent... components)
Deprecated.
Description copied from class: `CommandSender.Spigot`
Sends an array of components as a single message to the sender.

Overrides:
  `sendMessage` in class `CommandSender.Spigot`
Parameters:
  `components` - the components to send

### sendMessage

@Deprecated public void sendMessage(@NotNull ChatMessageType position, @NotNull BaseComponent component)
Deprecated.
This is unlikely the API you want to use. See `Player.sendActionBar(String)` for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
Sends the component to the specified screen position of this player

Parameters:
  `position` - the screen position
  `component` - the components to send

### sendMessage

@Deprecated public void sendMessage(@NotNull ChatMessageType position, @NotNull @NotNull BaseComponent... components)
Deprecated.
This is unlikely the API you want to use. See `Player.sendActionBar(String)` for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
Sends an array of components as a single message to the specified screen position of this player

Parameters:
  `position` - the screen position
  `components` - the components to send

### sendMessage

@Deprecated public void sendMessage(@NotNull ChatMessageType position, @Nullable @Nullable UUID sender, @NotNull BaseComponent component)
Deprecated.
use `sendMessage` methods that accept `Component`
Sends the component to the specified screen position of this player

Parameters:
  `position` - the screen position
  `sender` - the sender of the message
  `component` - the components to send

### sendMessage

@Deprecated public void sendMessage(@NotNull ChatMessageType position, @Nullable @Nullable UUID sender, @NotNull @NotNull BaseComponent... components)
Deprecated.
use `sendMessage` methods that accept `Component`
Sends an array of components as a single message to the specified screen position of this player

Parameters:
  `position` - the screen position
  `sender` - the sender of the message
  `components` - the components to send

### getPing

public int getPing()