1. /**2. * Created by chasechocolate.3. */4. public class AnvilGUI {5. private class AnvilContainer extends ContainerAnvil {6. public AnvilContainer( EntityHuman entity ){7. super( entity. inventory , entity. world , 0, 0 , 0 , entity ) ;8. }9.10. @Override11. public boolean a ( EntityHuman entityhuman ){12. return true;13. }14. }15.16. public enum AnvilSlot {17. INPUT_LEFT ( 0 ) ,18. INPUT_RIGHT ( 1 ),19. OUTPUT(2 ) ;20.21. private int slot;22.23. private AnvilSlot ( int slot ){24. this.slot = slot;25. }26.27. public int getSlot (){28. return slot;29. }30.31. public static AnvilSlot bySlot ( int slot ){32. for( AnvilSlot anvilSlot : values ()){33. if(anvilSlot. getSlot() == slot ){34. return anvilSlot;35. }36. }37.38. return null;39. }40. }41.42. public class AnvilClickEvent {43. private AnvilSlot slot;44.45. private String name;46.47. private boolean close = true;48. private boolean destroy = true;49.50. public AnvilClickEvent ( AnvilSlot slot, String name ){51. this.slot = slot;52. this.name = name;53. }54.55. public AnvilSlot getSlot (){56. return slot;57. }58.59. public String getName (){60. return name;61. }62.63. public boolean getWillClose (){64. return close;65. }66.67. public void setWillClose ( boolean close ){68. this.close = close;69. }70.71. public boolean getWillDestroy (){72. return destroy;73. }74.75. public void setWillDestroy ( boolean destroy ){76. this.destroy = destroy;77. }78. }79.80. public interface AnvilClickEventHandler {81. public void onAnvilClick ( AnvilClickEvent event ) ;82. }83.84. private Player player;85.86. private AnvilClickEventHandler handler;87.88. private HashMap<AnvilSlot, ItemStack> items = new HashMap<AnvilSlot, Ite89.90. private Inventory inv;91.92. private Listener listener;93.94. public AnvilGUI( Player player, final AnvilClickEventHandler handler ){95. this.player = player;96. this.handler = handler;Proszę tu masz gotową klasę do tego.