001 package org.bukkit.event.inventory; 002 003 public enum InventoryType { 004 005 /** 006 * A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type 007 * CONTAINER. 008 */ 009 CHEST(27,"Chest"), 010 /** 011 * A dispenser inventory, with 9 slots of type CONTAINER. 012 */ 013 DISPENSER(9,"Dispenser"), 014 /** 015 * A dropper inventory, with 9 slots of type CONTAINER. 016 */ 017 DROPPER(9, "Dropper"), 018 /** 019 * A furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL 020 * slot. 021 */ 022 FURNACE(3,"Furnace"), 023 /** 024 * A workbench inventory, with 9 CRAFTING slots and a RESULT slot. 025 */ 026 WORKBENCH(10,"Crafting"), 027 /** 028 * A player's crafting inventory, with 4 CRAFTING slots and a RESULT slot. 029 * Also implies that the 4 ARMOR slots are accessible. 030 */ 031 CRAFTING(5,"Crafting"), 032 /** 033 * An enchantment table inventory, with one CRAFTING slot and three 034 * enchanting buttons. 035 */ 036 ENCHANTING(1,"Enchanting"), 037 /** 038 * A brewing stand inventory, with one FUEL slot and three CRAFTING slots. 039 */ 040 BREWING(4,"Brewing"), 041 /** 042 * A player's inventory, with 9 QUICKBAR slots, 27 CONTAINER slots, and 4 043 * ARMOR slots. The ARMOUR slots may not be visible to the player, though. 044 */ 045 PLAYER(36,"Player"), 046 /** 047 * The creative mode inventory, with only 9 QUICKBAR slots and nothing 048 * else. (The actual creative interface with the items is client-side and 049 * cannot be altered by the server.) 050 */ 051 CREATIVE(9,"Creative"), 052 /** 053 * The merchant inventory, with 2 TRADE-IN slots, and 1 RESULT slot. 054 */ 055 MERCHANT(3,"Villager"), 056 /** 057 * The ender chest inventory, with 27 slots. 058 */ 059 ENDER_CHEST(27,"Ender Chest"), 060 /** 061 * An anvil inventory, with 2 CRAFTING slots and 1 RESULT slot 062 */ 063 ANVIL(3, "Repairing"), 064 /** 065 * A beacon inventory, with 1 CRAFTING slot 066 */ 067 BEACON(1, "container.beacon"), 068 /** 069 * A hopper inventory, with 5 slots of type CONTAINER. 070 */ 071 HOPPER(5, "Item Hopper"), 072 ; 073 074 private final int size; 075 private final String title; 076 077 private InventoryType(int defaultSize, String defaultTitle) { 078 size = defaultSize; 079 title = defaultTitle; 080 } 081 082 public int getDefaultSize() { 083 return size; 084 } 085 086 public String getDefaultTitle() { 087 return title; 088 } 089 090 public enum SlotType { 091 /** 092 * A result slot in a furnace or crafting inventory. 093 */ 094 RESULT, 095 /** 096 * A slot in the crafting matrix, or the input slot in a furnace 097 * inventory, the potion slot in the brewing stand, or the enchanting 098 * slot. 099 */ 100 CRAFTING, 101 /** 102 * An armour slot in the player's inventory. 103 */ 104 ARMOR, 105 /** 106 * A regular slot in the container or the player's inventory; anything 107 * not covered by the other enum values. 108 */ 109 CONTAINER, 110 /** 111 * A slot in the bottom row or quickbar. 112 */ 113 QUICKBAR, 114 /** 115 * A pseudo-slot representing the area outside the inventory window. 116 */ 117 OUTSIDE, 118 /** 119 * The fuel slot in a furnace inventory, or the ingredient slot in a 120 * brewing stand inventory. 121 */ 122 FUEL; 123 } 124 }