Bukkit Screen API 2016-05-06

Uses a Forge mod to get what UI you are currently using

  1. coolnickname
    Tested Minecraft Versions:
    • 1.8
    This plugin uses a Forge mod to get when a player opens an UI and when they close it. It has a simple API as described below.


    API
    Code (Text):
    Gui Object:

    gui.getName()
    gui.getSimpleName()

    Events:

    GuiOpenEvent.getGui() returns GUI
    GuiOpenEvent.getPlayer() returns Player
    GuiOpenEvent.getkillPlayer() Kills the player. for funs

    GuiCloseEvent.getGUI() returns GUI
    GuiCloseEvent.getPlayer() returns Player

    WARNING
    You can cancel the event, but that will NOT prefent the player from opening/closing the UI it will just prevent Bukkit from noticing it.

    MOD
    http://minecraft.curseforge.com/projects/bukkit-screen-api
    It's aproved. yay! \(^-^)/