TrMenu
PurchaseGithubLicense
English
English
  • Home
  • Start
    • Install
    • Setup
  • Migrate
  • MENU
    • Structure
      • Title
      • Layout
      • Options
      • Bindings
      • Events
      • Buttons
      • Built-in Scripts
      • Tasks
    • Icons
      • Update
      • Refresh
      • Display
        • Material
        • Name
        • Lore
        • Amount
        • Glow
        • Flags
        • NBT
      • Actions
      • Priority
      • Condition
      • Inherit
  • ACTIONS
    • Types
      • Command (as Player)
      • Command (as OP)
      • Command (as CONSOLE)
      • Player's chat
      • Message
      • Tellraw
      • ActionBar
      • Title/SubTitle
      • Sound
      • Bungee Server
      • JavaScript
      • Input Catcher
        • Re-Enter
      • Useful
        • Delay
        • Break
      • Items
        • Take-Items
        • Give-Item
        • Enchant-Item
        • Repair-Item
      • Economy
        • Give-Money
        • Take-Money
        • Set-Money
        • Give-Points
        • Take-Points
        • Set-Points
      • Menu
        • Close
        • Close (Silent)
        • Open
        • Page
        • Set-Args
        • Set-Title
        • Refresh
      • Datas
        • Set-Meta
        • Rem-Meta
        • Set-Data
        • Rem-Data
    • Options
      • Delay
      • Condition
      • Chance
      • All Players
    • Action
  • SCRIPT
    • Expressions
      • stringEquals
      • stringEqualsIgnoreCase
      • isNumber
      • isOperator
      • isPlayerOperator
      • hasPermission
      • hasLevel
      • hasMoney
      • hasPoints
      • hasItem
    • Scripts
  • FUNCTIONS
    • Arguments
    • Item Identifiers
    • Script Placeholder
    • Register Commands
    • Shortcuts
    • Commands
  • HOOK
    • PlaceholderAPI
    • Cronus
    • Vault
    • PlayerPoints
    • HeadDatabase
    • Oraxen
    • SkinsRestorer
  • API
    • TrMenuAPI
    • Events
      • MenuOpenEvent
      • MenuCloseEvent
      • MenuClickEvent
    • MenuFactory
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. Events

MenuCloseEvent

package me.arasple.mc.trmenu.api.events

import io.izzel.taboolib.module.event.EventCancellable
import me.arasple.mc.trmenu.display.Menu
import org.bukkit.entity.Player

/**
 * @author Arasple
 * @date 2020/7/7 9:31
 */
class MenuCloseEvent(val player: Player, val menu: Menu, val page: Int, val reason: Reason, val silent: Boolean) : EventCancellable<MenuCloseEvent>() {

    enum class Reason {

        CONSOLE,

        OP,

        PLAYER,

        MENU_RELOAD,

        SWITCH_MENU,

        SWITCH_BUKKIT_INVENTORY,

        SWITCH_PAGE,

        ERROR;

        fun isSwitch() = this == SWITCH_MENU || this == SWITCH_PAGE || this == MENU_RELOAD

    }

}
PreviousMenuOpenEventNextMenuClickEvent

Last updated 4 years ago

Was this helpful?