mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 22:03:12 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
1 parent
250edf099c
commit
6815f579a7
1192 files changed
+60344
-62167
No files matched your search
@@ -13,22 +13,23 @@ import noppes.npcs.constants.EnumScrollData;
|
||||
import java.util.HashMap;
|
||||
import java.util.Vector;
|
||||
|
||||
public class GuiNpcDimension extends GuiNPCInterface implements IScrollData{
|
||||
public class GuiNpcDimension extends GuiNPCInterface implements IScrollData {
|
||||
|
||||
private GuiCustomScroll scroll;
|
||||
private HashMap<String, Integer> data = new HashMap<String, Integer>();
|
||||
public GuiNpcDimension() {
|
||||
super();
|
||||
|
||||
public GuiNpcDimension() {
|
||||
super();
|
||||
xSize = 256;
|
||||
setBackground("menubg.png");
|
||||
PacketClient.sendClient(new DimensionsGetPacket());
|
||||
}
|
||||
public void initGui()
|
||||
{
|
||||
}
|
||||
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
if(scroll == null){
|
||||
scroll = new GuiCustomScroll(this,0);
|
||||
scroll.setSize(165, 208);
|
||||
if (scroll == null) {
|
||||
scroll = new GuiCustomScroll(this, 0);
|
||||
scroll.setSize(165, 208);
|
||||
}
|
||||
scroll.guiLeft = guiLeft + 4;
|
||||
scroll.guiTop = guiTop + 4;
|
||||
@@ -39,57 +40,57 @@ public class GuiNpcDimension extends GuiNPCInterface implements IScrollData{
|
||||
|
||||
this.addLabel(new GuiNpcLabel(0, title, guiLeft + x, guiTop - 8));
|
||||
|
||||
this.addButton(new GuiNpcButton(4, guiLeft + 170, guiTop + 72,82,20, "remote.tp"));
|
||||
this.addButton(new GuiNpcButton(4, guiLeft + 170, guiTop + 72, 82, 20, "remote.tp"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmClicked(boolean flag, int i)
|
||||
{
|
||||
if(flag){
|
||||
public void confirmClicked(boolean flag, int i) {
|
||||
if (flag) {
|
||||
PacketClient.sendClient(new RemoteDeletePacket(data.get(scroll.getSelected())));
|
||||
}
|
||||
NoppesUtil.openGUI(player, this);
|
||||
}
|
||||
NoppesUtil.openGUI(player, this);
|
||||
}
|
||||
protected void actionPerformed(GuiButton guibutton)
|
||||
{
|
||||
int id = guibutton.id;
|
||||
|
||||
if(!data.containsKey(scroll.getSelected()))
|
||||
return;
|
||||
protected void actionPerformed(GuiButton guibutton) {
|
||||
int id = guibutton.id;
|
||||
|
||||
if(id == 4){
|
||||
if (!data.containsKey(scroll.getSelected()))
|
||||
return;
|
||||
|
||||
if (id == 4) {
|
||||
PacketClient.sendClient(new DimensionTeleportPacket(data.get(scroll.getSelected())));
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int i, int j, int k)
|
||||
{
|
||||
super.mouseClicked(i, j, k);
|
||||
scroll.mouseClicked(i, j, k);
|
||||
}
|
||||
@Override
|
||||
public void keyTyped(char c, int i)
|
||||
{
|
||||
if (i == 1 || isInventoryKey(i))
|
||||
{
|
||||
close();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void save() {
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int i, int j, int k) {
|
||||
super.mouseClicked(i, j, k);
|
||||
scroll.mouseClicked(i, j, k);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyTyped(char c, int i) {
|
||||
if (i == 1 || isInventoryKey(i)) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setData(Vector<String> list, HashMap<String, Integer> data, EnumScrollData type) {
|
||||
scroll.setList(list);
|
||||
this.data = data;
|
||||
}
|
||||
@Override
|
||||
public void setSelected(String selected) {
|
||||
getButton(3).setDisplayText(selected);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(Vector<String> list, HashMap<String, Integer> data, EnumScrollData type) {
|
||||
scroll.setList(list);
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(String selected) {
|
||||
getButton(3).setDisplayText(selected);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user