1

Message to all plugin devs! :P

TeamCraft-Robbie 5/28/14 3:07 pm
270
5/28/2014 6:48 pm
Hey, guys i have recently started to code for my server and i found out that the way people code can vary drasicly based on who you are.

So, i am asking you; How do you organize your code? What about packages? Classes?
Posted by
TeamCraft-Robbie
Level 5 : Apprentice Miner
0

  Have something to say?

JoinSign in

8

anonpmc337468
05/28/2014 5:59 pm
Level 11 : Journeyman Miner
[deleted]
1
TeamCraft-Robbie
05/28/2014 6:48 pm
Level 5 : Apprentice Miner
Thank you so much, you guys helped a ton.
1
Fureniku
05/28/2014 5:02 pm
Level 88 : Elite Modder
Just keep it organised as you do with all Java programs.

I do mods, not plugins, but I'll have packages for XYZ (eg a package for network stuff, a package for blocks and items, a package for API stuff etc). I'll keep classes streamlined and use as few as possible - if I have 10 different items which are all identical except one thing I'll use a single class with a constructor to decide the variable.
1
TeamCraft-Robbie
05/28/2014 5:12 pm
Level 5 : Apprentice Miner
ok thanks for your help!
1
some1epic123
05/28/2014 4:04 pm
Level 23 : Expert Modder

So, i am asking you; How do you organize your code? What about packages? Classes?

I obey Java's naming conventions just like everybody else should...
1
anonpmc337468
05/28/2014 4:00 pm
Level 11 : Journeyman Miner
[deleted]
1
TeamCraft-Robbie
05/28/2014 4:03 pm
Level 5 : Apprentice Miner
Ok thanks! Im trying to code a large plugin that can run everything for a survival server. My goal is to run a whole survival server with one plugin, so organizing it correctly is essential. Thanks for the help. Quick question, is it possible to use two of the same events in the same plugin? Do they have to be in different packages?
1
anonpmc337468
05/28/2014 4:03 pm
Level 11 : Journeyman Miner
[deleted]
1

Welcome