Hi there! I am making a mod where you go on to a server and you can open a GUI. I have made buttons in the gui, just like the ones in the main menu and the pause menu. But I want to make it so if you click a button it executes "/spawn" for you automatically. Here is my code:
package net.minecraft.src;
public class GuiMLingame extends GuiScreen
{
//private void addMLbuttons(int par1, int par2)
//{
// this.buttonList.add(new GuiButton(, this.width / 2 - 100, par1 + par2 * 2, I18n.func_135053_a("MineLegacy Website")));
//}
/** Also counts the number of updates, not certain as to why yet. */
private int updateCounter2;
/** Counts the number of screen updates. */
private int updateCounter;
/**
* Adds the buttons (and other controls) to the screen in question.
*/
public void initGui()
{
this.updateCounter2 = 0;
this.buttonList.clear();
byte var1 = -16;
boolean var2 = true;
this.buttonList.add(new GuiButton(0, 10, 50, 98, 20, I18n.func_135053_a("Click Here")));
this.buttonList.add(new GuiButton(1, 104*1 + 10, 50, 98, 20, I18n.func_135053_a("Spawn")));
this.buttonList.add(new GuiButton(2, 104*1 + 10, 22*1 + 50, 98, 20, I18n.func_135053_a("Island")));
this.buttonList.add(new GuiButton(3, 104*1 + 10, 22*2 + 50, 98, 20, I18n.func_135053_a("Enchant")));
this.buttonList.add(new GuiButton(3, 104*1 + 10, 22*3 + 50, 98, 20, I18n.func_135053_a("Nether")));
this.buttonList.add(new GuiButton(3, 104*1 + 10, 22*4 + 50, 98, 20, I18n.func_135053_a("PvP")));
}
/**
* Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
*/
protected void actionPerformed(GuiButton par1GuiButton, EntityPlayer playerEntity)
{
switch (par1GuiButton.id)
{
case 0:
try {
String url = "http:/minelegacy.com/vote";
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
}
catch (java.io.IOException e) {
System.out.println(e.getMessage());
};
case 1:
//WHAT DO I PUT HERE?!
}
}
/**
* Called from the main game loop to update the screen.
*/
public void updateScreen()
{
super.updateScreen();
++this.updateCounter;
}
/**
* Draws the screen and all the components in it.
*/
public void drawScreen(int par1, int par2, float par3)
{
super.drawScreen(par1, par2, par3);
drawRect(8, 38, 110, 72, 0xaf424242);
drawRect(112, 38, 214, 22*4 + 72, 0xaf424242);
this.drawCenteredString(this.fontRenderer, "\247bVote", 60, 40, 16777215);
this.drawCenteredString(this.fontRenderer, "\247bWarps", 104*1 + 60, 40, 16777215);
}
}
Ultimate Factions? Not very original. Real Ultimate Factions up way longer than this. Ultimate Factions' ip: ultimatefactions.info:25635 Ultimate Survival's ip: ultimatesurvival.info:25588 Website for both these servers: Ultimate Servers
The most unique, fun-filled, player-friendly minecraft pvp factions server around is up! And you can join today!!!
simply type in this ip to start the fun!!!: ultimatefactions.zapto.org:25635
We have very fun plugins such as: factions, essentials, craftbay, mcmmo, drugmeup, fastsoup and much, much more!!!! Our friendly staff and our helpful owner will ensure this most fun-filled experience a server can offer, so come on! Join up!
Additional Details
Log on now for the most fun-filling experience and factions server can offer! We have many plugins, friendly staff, and a nice spawn! Log in today!
Well, I'm sorry but you're wrong. I encourage the idea of Harry Potter mods and I'd gladly see this project become bigger, hell I wouldn't mind putting a link to it on my map thread if they did the same on theirs. That's not the problem, the problem is that there could be a great confusion with having two big Harry Potter projects using the same name. I genuinely don't see the point in being so hostile and judging by your reply you're also trying to draw conclusions from what you force yourself to believe is proof.
If they want to keep the name I'm fine with that but as I've said time and time again, both the projects would benefit from the projects having different names. If you force yourself to misjudge the situation then that's the point where you should realize that you're doing something wrong.
You really don't get it do you? Do you really think the modders are going to change the name of their mod for the likes of you? If you gladly see the project become bigger then why ask to change the name? I made a mod called DairyCraft and there was a server with the same name but we had no worries. I think you should just drop it. If you want the projects to have different names then change your projects name.
Wow, it's hard to get it across to you. Imagine that not being the case, how would I be able to say that to you so that you understand.
I've previously said that publicity isn't a problem, if anything they're going to lose from it as when people search for PotterCraft they wont find their mod, instead they'll find my my teams map.
No its so hard to get across to you. You just think you can barge in because you think the modders are "copying" your map name. And you act all nice to try and get them to change the name. Maybe you should back off and stop thinking about yourself and your server. You are clearly worried for yourself. You have no empathy whatsoever for the modders and if you did you would've never posted on this thread.
I'm not jealous, we don't have any problems when it comes to publicity. As I said, it's terribly inconvenient. However, you're wrong because they are to make a server too and once again, if there's going to be two PotterCraft servers there could very well be confusions and what not. No need to have such an attitude.
And no, the projects don't have anything to do with each other so once again, it's extremely inconvenient to fool people they are considering the names are the same.
"extremely inconvenient" - that's just your excuse to get the modders to change the name.
It's terribly inconvenient and confusing and I think both our map and their mod will benefit from having separate names. Therefore I advise him to change the name because we would also benefit from it.
I think the mod is completely original. Its a mod yours is a map. Don't bust your balls, the mod doesn't have anything to do with your map.
I recon your just jealous since this mod comes first when you search pottercraft.
Connect With: ultimatefactions.zapto.org:25635
Location: United States
The most unique, fun-filled, player-friendly minecraft pvp factions server around is up! And you can join today!!!
simply type in this ip to start the fun!!!: ultimatefactions.zapto.org:25635
We have very fun plugins such as: factions, essentials, craftbay, mcmmo, drugmeup and much, much more!!!!
Voting for this server helps greatly to get this server up and out there! Our friendly staff and our helpful owner will ensure this most fun-filled experience a server can offer, so come on! Join up! Additional Details
Log on now for the most fun-filling experience and factions server can offer! We have many plugins, friendly staff, and a nice spawn! Log in today! Game Version: Minecraft 1.5 Tags: Faction PVP
0
0
Please help me!
Thanks, Cloud
0
Ultimate Factions' ip: ultimatefactions.info:25635
Ultimate Survival's ip: ultimatesurvival.info:25588
Website for both these servers: Ultimate Servers
0
0
0
0
0
1
Website: ultimateservers.info
The most unique, fun-filled, player-friendly minecraft pvp factions server around is up! And you can join today!!!
simply type in this ip to start the fun!!!: ultimatefactions.zapto.org:25635
We have very fun plugins such as: factions, essentials, craftbay, mcmmo, drugmeup, fastsoup and much, much more!!!! Our friendly staff and our helpful owner will ensure this most fun-filled experience a server can offer, so come on! Join up!
Additional Details
Log on now for the most fun-filling experience and factions server can offer! We have many plugins, friendly staff, and a nice spawn! Log in today!
0
You really don't get it do you? Do you really think the modders are going to change the name of their mod for the likes of you? If you gladly see the project become bigger then why ask to change the name? I made a mod called DairyCraft and there was a server with the same name but we had no worries. I think you should just drop it. If you want the projects to have different names then change your projects name.
0
No its so hard to get across to you. You just think you can barge in because you think the modders are "copying" your map name. And you act all nice to try and get them to change the name. Maybe you should back off and stop thinking about yourself and your server. You are clearly worried for yourself. You have no empathy whatsoever for the modders and if you did you would've never posted on this thread.
0
"extremely inconvenient" - that's just your excuse to get the modders to change the name.
0
I think the mod is completely original. Its a mod yours is a map. Don't bust your balls, the mod doesn't have anything to do with your map.
I recon your just jealous since this mod comes first when you search pottercraft.
0
0
Location: United States
The most unique, fun-filled, player-friendly minecraft pvp factions server around is up! And you can join today!!!
simply type in this ip to start the fun!!!: ultimatefactions.zapto.org:25635
We have very fun plugins such as: factions, essentials, craftbay, mcmmo, drugmeup and much, much more!!!!
Voting for this server helps greatly to get this server up and out there! Our friendly staff and our helpful owner will ensure this most fun-filled experience a server can offer, so come on! Join up!
Additional Details
Log on now for the most fun-filling experience and factions server can offer! We have many plugins, friendly staff, and a nice spawn! Log in today! Game Version: Minecraft 1.5 Tags: Faction PVP