Guest User

Untitled

a guest
Jan 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. package zonedabone.SpoutTest;
  2.  
  3. import javax.swing.Popup;
  4.  
  5. import org.bukkit.Material;
  6. import org.bukkit.event.player.PlayerInteractEvent;
  7. import org.bukkit.event.player.PlayerListener;
  8. import org.getspout.spoutapi.SpoutManager;
  9. import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent;
  10. import org.getspout.spoutapi.event.spout.SpoutListener;
  11. import org.getspout.spoutapi.gui.Button;
  12. import org.getspout.spoutapi.gui.GenericButton;
  13. import org.getspout.spoutapi.gui.GenericItemWidget;
  14. import org.getspout.spoutapi.gui.GenericLabel;
  15. import org.getspout.spoutapi.gui.GenericPopup;
  16. import org.getspout.spoutapi.gui.GenericSlider;
  17. import org.getspout.spoutapi.gui.ItemWidget;
  18. import org.getspout.spoutapi.gui.Label;
  19. import org.getspout.spoutapi.gui.PopupScreen;
  20. import org.getspout.spoutapi.gui.RenderPriority;
  21. import org.getspout.spoutapi.gui.Slider;
  22.  
  23. public class SL extends PlayerListener {
  24.  
  25. SpoutTest plugin;
  26.  
  27. public SL(SpoutTest instance){
  28. plugin = instance;
  29. }
  30.  
  31. public void onPlayerInteract(PlayerInteractEvent e){
  32. ItemWidget button = (ItemWidget) new GenericItemWidget().setTypeId(1).setX(100).setY(100).setWidth(10).setWidth(10);
  33. button.setTypeId(1);
  34. button.setX(0);
  35. button.setY(100);
  36. button.setWidth(10);
  37. button.setHeight(10);
  38. ItemWidget button2 = (ItemWidget) new GenericItemWidget();
  39. button2.setTypeId(2);
  40. button2.setX(0);
  41. button2.setY(150);
  42. button2.setWidth(10);
  43. button2.setHeight(10);
  44. ItemWidget button3 = (ItemWidget) new GenericItemWidget();
  45. button3.setTypeId(261);
  46. button3.setX(0);
  47. button3.setY(200);
  48. button3.setWidth(10);
  49. button3.setHeight(10);
  50. System.out.println("TEST");
  51. PopupScreen popup = new GenericPopup();
  52. popup.attachWidget(plugin, button);
  53. popup.attachWidget(plugin, button2);
  54. popup.attachWidget(plugin, button3);
  55. SpoutManager.getPlayer(e.getPlayer()).getMainScreen().attachPopupScreen(popup);
  56. }
  57. }
Add Comment
Please, Sign In to add comment