Does anyone ACTUALLY know how to code java?
+3
aDirtyFishTank
tyeabc
LudicrousYoshi
7 posters
Page 2 of 2
Page 2 of 2 • 1, 2
Re: Does anyone ACTUALLY know how to code java?
gawd the clantag is a rather large amount of code lol
Sad part is, i cant really assign that to any type of variable(to my knowledge) so i gotta copy that code wherever the clantag is used -_-
- Code:
tempPerson.getClanColors().get(0)
+ "["
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(0,1)
+ tempPerson.getClanColors().get(2)
+ tempPerson.getClanTag().substring(1,2)
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(2)
+ tempPerson.getClanColors().get(0)
+ "]"
+ ChatColor.WHITE
Sad part is, i cant really assign that to any type of variable(to my knowledge) so i gotta copy that code wherever the clantag is used -_-
Re: Does anyone ACTUALLY know how to code java?
LudicrousYoshi wrote:gawd the clantag is a rather large amount of code lol
- Code:
tempPerson.getClanColors().get(0)
+ "["
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(0,1)
+ tempPerson.getClanColors().get(2)
+ tempPerson.getClanTag().substring(1,2)
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(2)
+ tempPerson.getClanColors().get(0)
+ "]"
+ ChatColor.WHITE
Sad part is, i cant really assign that to any type of variable(to my knowledge) so i gotta copy that code wherever the clantag is used -_-
Ludi you are my hero
swimmerboy1196- Posts : 403
Join date : 2011-04-04
Location : Under a bed
Re: Does anyone ACTUALLY know how to code java?
figured out how to make that long ass statement into a method so yay for me!
Also configured all the normal player commands and stats except for /follow and /recruit
Still need to find a way to make persistent data tho...
Also configured all the normal player commands and stats except for /follow and /recruit
Still need to find a way to make persistent data tho...
Re: Does anyone ACTUALLY know how to code java?
I'll have you know I'm ACTUALLY workin on it and have already made a few changes today.
The follow and recruit stuff is actually turning out to be tougher than I thought tho...
The follow and recruit stuff is actually turning out to be tougher than I thought tho...
Re: Does anyone ACTUALLY know how to code java?
Seemingly finished the /recruit and /follow commands!
I need to do some more smaller commands that wont be too complicated to do.
Also gonna be finally implementing the colorful chat tags YAY
To give you an idea of "smaller" vs. "larger" commands -coding wise-
Small:
I did the large one this weekend just fyi
*The code is much more organized in the coding program I use*
I need to do some more smaller commands that wont be too complicated to do.
Also gonna be finally implementing the colorful chat tags YAY
To give you an idea of "smaller" vs. "larger" commands -coding wise-
Small:
- Code:
if(args[0].equals("when"))
{
sender.sendMessage(ChatColor.LIGHT_PURPLE + "Current prestige per hour: " + ChatColor.WHITE + hpSender.getPrestigeGain());
sender.sendMessage(ChatColor.LIGHT_PURPLE + "Prestige needed for next level: " + ChatColor.WHITE + hpSender.getNextLevelReq());
sender.sendMessage(ChatColor.LIGHT_PURPLE + "Minutes until next prestige gain: " + ChatColor.WHITE + hpSender.getMinsMore());
return true;
}
- Code:
if(args[0].equals("recruit") || args[0].equals("follow"))
{
if(tempPerson == hpSender)
{
sender.sendMessage(ChatColor.RED + "You did not choose a valid person");
return true;
}
if(args[0].equals("recruit"))
{
if(tempPerson.getLord() != null)
{
sender.sendMessage(ChatColor.RED + tempPerson.getName() + " Already has a Lord!");
return true;
}
if(hpSender.getDirectVassals().size() >= hpSender.getMaxDVassals())
{
sender.sendMessage(ChatColor.RED + "You already have enough direct vassals!");
return true;
}
if(hpSender.getLevel() < tempPerson.getLevel())
{
sender.sendMessage(ChatColor.RED + "You can't recruit somebody with a higher level than you.");
return true;
}
hpSender.setNewVassal(tempPerson);
if(tempPerson.getNewLord() != null && tempPerson.getNewLord().equals(hpSender))
{
tempPerson.setLord(hpSender);
hpSender.addDirectVassal(tempPerson);
hpSender.setNewVassal(null);
tempPerson.setNewLord(null);
sender.sendMessage(ChatColor.GREEN + args[1] + " Is your new vassal!");
}
else
{
sender.sendMessage(ChatColor.GREEN + args[1] + " Has been requested as a new vassal.");
}
}
if(args[0].equals("follow"))
{
if(hpSender.getLord() != null)
{
sender.sendMessage(ChatColor.RED + "You already have a Lord!");
return true;
}
if(tempPerson.getDirectVassals().size() >= tempPerson.getMaxDVassals())
{
sender.sendMessage(ChatColor.RED + tempPerson.getName() + " Already has enough direct vassals!");
return true;
}
if(hpSender.getLevel() > tempPerson.getLevel())
{
sender.sendMessage(ChatColor.RED + "You can't follow somebody with a lower level than you.");
return true;
}
hpSender.setNewLord(tempPerson);
if(tempPerson.getNewVassal() != null && tempPerson.getNewVassal().equals(hpSender))
{
hpSender.setLord(tempPerson);
tempPerson.addDirectVassal(hpSender);
tempPerson.setNewVassal(null);
hpSender.setNewLord(null);
sender.sendMessage(ChatColor.GREEN + args[1] + " Is your new lord!");
}
else
{
sender.sendMessage(ChatColor.GREEN + args[1] + " Has been requested as a new lord.");
}
}
return true;
}
I did the large one this weekend just fyi
*The code is much more organized in the coding program I use*
Re: Does anyone ACTUALLY know how to code java?
I've finished all of the main features of the plugin!
I haven't done the whole "prevent afk" stuffs tho
All I have to do now is figure out how to store an ArrayList on a text file...
Aside from that - IT'S READY
I think...
I haven't done the whole "prevent afk" stuffs tho
All I have to do now is figure out how to store an ArrayList on a text file...
Aside from that - IT'S READY
I think...
aDirtyFishTank- Posts : 1008
Join date : 2010-12-10
Age : 27
Re: Does anyone ACTUALLY know how to code java?
shoop the woop!
swimmerboy1196- Posts : 403
Join date : 2011-04-04
Location : Under a bed
Re: Does anyone ACTUALLY know how to code java?
woopdy doopdy shoopdy floop!
ferentinofighter- Posts : 301
Join date : 2011-04-30
Location : Like hell if i told you where i was!
Re: Does anyone ACTUALLY know how to code java?
woopity doopity shoopity woop the woopity shoopity doopity boopity
aDirtyFishTank- Posts : 1008
Join date : 2010-12-10
Age : 27
Re: Does anyone ACTUALLY know how to code java?
Apparently to time for serialization learning how do
If ya know what I mean and you probably dont
If ya know what I mean and you probably dont
Re: Does anyone ACTUALLY know how to code java?
LudicrousYoshi wrote:Apparently to time for serialization learning how do
If ya know what I mean and you probably dont
No one ever knows what your talking about Ludi
ferentinofighter- Posts : 301
Join date : 2011-04-30
Location : Like hell if i told you where i was!
Re: Does anyone ACTUALLY know how to code java?
My best friend, the ArrayList, just became my worst enemy
Fahk me...
Serializing something is when you make a static string of data of an object that can be printed on a file. Then you would subsequently re-read what you wrote to reload your object.
Problem is:
I use an "un-serialiazable" object, ArrayList, that holds a list of objects.
Also, each object I made in that "un-serialiazable" ArrayList is "un-serialiazable".
Did I mention that each "un-serialiazable" object in that "un-serialiazable" ArrayList has "un-serialiazable" ArrayLists in them?
I almost forgot... each "un-serialiazable" object in that "un-serialiazable" ArrayList with "un-serialiazable" ArrayLists in them are filled with "un-serialiazable" objects!
I could continue, yes it keeps going, but I think you have the idea
Fahk me...
Serializing something is when you make a static string of data of an object that can be printed on a file. Then you would subsequently re-read what you wrote to reload your object.
Problem is:
I use an "un-serialiazable" object, ArrayList, that holds a list of objects.
Also, each object I made in that "un-serialiazable" ArrayList is "un-serialiazable".
Did I mention that each "un-serialiazable" object in that "un-serialiazable" ArrayList has "un-serialiazable" ArrayLists in them?
I almost forgot... each "un-serialiazable" object in that "un-serialiazable" ArrayList with "un-serialiazable" ArrayLists in them are filled with "un-serialiazable" objects!
I could continue, yes it keeps going, but I think you have the idea
Re: Does anyone ACTUALLY know how to code java?
LudicrousYoshi wrote:My best friend, the ArrayList, just became my worst enemy
Fahk me...
Serializing something is when you make a static string of data of an object that can be printed on a file. Then you would subsequently re-read what you wrote to reload your object.
Problem is:
I use an "un-serialiazable" object, ArrayList, that holds a list of objects.
Also, each object I made in that "un-serialiazable" ArrayList is "un-serialiazable".
Did I mention that each "un-serialiazable" object in that "un-serialiazable" ArrayList has "un-serialiazable" ArrayLists in them?
I almost forgot... each "un-serialiazable" object in that "un-serialiazable" ArrayList with "un-serialiazable" ArrayLists in them are filled with "un-serialiazable" objects!
I could continue, yes it keeps going, but I think you have the idea
dafuq
swimmerboy1196- Posts : 403
Join date : 2011-04-04
Location : Under a bed
Re: Does anyone ACTUALLY know how to code java?
swimmerboy1196 wrote:LudicrousYoshi wrote:My best friend, the ArrayList, just became my worst enemy
Fahk me...
Serializing something is when you make a static string of data of an object that can be printed on a file. Then you would subsequently re-read what you wrote to reload your object.
Problem is:
I use an "un-serialiazable" object, ArrayList, that holds a list of objects.
Also, each object I made in that "un-serialiazable" ArrayList is "un-serialiazable".
Did I mention that each "un-serialiazable" object in that "un-serialiazable" ArrayList has "un-serialiazable" ArrayLists in them?
I almost forgot... each "un-serialiazable" object in that "un-serialiazable" ArrayList with "un-serialiazable" ArrayLists in them are filled with "un-serialiazable" objects!
I could continue, yes it keeps going, but I think you have the idea
dafuq
Word
ferentinofighter- Posts : 301
Join date : 2011-04-30
Location : Like hell if i told you where i was!
Re: Does anyone ACTUALLY know how to code java?
yeah, still no one knows what your talking about
aDirtyFishTank- Posts : 1008
Join date : 2010-12-10
Age : 27
swimmerboy1196- Posts : 403
Join date : 2011-04-04
Location : Under a bed
Re: Does anyone ACTUALLY know how to code java?
swimmerboy1196 wrote:Progress?
I got it to save the data, but I am still frustratingly trying to find out how to load the saved data :/
I'm literally on the final step before it's usable!
Page 2 of 2 • 1, 2
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum
|
|