Class PlayerAdvancementListener

java.lang.Object
org.sgrewritten.stargate.listener.PlayerAdvancementListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class PlayerAdvancementListener extends Object implements org.bukkit.event.Listener
A listener for the PlayerAdvancementCriterionEvent event
  • Constructor Details

    • PlayerAdvancementListener

      public PlayerAdvancementListener(RegistryAPI registry)
      Parameters:
      registry -

      The registry containing all portal information

  • Method Details

    • onPlayerAdvancementCriterionGrant

      public void onPlayerAdvancementCriterionGrant(com.destroystokyo.paper.event.player.PlayerAdvancementCriterionGrantEvent event)
      Listen to player advancement events, and cancel if the advancement came from touching a generated portal block

      NOTE: This has to be in a separate listener, as it'll otherwise brick other listeners when not running on a paper instance

      Parameters:
      event -

      The triggered event