Available Methods
- sendMessage ( )
- hasPermission ( )
- getUniqueId ( )
- openInventory ( )
- getName ( )
- getLocation ( )
- teleport ( )
- playSound ( )
- isOnline ( )
- isOp ( )
- getGameMode ( )
- updateInventory ( )
- getWorld ( )
- closeInventory ( )
- addPotionEffect ( )
- setAllowFlight ( )
- getHealth ( )
- setHealth ( )
- hasMetadata ( )
- getInventory ( )
- sendPluginMessage ( )
- getItemInHand ( )
- setExp ( )
- setMetadata ( )
- removeMetadata ( )
- getActivePotionEffects ( )
- setVelocity ( )
- removePotionEffect ( )
- setFoodLevel ( )
- setFlying ( )
- equals ( )
- hidePlayer ( )
- getDisplayName ( )
- setGameMode ( )
- setOp ( )
- setLevel ( )
- performCommand ( )
- isSneaking ( )
- setItemInHand ( )
- getFoodLevel ( )
- setScoreboard ( )
- setMaxHealth ( )
- getScoreboard ( )
- setFireTicks ( )
- canSee ( )
- hasPotionEffect ( )
- setSaturation ( )
- isDead ( )
- kickPlayer ( )
- sendTitle ( )
- sendBlockChange ( )
- getMaxHealth ( )
- getEffectivePermissions ( )
- setExhaustion ( )
- getEyeLocation ( )
- getLevel ( )
- setFlySpeed ( )
- giveExp ( )
- isGliding ( )
- getOpenInventory ( )
- getMetadata ( )
- isInsideVehicle ( )
- getFireTicks ( )
- isValid ( )
- getAllowFlight ( )
- showPlayer ( )
- setPlayerListName ( )
- getExhaustion ( )
- getExp ( )
- chat ( )
- setFallDistance ( )
- setWalkSpeed ( )
- getVehicle ( )
- getFlySpeed ( )
- setKnockbackReduction ( )
- setCollidesWithEntities ( )
- leaveVehicle ( )
- getLocale ( )
- setCompassTarget ( )
- getSaturation ( )
- isPermissionSet ( )
- setFastNaturalRegeneration ( )
- setGliding ( )
- getPassenger ( )
- isOnGround ( )
- getTargetBlock ( )
- setItemOnCursor ( )
- isSleeping ( )
- setDisplayName ( )
Related Classes
- java.util.Arrays
- java.util.Collections
- java.util.UUID
- java.util.stream.Collectors
- java.lang.reflect.InvocationTargetException
- java.util.Optional
- java.util.logging.Level
- javax.annotation.Nullable
- com.google.common.collect.ImmutableMap
- org.jetbrains.annotations.NotNull
- org.bukkit.Bukkit
- org.bukkit.event.EventHandler
- org.bukkit.ChatColor
- org.bukkit.command.CommandSender
- org.bukkit.command.Command
- org.bukkit.Material
- org.bukkit.inventory.ItemStack
- org.bukkit.event.EventPriority
- org.bukkit.Location
- org.bukkit.World
- org.bukkit.event.Event
- org.bukkit.entity.Entity
- org.bukkit.inventory.meta.ItemMeta
- org.bukkit.block.Block
- org.bukkit.inventory.Inventory
Java Code Examples for org.bukkit.entity.Player#getFlySpeed()
The following examples show how to use
org.bukkit.entity.Player#getFlySpeed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExprSpeed.java From Skript with GNU General Public License v3.0 | 5 votes |
@Override public void change(final Event e, final @Nullable Object[] delta, final ChangeMode mode) throws UnsupportedOperationException { float input = delta == null ? 0 : ((Number) delta[0]).floatValue(); for (final Player p : getExpr().getArray(e)) { float oldSpeed = walk ? p.getWalkSpeed() : p.getFlySpeed(); float newSpeed; switch (mode) { case SET: newSpeed = input; break; case ADD: newSpeed = oldSpeed + input; break; case REMOVE: newSpeed = oldSpeed - input; break; //$CASES-OMITTED$ default: newSpeed = walk ? 0.2f : 0.1f; break; } final float d = Math2.fit(-1, newSpeed, 1); if (walk) p.setWalkSpeed(d); else p.setFlySpeed(d); } }
Example 2
Source File: LimboServiceHelper.java From AuthMeReloaded with GNU General Public License v3.0 | 5 votes |
/** * Creates a LimboPlayer with the given player's details. * * @param player the player to process * @param isRegistered whether the player is registered * @param location the player location * @return limbo player with the player's data */ LimboPlayer createLimboPlayer(Player player, boolean isRegistered, Location location) { // For safety reasons an unregistered player should not have OP status after registration boolean isOperator = isRegistered && player.isOp(); boolean flyEnabled = player.getAllowFlight(); float walkSpeed = player.getWalkSpeed(); float flySpeed = player.getFlySpeed(); Collection<String> playerGroups = permissionsManager.hasGroupSupport() ? permissionsManager.getGroups(player) : Collections.emptyList(); logger.debug("Player `{0}` has groups `{1}`", player.getName(), String.join(", ", playerGroups)); return new LimboPlayer(location, isOperator, playerGroups, flyEnabled, walkSpeed, flySpeed); }
Example 3
Source File: ExprSpeed.java From Skript with GNU General Public License v3.0 | 4 votes |
@SuppressWarnings("null") @Override public Float convert(final Player p) { return walk ? p.getWalkSpeed() : p.getFlySpeed(); }
Example 4
Source File: LimboServiceTest.java From AuthMeReloaded with GNU General Public License v3.0 | 4 votes |
private static LimboPlayer convertToLimboPlayer(Player player, Location location, Collection<String> groups) { return new LimboPlayer(location, player.isOp(), groups, player.getAllowFlight(), player.getWalkSpeed(), player.getFlySpeed()); }