Package org.bukkit

Class World.Spigot

java.lang.Object
org.bukkit.World.Spigot
Enclosing interface:
World

public static class World.Spigot
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Spigot()  
  • Method Summary

    Modifier and Type Method Description
    void playEffect​(Location location, Effect effect)
    Plays an effect to all players within a default radius around a given location.
    void playEffect​(Location location, Effect effect, int id, int data, float offsetX, float offsetY, float offsetZ, float speed, int particleCount, int radius)
    Plays an effect to all players within a default radius around a given location.
    LightningStrike strikeLightning​(Location loc, boolean isSilent)
    Strikes lightning at the given Location and possibly without sound
    LightningStrike strikeLightningEffect​(Location loc, boolean isSilent)
    Strikes lightning at the given Location without doing damage and possibly without sound

    Methods inherited from class java.lang.Object

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

  • Method Details

    • playEffect

      public void playEffect​(Location location, Effect effect)
      Plays an effect to all players within a default radius around a given location.
      Parameters:
      location - the Location around which players must be to see the effect
      effect - the Effect
      Throws:
      java.lang.IllegalArgumentException - if the location or effect is null. It also throws when the effect requires a material or a material data
    • playEffect

      public void playEffect​(Location location, Effect effect, int id, int data, float offsetX, float offsetY, float offsetZ, float speed, int particleCount, int radius)
      Plays an effect to all players within a default radius around a given location. The effect will use the provided material (and material data if required). The particle's position on the client will be the given location, adjusted on each axis by a normal distribution with mean 0 and standard deviation given in the offset parameters, each particle has independently calculated offsets. The effect will have the given speed and particle count if the effect is a particle. Some effect will create multiple particles.
      Parameters:
      location - the Location around which players must be to see the effect
      effect - effect the Effect
      id - the item/block/data id for the effect
      data - the data value of the block/item for the effect
      offsetX - the amount to be randomly offset by in the X axis
      offsetY - the amount to be randomly offset by in the Y axis
      offsetZ - the amount to be randomly offset by in the Z axis
      speed - the speed of the particles
      particleCount - the number of particles
      radius - the radius around the location
    • strikeLightning

      public LightningStrike strikeLightning​(Location loc, boolean isSilent)
      Strikes lightning at the given Location and possibly without sound
      Parameters:
      loc - The location to strike lightning
      isSilent - Whether this strike makes no sound
      Returns:
      The lightning entity.
    • strikeLightningEffect

      public LightningStrike strikeLightningEffect​(Location loc, boolean isSilent)
      Strikes lightning at the given Location without doing damage and possibly without sound
      Parameters:
      loc - The location to strike lightning
      isSilent - Whether this strike makes no sound
      Returns:
      The lightning entity.