Class MmcPlayer
java.lang.Object
fr.multimc.api.spigot.common.entities.player.MmcPlayer
- All Implemented Interfaces:
IHasGameMode
,IHasSpeed
,ITeleportable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
clear
(@Nullable ClearMethod clearMethod) Clears the player's inventory and/or armorvoid
closeInventory
(@NotNull org.bukkit.inventory.Inventory inventory) boolean
boolean
feed()
@NotNull PlayerSpeed
int
double
@Nullable org.bukkit.inventory.PlayerInventory
@Nullable org.bukkit.Location
double
getName()
@Nullable net.kyori.adventure.text.Component
@Nullable org.bukkit.entity.Player
getUUID()
@NotNull PlayerSpeed
@Nullable org.bukkit.World
getWorld()
boolean
giveItem
(@NotNull ItemBuilder item) boolean
giveItems
(@NotNull ItemBuilder... items) boolean
heal()
boolean
heal
(boolean feed) boolean
isFlying()
boolean
isOnline()
void
openInventory
(@NotNull org.bukkit.inventory.Inventory inventory) boolean
sendActionBar
(@NotNull net.kyori.adventure.text.Component component) boolean
sendMessage
(@NotNull net.kyori.adventure.text.Component component) boolean
sendTitle
(@Nullable net.kyori.adventure.text.Component title, @Nullable net.kyori.adventure.text.Component subtitle) boolean
sendTitle
(@Nullable net.kyori.adventure.text.Component title, @Nullable net.kyori.adventure.text.Component subtitle, @NotNull Duration stay) boolean
sendTitle
(@Nullable net.kyori.adventure.text.Component title, @Nullable net.kyori.adventure.text.Component subtitle, @NotNull Duration fade, @NotNull Duration stay) boolean
sendTitle
(@Nullable net.kyori.adventure.text.Component title, @Nullable net.kyori.adventure.text.Component subtitle, @NotNull Duration fadeIn, @NotNull Duration stay, @NotNull Duration fadeOut) boolean
setArmor
(@NotNull org.bukkit.inventory.ItemStack[] armorContent) boolean
setBoots
(@NotNull org.bukkit.inventory.ItemStack item) boolean
setChestPlate
(@NotNull org.bukkit.inventory.ItemStack item) boolean
setFlySpeed
(@Nullable PlayerSpeed speed) boolean
setFoodLevel
(int level) boolean
setGameMode
(@NotNull org.bukkit.GameMode mode) boolean
setGameModeSync
(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.GameMode mode) boolean
setHealth
(double health) boolean
setHelmet
(@NotNull org.bukkit.inventory.ItemStack item) boolean
setItem
(@NotNull ItemBuilder item, int slot) boolean
setItem
(@NotNull org.bukkit.inventory.ItemStack item, int slot) boolean
setLeggings
(@NotNull org.bukkit.inventory.ItemStack item) boolean
setMaxHealth
(double maxHealth) boolean
setSaturation
(int level) boolean
setSpawnPoint
(@NotNull org.bukkit.Location location) boolean
setSpeed
(@Nullable PlayerSpeed speed) boolean
setWalkSpeed
(@Nullable PlayerSpeed speed) boolean
teleport
(@NotNull org.bukkit.Location location) boolean
teleport
(@NotNull org.bukkit.Location location, boolean center) boolean
teleportRelative
(@NotNull RelativeLocation location) boolean
teleportRelative
(@NotNull RelativeLocation location, boolean center) boolean
teleportRelativeSync
(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull RelativeLocation location) boolean
teleportRelativeSync
(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull RelativeLocation location, boolean center) boolean
teleportSync
(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.Location location) boolean
teleportSync
(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.Location location, boolean center) boolean
teleportTo
(@NotNull MmcPlayer target) boolean
teleportToSync
(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull MmcPlayer target)
-
Constructor Details
-
MmcPlayer
-
MmcPlayer
-
MmcPlayer
public MmcPlayer(@NotNull @NotNull org.bukkit.entity.Player player) -
MmcPlayer
public MmcPlayer(@NotNull @NotNull org.bukkit.entity.HumanEntity humanEntity)
-
-
Method Details
-
setGameMode
public boolean setGameMode(@NotNull @NotNull org.bukkit.GameMode mode) - Specified by:
setGameMode
in interfaceIHasGameMode
-
setGameModeSync
public boolean setGameModeSync(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.GameMode mode) - Specified by:
setGameModeSync
in interfaceIHasGameMode
-
setSpeed
-
setWalkSpeed
- Specified by:
setWalkSpeed
in interfaceIHasSpeed
-
setFlySpeed
- Specified by:
setFlySpeed
in interfaceIHasSpeed
-
teleportTo
- Specified by:
teleportTo
in interfaceITeleportable
-
teleportRelative
- Specified by:
teleportRelative
in interfaceITeleportable
-
teleportRelative
- Specified by:
teleportRelative
in interfaceITeleportable
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.Location location) - Specified by:
teleport
in interfaceITeleportable
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.Location location, boolean center) - Specified by:
teleport
in interfaceITeleportable
-
teleportToSync
public boolean teleportToSync(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull MmcPlayer target) - Specified by:
teleportToSync
in interfaceITeleportable
-
teleportRelativeSync
public boolean teleportRelativeSync(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull RelativeLocation location) - Specified by:
teleportRelativeSync
in interfaceITeleportable
-
teleportRelativeSync
public boolean teleportRelativeSync(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull RelativeLocation location, boolean center) - Specified by:
teleportRelativeSync
in interfaceITeleportable
-
teleportSync
public boolean teleportSync(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.Location location) - Specified by:
teleportSync
in interfaceITeleportable
-
teleportSync
public boolean teleportSync(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.Location location, boolean center) - Specified by:
teleportSync
in interfaceITeleportable
-
sendMessage
public boolean sendMessage(@NotNull @NotNull net.kyori.adventure.text.Component component) -
sendActionBar
public boolean sendActionBar(@NotNull @NotNull net.kyori.adventure.text.Component component) -
sendTitle
public boolean sendTitle(@Nullable @Nullable net.kyori.adventure.text.Component title, @Nullable @Nullable net.kyori.adventure.text.Component subtitle) -
sendTitle
public boolean sendTitle(@Nullable @Nullable net.kyori.adventure.text.Component title, @Nullable @Nullable net.kyori.adventure.text.Component subtitle, @NotNull @NotNull Duration stay) -
sendTitle
-
sendTitle
-
clear
Clears the player's inventory and/or armor- Parameters:
clearMethod
- TheClearMethod
to use to clear the player's inventory- Returns:
- true if the player was online and the inventory was cleared
-
setArmor
public boolean setArmor(@NotNull @NotNull org.bukkit.inventory.ItemStack[] armorContent) -
setHelmet
public boolean setHelmet(@NotNull @NotNull org.bukkit.inventory.ItemStack item) -
setChestPlate
public boolean setChestPlate(@NotNull @NotNull org.bukkit.inventory.ItemStack item) -
setLeggings
public boolean setLeggings(@NotNull @NotNull org.bukkit.inventory.ItemStack item) -
setBoots
public boolean setBoots(@NotNull @NotNull org.bukkit.inventory.ItemStack item) -
giveItem
-
giveItems
-
setItem
-
setItem
public boolean setItem(@NotNull @NotNull org.bukkit.inventory.ItemStack item, int slot) -
setSpawnPoint
public boolean setSpawnPoint(@NotNull @NotNull org.bukkit.Location location) -
setFoodLevel
public boolean setFoodLevel(int level) -
setSaturation
public boolean setSaturation(int level) -
setHealth
public boolean setHealth(double health) -
setMaxHealth
public boolean setMaxHealth(double maxHealth) -
feed
public boolean feed() -
heal
public boolean heal() -
heal
public boolean heal(boolean feed) -
equals
-
isOnline
public boolean isOnline() -
isFlying
public boolean isFlying() -
getPlayer
@Nullable public @Nullable org.bukkit.entity.Player getPlayer() -
getUUID
-
getName
-
getNickName
@Nullable public @Nullable net.kyori.adventure.text.Component getNickName() -
getWalkSpeed
-
getFlySpeed
-
getInventory
@Nullable public @Nullable org.bukkit.inventory.PlayerInventory getInventory() -
getLocation
@Nullable public @Nullable org.bukkit.Location getLocation() -
getWorld
@Nullable public @Nullable org.bukkit.World getWorld() -
getHealth
public double getHealth() -
getMaxHealth
public double getMaxHealth() -
getFoodLevel
public int getFoodLevel() -
openInventory
public void openInventory(@NotNull @NotNull org.bukkit.inventory.Inventory inventory) -
closeInventory
public void closeInventory(@NotNull @NotNull org.bukkit.inventory.Inventory inventory)
-