Class PlanetSharingChangeEvent

java.lang.Object
org.bukkit.event.Event
ua.mcchickenstudio.opencreative.events.CreativeEvent
ua.mcchickenstudio.opencreative.events.planet.PlanetEvent
ua.mcchickenstudio.opencreative.events.planet.PlanetSharingChangeEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PlanetSharingChangeEvent extends PlanetEvent implements org.bukkit.event.Cancellable
Called when planet's sharing mode will be changed.

If a Planet Sharing Change event is cancelled, it will not change planet's sharing.

NOTE: It's not recommended to cancel event, when the PlanetSharingChangeEvent.Cause is WORLD, because this cause is required to prevent world owner from joining the world while it's being deleted. World can be unloaded at the moment of sharing mode change.

  • Constructor Details

  • Method Details

    • getOldSharing

      public Planet.Sharing getOldSharing()
    • getNewSharing

      public Planet.Sharing getNewSharing()
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getCause

      public PlanetSharingChangeEvent.Cause getCause()