Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check lookclose new target from event
- Loading branch information
Showing
2 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
main/src/main/java/net/citizensnpcs/editor/EquipmentGUI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package net.citizensnpcs.editor; | ||
|
||
import org.bukkit.Material; | ||
import org.bukkit.entity.HumanEntity; | ||
import org.bukkit.event.inventory.InventoryClickEvent; | ||
import org.bukkit.event.inventory.InventoryType; | ||
|
||
import net.citizensnpcs.api.gui.InventoryMenuPage; | ||
import net.citizensnpcs.api.gui.InventoryMenuSlot; | ||
import net.citizensnpcs.api.gui.Menu; | ||
import net.citizensnpcs.api.gui.MenuContext; | ||
import net.citizensnpcs.api.gui.MenuSlot; | ||
import net.citizensnpcs.api.util.Messaging; | ||
|
||
@Menu(title = "NPC Equipment", type = InventoryType.CHEST, dimensions = { 3, 3 }) | ||
public class EquipmentGUI extends InventoryMenuPage { | ||
@MenuSlot(value = { 0, 1 }, material = Material.DIAMOND_SWORD, amount = 1) | ||
private InventoryMenuSlot slot; | ||
|
||
@Override | ||
public void create(MenuContext ctx) { | ||
} | ||
|
||
@Override | ||
public void onClick(InventoryMenuSlot slot, InventoryClickEvent event) { | ||
Messaging.log(event); | ||
} | ||
|
||
@Override | ||
public void onClose(HumanEntity player) { | ||
Messaging.log("CLOSED", player); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters