Minecraft Plugin Help

Hey guys,

I am quite new to java and i am trying to learn to code effectively so i figured that theres no better place to start than making a plugin for minecraft. I am trying to make a plugin that will allow users to enjoy a government style gameplay such as a president etc. I am trying to set up my starting class that will be the president. Here is my code so for,

Will this achieve what im trying to do. Im trying to get the plugin to log a message to the console saying the plugin is activated. I am then trying to get the plugin to register the event in a listener that ill show further down.

Will this send a message that only the player can see when he logs in saying "Welcome to Minecraft". Will this work as a listener or how will i go about setting it up.

President class code;
package dckillerman123.realms;

import org.bukkit.plugin.java.JavaPlugin;

public class president extends JavaPlugin{

char president1;
char law;
char salary;

}
This is where my main question comes into play. How can i go about making ranks like thos in groupmanager or the likes. I want it to be that the president is a rank and he has certain commands which i know i use the OnCommand() function for along with a listener maybe to register the event ? How can i make this class have president features and let him control the other ranks/classes using commands in game. If i want to make it that the president has colour codes like &4 will i just use the default minecraft codes ??.

Re: Minecraft Plugin Help

Eh no, this is the very worst place to start. Minecraft plugins are for people who already know Java through and through. Start with a good book to learn the actual language and object oriented programming concepts.

Re: Minecraft Plugin Help

Originally Posted by dckillerman123

id like my question answered :P

Your question was answered.

It's like you asking how to replace the engine in a race car. The correct answer is to work on another car first for practice, get good at changing tires and replacing oil, then move on to more complicated stuff like replacing the engine. Even if you have practice with motorcycles, you're going to have to learn the basics before doing anything else.

There isn't a shortcut. If you don't know the basics, you aren't going to get very far.

Re: Minecraft Plugin Help

That wasnt the question i asked. I asked was i taking the right steps in the code above. How can i learn if you refuse to help me with my queston. I will learn to code my own way like i have done for php and javascript.

Re: Minecraft Plugin Help

The short answer to your question is we don't know without seeing an SSCCE. You've only shown us an incomplete snippet, so we have no idea what this code does. It's a bit like showing us a car door and asking us how fast the car it was originally attached to is going.

But you presumably understand the context of this program, so you should be able to pretty easily step through the code and see what it does. If you can't do that, it suggests that you might be biting off more than you can chew.

We are trying to help, and you'll get the same "creating minecraft mods is not a good way to learn Java" advice everywhere you go. Good luck though.