Rubix Development | Documentation
Support DiscordLicense Dashboard
  • 👋Welcome to the Rubix Development documentation
  • Overview
    • 🔶Licensing system
  • Plugins
    • 🥘RubixPearls
      • 🎍API Documentation
        • 🪝API Hooks
        • 😎Cooldowns
        • ⚡Events
  • Spigots
    • 🧊RubixSpigot
Powered by GitBook
On this page
  • PlayerCrossPearlEvent
  • PlayerPearlRefundEvent
  • PrePearlLaunchEvent

Was this helpful?

  1. Plugins
  2. RubixPearls
  3. API Documentation

Events

These are all the event's that can be used for RubixPearls

PlayerCrossPearlEvent

This event is called when a player is cross pearling thru a specified cross pearl block.

@EventHandler
public void onCrossPearl(PlayerCrossPearlsEvent event) {
    final Player player = event.getPlayer();
    final Location pearlFrom = event.getFrom();
    final Location pearlTo = event.getTo();
    
    // Change the to location
    event.setTo();
    
    // Cancel this event
    event.setCancelled(true);
}

PlayerPearlRefundEvent

This event is called when a pearl is refunded.

@EventHandler
public void onPlayerPearlRefund(PlayerPearlRefundEvent event) {
    final Player player = event.getWho();
    
}

PrePearlLaunchEvent

This event is called before launching an enderpearl.

@EventHandler
public void onPrePearlLaunch(PrePearlLaunchEvent event) {
    final Projectile entity = event.getEntity();
    
    // Cancel this event
    event.setCancelled(true);
}
PreviousCooldownsNextRubixSpigot

Last updated 1 year ago

Was this helpful?

🥘
🎍
⚡