Class SpectatorItemHandler
java.lang.Object
de.marcely.bedwars.api.game.spectator.SpectatorItemHandler
Handles the execution of a 
SpectatorItem.
 
 Make sure to register it with GameAPI.registerSpectatorItemHandler(SpectatorItemHandler).
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal StringgetId()Returns the id of this handler.final PluginReturns the plugin that constructed this handler.getType()Returns the type of this handler.abstract voidhandleUse(Spectator spectator, SpectatorItem item) Handles the execution of the item.final booleanReturns whether or not this handler is registered.abstract booleanisVisible(Spectator spectator, SpectatorItem item) Whether or not the item shall be shown and usable at the given circumstances.
- 
Constructor Details- 
SpectatorItemHandler- Parameters:
- id- The id of this handler, should be unique to others. Default ones start with bedwars:
- plugin- The plugin that contructs this handler
 
 
- 
- 
Method Details- 
handleUseHandles the execution of the item.- Parameters:
- spectator- The spectator who used the item
- item- The item that has been used
 
- 
isVisibleWhether or not the item shall be shown and usable at the given circumstances.- Parameters:
- spectator- The spectator to whom the item shall be added to
- item- The item to which this handler was added to
- Returns:
- trueif it shall be visible in this session
 
- 
getIdReturns the id of this handler. This one should be unique to others.It's being used by SpectatorItemto allow users to configure which exact handler they want to use for their item.- Returns:
- The id of this handler
 
- 
getPluginReturns the plugin that constructed this handler.- Returns:
- The plugin behind this handler
 
- 
getTypeReturns the type of this handler. Custom ones should returnSpectatorItemHandlerType.PLUGIN.- Returns:
- The type of this handler
 
- 
isRegisteredpublic final boolean isRegistered()Returns whether or not this handler is registered.Use GameAPI.registerSpectatorItemHandler(SpectatorItemHandler)to register it, orGameAPI.unregisterSpectatorItemHandler(SpectatorItemHandler)to unregister it.- Returns:
- trueif it's registered
 
 
-