Guest User

Untitled

a guest
Jan 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.81 KB | None | 0 0
  1. package me.sadtaco.SkillTrees;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.entity.Player;
  5. import org.getspout.spoutapi.SpoutManager;
  6. import org.getspout.spoutapi.player.SpoutPlayer;
  7.  
  8. import org.getspout.spoutapi.gui.Color;
  9. //import org.getspout.spoutapi.gui.GenericButton;
  10. import org.getspout.spoutapi.gui.GenericLabel;
  11. //import org.getspout.spoutapi.gui.GenericPopup;
  12. import org.getspout.spoutapi.gui.WidgetAnchor;
  13.  
  14. public class SkillsGui {
  15.    
  16.     private static SkillTrees plugin;
  17.    
  18.     public SkillsGui(SkillTrees plugin, ServerChatPlayerListener serverChatPlayerListener) {
  19.         SkillsGui.setPlugin(plugin);
  20.     }
  21.  
  22.     public void skillHint(Player player){
  23.         player.sendMessage(ChatColor.RED + "[Server] " + ChatColor.WHITE + "Here I would be making a button.");
  24.        
  25.         SpoutPlayer sPlayer = SpoutManager.getPlayer(player);
  26.         //GenericPopup popup = new GenericPopup();
  27.         /*GenericButton button = new GenericButton("+");
  28.        
  29.         button.setColor(new Color(1.0F, 1.0F, 0, 1.0F)); //This makes the button text yellow.
  30.         button.setHoverColor(new Color(1.0F, 0, 0, 1.0F)); //When you hover over with a mouse this makes the text red.
  31.         button.setX(100).setY(100); //Puts the button at 100*100 on the screen
  32.         button.setWidth(40).setHeight(40); //Makes the button 200 wide and 20 high
  33.         popup.attachWidget(getPlugin(), button);
  34.        
  35.         sPlayer.getMainScreen().attachPopupScreen(popup);*/
  36.         GenericLabel label = new GenericLabel("Press \"K\" to open Skills");
  37.         label.setTextColor(new Color(1.0F, 1.0F, 1.0F, 1.0F));
  38.         label.setAlign(WidgetAnchor.TOP_CENTER).setAnchor(WidgetAnchor.BOTTOM_RIGHT);
  39.         sPlayer.getMainScreen().attachWidget(plugin, label);
  40.         //label.shiftYPos(20);
  41.     }
  42.    
  43.     public static SkillTrees getPlugin() {
  44.         return plugin;
  45.     }
  46.     public static void setPlugin(SkillTrees plugin) {
  47.         SkillsGui.plugin = plugin;
  48.     }
  49. }
Add Comment
Please, Sign In to add comment