Beginner Question Eclipse @ multiple ingame lines

Discussion in 'Plugin Development' started by conetopia, Jul 4, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    In the spoilers i got the .class and .yml files text.
    Basically ingame when i type /skype
    the result is
    But I am trying to figure out how to make my plugin start a new line so i can have it say
    Skype - username = skypename

    Skype1 = SkypeExampleName1
    Skype2 = SkypeExampleName2

    class (open)

    package me.conetopia.myfirstplugin;

    import java.util.logging.Logger;

    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.PluginDescriptionFile;

    public class myfirstpluginmain extends JavaPlugin {
    public final Logger logger = Logger.getLogger("Minecraft");

    public void onEncable(){
    PluginDescriptionFile pdfFile = this.getDescription(); + "Has been enabled!");


    public void onDisable(){
    PluginDescriptionFile pdfFile = this.getDescription(); + "has been disabled!");
    public boolean onCommand(CommandSender sender, Command cmd , String label, String[] args){
    Player p = (Player) sender;
    p.sendMessage(ChatColor.DARK_BLUE + "skype");
    return true;

    Show Spoiler

    name: MyFirstPluginYay
    description: My first made plugin taught to me by pokemonzr.
    Author: Conetopia
    description: Sends a list of skype names.
    version: 1.0
    main: me.conetopia.myfirstplugin.myfirstpluginmain
    Last edited: Jul 4, 2015
  2. @conetopia I'm guessing your learning of YouTube most likely theBcBroz. He teaches really bad and outdated practices, I recommend learning off the official tutorials or an experience Bukkit member who agrees to help. Note, if you are asking someone to teach you please respect their decision.

    Let's get into the issues.
    1. Use Bukkit's Logger not Java's
    2. You don't need to put an enable and disable message, Bukkit does it for you.
    3. You don't need an onDisable if you don't use it.
    4. cmd.getName() not label
    5. Check before casting
    6. It would be a good idea to make a list in a config or something then just loop through the list printing that username.
    conetopia likes this.
  3. Offline


    p.sendMessage(ChatColor.DARK_BLUE + "skype");
    copy'ed , clicked after the collan mark. hit enter
    pasted. changed darkblue to dark purple, saved , switched out the .jars in my server.
    turned server on
    /skype ... as a result i get

    Now that I know what im doing, i can't just change the letters/color.
    Didn't think it was that simple.

    No i was learning off of pokemonzr on youtube. but yeah im a beginner, just learning the basics to get it up and running.
    thanks for your information , I am sure I can certainly upgrade my experience at a higher rate now.

    <Edited by bwfcwalshy: Merged posts, please use the edit button rather than double posting.>
    Last edited by a moderator: Jul 4, 2015
Thread Status:
Not open for further replies.

Share This Page