mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
More cleanup. Done with Datatypes. Lack Events, Runnables, and...
Commands.
This commit is contained in:
parent
bb5a9826bc
commit
a2f23bd056
@ -17,7 +17,7 @@ import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
|
||||
public class HUDmmo {
|
||||
private int center_x = 427/2;
|
||||
private int center_x = 427 / 2;
|
||||
|
||||
private String playerName = null;
|
||||
|
||||
|
@ -5,10 +5,10 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
public class ButtonHUDStyle extends ButtonToggle {
|
||||
|
||||
public ButtonHUDStyle(PlayerProfile PP) {
|
||||
super("HUD Type: ", PP.getHUDType().toString(), "Change your HUD style!");
|
||||
super("HUD Type: ", PP.getHUDType().toString(), "Change your HUD style!"); //TODO: Needs more locale
|
||||
}
|
||||
|
||||
public void updateText(PlayerProfile PP) {
|
||||
super.updateText("HUD Type: ", PP.getHUDType().toString());
|
||||
super.updateText("HUD Type: ", PP.getHUDType().toString()); //TODO: Needs more locale
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
public class ButtonPartyToggle extends ButtonToggle {
|
||||
|
||||
public ButtonPartyToggle(PlayerProfile PP) {
|
||||
super("Party HUD: ", ((Boolean) PP.getPartyHUD()).toString(), "Toggle the Party HUD!");
|
||||
super("Party HUD: ", ((Boolean) PP.getPartyHUD()).toString(), "Toggle the Party HUD!"); //TODO: Needs more locale
|
||||
}
|
||||
|
||||
public void updateText(PlayerProfile PP) {
|
||||
super.updateText("Party HUD: ", ((Boolean) PP.getPartyHUD()).toString());
|
||||
super.updateText("Party HUD: ", ((Boolean) PP.getPartyHUD()).toString()); //TODO: Needs more locale
|
||||
}
|
||||
}
|
||||
|
@ -11,37 +11,46 @@ import com.gmail.nossr50.datatypes.buttons.ButtonEscape;
|
||||
import com.gmail.nossr50.datatypes.buttons.ButtonHUDStyle;
|
||||
import com.gmail.nossr50.datatypes.buttons.ButtonPartyToggle;
|
||||
|
||||
public class PopupMMO extends GenericPopup
|
||||
{
|
||||
ButtonHUDStyle HUDButton = null;
|
||||
ButtonPartyToggle PartyButton = null;
|
||||
ButtonEscape EscapeButton = null;
|
||||
GenericLabel mcMMO_label = new GenericLabel();
|
||||
GenericLabel tip_escape = new GenericLabel();
|
||||
int center_x = 427/2;
|
||||
int center_y = 240/2;
|
||||
public class PopupMMO extends GenericPopup {
|
||||
|
||||
private ButtonHUDStyle HUDButton = null;
|
||||
private ButtonPartyToggle PartyButton = null;
|
||||
private ButtonEscape EscapeButton = null;
|
||||
private GenericLabel mcMMO_label = new GenericLabel();
|
||||
private GenericLabel tip_escape = new GenericLabel();
|
||||
private int center_x = 427 / 2;
|
||||
private int center_y = 240 / 2;
|
||||
|
||||
public PopupMMO(Player player, PlayerProfile PP, mcMMO plugin) {
|
||||
|
||||
public PopupMMO(Player player, PlayerProfile PP, mcMMO plugin)
|
||||
{
|
||||
//240, 427 are the bottom right
|
||||
mcMMO_label.setText(ChatColor.GOLD+"~mcMMO Menu~");
|
||||
mcMMO_label.setX(center_x-35).setY((center_y/2)-20).setDirty(true);
|
||||
mcMMO_label.setText(ChatColor.GOLD + "~mcMMO Menu~"); //TODO: Needs more locale
|
||||
mcMMO_label.setX(center_x - 35);
|
||||
mcMMO_label.setY((center_y / 2) - 20);
|
||||
mcMMO_label.setDirty(true);
|
||||
|
||||
tip_escape.setText(ChatColor.GRAY+"Press ESCAPE to exit!");
|
||||
tip_escape.setX(mcMMO_label.getX()-15).setY(mcMMO_label.getY()+10).setDirty(true);
|
||||
tip_escape.setText(ChatColor.GRAY + "Press ESCAPE to exit!"); //TODO: Needs more locale
|
||||
tip_escape.setX(mcMMO_label.getX() - 15);
|
||||
tip_escape.setY(mcMMO_label.getY() + 10);
|
||||
tip_escape.setDirty(true);
|
||||
|
||||
HUDButton = new ButtonHUDStyle(PP);
|
||||
HUDButton.setX(center_x-(HUDButton.getWidth()/2)).setY(center_y/2).setDirty(true);
|
||||
HUDButton.setX(center_x - (HUDButton.getWidth() / 2));
|
||||
HUDButton.setY(center_y / 2);
|
||||
HUDButton.setDirty(true);
|
||||
|
||||
if(LoadProperties.partybar)
|
||||
{
|
||||
if (LoadProperties.partybar) {
|
||||
PartyButton = new ButtonPartyToggle(PP);
|
||||
PartyButton.setX(center_x-(PartyButton.getWidth()/2)).setY(center_y/2+PartyButton.getHeight()).setDirty(true);
|
||||
PartyButton.setX(center_x - (PartyButton.getWidth() / 2));
|
||||
PartyButton.setY((center_y / 2) + PartyButton.getHeight());
|
||||
PartyButton.setDirty(true);
|
||||
this.attachWidget(plugin, PartyButton);
|
||||
}
|
||||
|
||||
EscapeButton = new ButtonEscape();
|
||||
EscapeButton.setX(center_x-(EscapeButton.getWidth()/2)).setY((center_y/2)+(HUDButton.getHeight()*2)+5).setDirty(true);
|
||||
EscapeButton.setX(center_x - (EscapeButton.getWidth() / 2));
|
||||
EscapeButton.setY((center_y / 2) + (HUDButton.getHeight() * 2) + 5);
|
||||
EscapeButton.setDirty(true);
|
||||
|
||||
this.attachWidget(plugin, HUDButton);
|
||||
this.attachWidget(plugin, mcMMO_label);
|
||||
@ -51,9 +60,9 @@ public class PopupMMO extends GenericPopup
|
||||
this.setDirty(true);
|
||||
}
|
||||
|
||||
public void updateButtons(PlayerProfile PP)
|
||||
{
|
||||
public void updateButtons(PlayerProfile PP) {
|
||||
HUDButton.updateText(PP);
|
||||
PartyButton.updateText(PP);
|
||||
this.setDirty(true);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,8 @@ package com.gmail.nossr50.datatypes.treasure;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class ExcavationTreasure extends Treasure {
|
||||
// dirt grass sand gravel clay mycel soulsand
|
||||
|
||||
// dirt | grass | sand | gravel | clay | mycel | soulsand
|
||||
// 00000001 - dirt 1
|
||||
// 00000010 - grass 2
|
||||
// 00000100 - sand 4
|
||||
|
@ -6,7 +6,6 @@ public abstract class Treasure {
|
||||
private int xp;
|
||||
private Double dropChance;
|
||||
private int dropLevel;
|
||||
|
||||
private ItemStack drop;
|
||||
|
||||
public Treasure(ItemStack drop, int xp, Double dropChance, int dropLevel) {
|
||||
|
Loading…
Reference in New Issue
Block a user