Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package zonedabone.SpoutTest;
- import javax.swing.Popup;
- import org.bukkit.Material;
- import org.bukkit.event.player.PlayerInteractEvent;
- import org.bukkit.event.player.PlayerListener;
- import org.getspout.spoutapi.SpoutManager;
- import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent;
- import org.getspout.spoutapi.event.spout.SpoutListener;
- import org.getspout.spoutapi.gui.Button;
- import org.getspout.spoutapi.gui.GenericButton;
- import org.getspout.spoutapi.gui.GenericItemWidget;
- import org.getspout.spoutapi.gui.GenericLabel;
- import org.getspout.spoutapi.gui.GenericPopup;
- import org.getspout.spoutapi.gui.GenericSlider;
- import org.getspout.spoutapi.gui.ItemWidget;
- import org.getspout.spoutapi.gui.Label;
- import org.getspout.spoutapi.gui.PopupScreen;
- import org.getspout.spoutapi.gui.RenderPriority;
- import org.getspout.spoutapi.gui.Slider;
- public class SL extends PlayerListener {
- SpoutTest plugin;
- public SL(SpoutTest instance){
- plugin = instance;
- }
- public void onPlayerInteract(PlayerInteractEvent e){
- ItemWidget button = (ItemWidget) new GenericItemWidget().setTypeId(1).setX(100).setY(100).setWidth(10).setWidth(10);
- button.setTypeId(1);
- button.setX(0);
- button.setY(100);
- button.setWidth(10);
- button.setHeight(10);
- ItemWidget button2 = (ItemWidget) new GenericItemWidget();
- button2.setTypeId(2);
- button2.setX(0);
- button2.setY(150);
- button2.setWidth(10);
- button2.setHeight(10);
- ItemWidget button3 = (ItemWidget) new GenericItemWidget();
- button3.setTypeId(261);
- button3.setX(0);
- button3.setY(200);
- button3.setWidth(10);
- button3.setHeight(10);
- System.out.println("TEST");
- PopupScreen popup = new GenericPopup();
- popup.attachWidget(plugin, button);
- popup.attachWidget(plugin, button2);
- popup.attachWidget(plugin, button3);
- SpoutManager.getPlayer(e.getPlayer()).getMainScreen().attachPopupScreen(popup);
- }
- }
Add Comment
Please, Sign In to add comment