New To Java - Want to start a big project, how to start?

Discussion in 'Spigot Plugin Development' started by stormyjoeYes, Sep 5, 2019.

  1. Hello! I for a little knowledge about myself i have been tweaking with java, Unity, and swift coding over the last 2-3 years but none of the knowledge retained. However i am very commonly used to plugin configs as i am a admin on a server and i run a server of my own.

    I want to make a plugin or two and start devloping plugins that are usefull toward both the community and myself on my own server that would add a class base and race base system with a custom skill GUI thing.
    I like going head first into big projects, its just how i have been able to learn a lot easy for me to learn.

    I was looking into other plugins that do similar things however they are outdated or the devs are very very very slow in response in which i think this is something mine craft owners need or some anyway.

    Any ideas on how to start and any ways to make a gui thing possible. Or videos, tutorials or blogs?

    (1.14.4 version) Thanks to anyone that responds! I want to learn and learn anything i can!
  2. I know you said you like going head first into big projects but realistically this isn't going to be the best way to learn... Learn to walk before you can run.

    If you're dead set on starting with this big project, break the project up into smaller goals, each with their own clear objective. Then do your research on how you can achieve that task using the bukkit API Documentation and forum posts here before you start writing your code.

    Every big project must be well planned and have realistic goals set, or you're going to end up getting stuck, loosing interest or using bad coding practices to patch things together.

    TL;DR - Start with small projects, gain knowledge of bukkit api, plan big project well.
    • Agree Agree x 4
  3. drives_a_ford

    Junior Mod

    All I'd like to add is that you should start by learning (at least) the basics of java before attempting to develop Spigot plugins.
    If you don't know any java and dive straight into a (large) plugin, you'll most likely make some horrible choices at the beginning which will end up biting you in the arse a whole bunch.
    I'm sure you wouldn't want to completely rewrite everything you've done up to a point a dozen times. But that's what would most likely have to happen if you jumped into this too early.

    Even if you learn the basics before you start, you might have to rewrite your entire codebase a few times. But some upfront knowledge would definitely help limit the number of times this happens.

    And don't underestimate the time you'll save by actually planning what you're going to do. I know I make this mistake a lot myself, but do as I say not as I do :)
    • Agree Agree x 3
  4. My first plugin was a hunger game plugin.

    It sucked, my java skill sucked, it barely worked and used bad practices all over the place. But I learned, lots.
    Going head on with big projects is fun, but smaller plugins can be more rewarding (you finish your product faster).
  5. I would start with a small project to get the grips first if I was you.
  6. My first project was a classes plugin in which every class had different abilities like summoning tornado's. It was going to have re-textured entities to add cool dragons that you would be able to ride into different dimensions. I never finished but I learned a lot.
  7. Sounds like a good start
    • Agree Agree x 1
  8. If you _really_ want to make something big, you need to work out how to break it down into smaller parts.
    Say the scope is classes, races, and skills, let's break that down into three individual modules for each one, classes, races, and skills.
    Then, let's break that module down further. What do you want to do with classes? At a basic level, the player should be able to set a class. That's a vertical slice: what needs to be done to enable the player to set a class?
    There needs to be a way of storing what the player's class is, and that needs to be called by a command. So you write your way of interfacing with storage, and call that from the command somehow (perhaps with a layer of abstraction in-between, if needed)
    Get each thing working one by one, building on what you have, keeping notes of what you need to get done in a way that's easy for you. Eventually you have a minimum viable product that can be run on your server.
  9. Yeah no, good teacher you are. Who knows about modules on their first day of java.
  10. "Modules" can be structured any way OP wants to, it sounds like she has three distinct areas of functionality in mind that do not interact so having three separate plugins would be fine, it doesn't necessarily have to be a multi-module gradle/maven project or anything like that (unless of course that's a route she wants to go down, but I've left it purposefully vague in that regard)