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#setGliding()
The following examples show how to use
org.bukkit.entity.Player#setGliding() .
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: EntityListenerOnePointNine.java From WorldGuardExtraFlagsPlugin with MIT License | 6 votes |
@EventHandler(ignoreCancelled = true) public void onEntityToggleGlideEvent(EntityToggleGlideEvent event) { Entity entity = event.getEntity(); if (entity instanceof Player) { Player player = (Player)entity; ApplicableRegionSet regions = this.plugin.getWorldGuardCommunicator().getRegionContainer().createQuery().getApplicableRegions(player.getLocation()); ForcedState state = WorldGuardUtils.queryValue(player, player.getWorld(), regions.getRegions(), Flags.GLIDE); if (state != ForcedState.ALLOW) { event.setCancelled(true); player.setGliding(state == ForcedState.FORCE); if (state == ForcedState.DENY) { player.teleport(player.getLocation()); } } } }
Example 2
Source File: ListenerElytra.java From CombatLogX with GNU General Public License v3.0 | 6 votes |
@EventHandler(priority= EventPriority.HIGH, ignoreCancelled=true) public void onToggleGlide(EntityToggleGlideEvent e) { if(!e.isGliding()) return; FileConfiguration config = this.expansion.getConfig("cheat-prevention.yml"); if(!config.getBoolean("items.prevent-elytra")) return; Entity entity = e.getEntity(); if(!(entity instanceof Player)) return; Player player = (Player) entity; ICombatManager combatManager = this.plugin.getCombatManager(); if(!combatManager.isInCombat(player)) return; e.setCancelled(true); player.setGliding(false); String message = this.plugin.getLanguageMessageColoredWithPrefix("cheat-prevention.elytra.no-gliding"); this.plugin.sendMessage(player, message); }
Example 3
Source File: GlideFlagHandler.java From WorldGuardExtraFlagsPlugin with MIT License | 5 votes |
private void handleValue(Player player, ForcedState state) { if (state != null) { if (state == ForcedState.ALLOW) { return; } boolean value = (state == ForcedState.FORCE ? true : false); if (player.isGliding() != value) { if (this.originalGlide == null) { this.originalGlide = player.isGliding(); } player.setGliding(value); } } else { if (this.originalGlide != null) { player.setGliding(this.originalGlide); this.originalGlide = null; } } }
Example 4
Source File: ListenerElytra.java From CombatLogX with GNU General Public License v3.0 | 5 votes |
@EventHandler(priority=EventPriority.LOWEST, ignoreCancelled=true) public void onTimerChange(PlayerCombatTimerChangeEvent e) { FileConfiguration config = this.expansion.getConfig("cheat-prevention.yml"); if(!config.getBoolean("items.prevent-elytra")) return; Player player = e.getPlayer(); if(!player.isGliding()) return; player.setGliding(false); String message = this.plugin.getLanguageMessageColoredWithPrefix("cheat-prevention.elytra.force-disabled"); this.plugin.sendMessage(player, message); }