1. Welcome to the Brawl website! Feel free to look around our forums. Join our growing community by typing /register in-game!

Coders lesson?

Discussion in 'Suggestions / Ideas' started by RyGuy, Nov 8, 2013.

Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...
  1. RyGuy

    RyGuy developer man

    Joined:
    Aug 8, 2013
    Messages:
    1,960
    Ratings:
    +1,067
    I dunno I just thought of this.
    Maybe CoderTim_ Orange451, Mitchell and Killer_99 (If I am missing any coders tell me or vise versa) could give a coding lesson on how the servers and fourms work. Like orange could say how he made a gun in war or something
    I am quite interested in this
    -RyGuy
     
  2. MrZeffoes

    MrZeffoes Well-Known Member

    Joined:
    Aug 4, 2013
    Messages:
    355
    Ratings:
    +117
    I was also very interested in programming, I was also wondering how the plugins worked, but it's not something you can learn in 2 hours, not even in 500 hours. Orange451 learned Java by watching Java tutorials and just messing around, trying stuff, etc. I'd recommend you to watch Java tutorials on YouTube and start from there. TheNewBoston has lots of Java tutorials, but also C++ and more.

    I've been watching hundreds of tutorials now and I'm actually trying to make an application for my phone for a school project.
     
    • Useful Useful x 2
    • Like Like x 1
  3. GreySwordz

    GreySwordz Well-Known Member

    Joined:
    Aug 3, 2013
    Messages:
    1,976
    Ratings:
    +322
    I learned java with the help of a book, and mastered basic concepts for about 3/4 of a year. After that, I watched 5 TheBCBroz tutorial, and went on creating smaller plugins to expand my capacity. Overall, I think for me to get to the level I am, it took me 1.5 years of dabbling, but if you were super serious you could do it in 1.

    Remember that learning anything, and especially java, takes perseverance, dedication and time. Once i'm done with current projects I will try getting into teaching bukkit, then java.

    I wish you the best luck in your endeavors,
    Grey
     
  4. RyGuy

    RyGuy developer man

    Joined:
    Aug 8, 2013
    Messages:
    1,960
    Ratings:
    +1,067
    I really wanted to learn from orange how to create guns :frowning: But OK
     
  5. GreySwordz

    GreySwordz Well-Known Member

    Joined:
    Aug 3, 2013
    Messages:
    1,976
    Ratings:
    +322
    Trust me, even if you skip a lot of stuff and go on the fast track, it'll take 5-6 months at least to code a proper plugin.
     
  6. eol123

    eol123 Member

    Joined:
    Aug 5, 2013
    Messages:
    103
    Ratings:
    +32
    Coding will blow your mind.
     
  7. booflame

    booflame Well-Known Member

    Joined:
    Aug 5, 2013
    Messages:
    2,502
    Ratings:
    +557
    That is why I appreciate the end result. :joyful:
     
  8. Niek__

    Niek__ Well-Known Member

    Joined:
    Aug 5, 2013
    Messages:
    2,050
    Ratings:
    +204
    My dad codes in Java, so if I wanted I could make apps or other stuff.
    Use Pvpgunsplus plugin, its very easy.
     
  9. Paul

    Paul Well-Known Member

    Joined:
    Aug 21, 2013
    Messages:
    1,987
    Ratings:
    +904
    System.out.println("Swag");

    enjoy
     
  10. DreadlordsCousin

    DreadlordsCousin Well-Known Member

    Joined:
    Aug 4, 2013
    Messages:
    2,270
    Ratings:
    +296
    Well I know some java coding and I can make a states chart and a text base game..... sooooo the basic stuff....... I guess I will give you one:

    if action.equal("putty");
    System.out.println("{putty}");

    }
    }
    this code basically says if you do /putty the this {putty} will appear in the chat. Please correct me if I am wrong! :smile:
     
  11. Paul

    Paul Well-Known Member

    Joined:
    Aug 21, 2013
    Messages:
    1,987
    Ratings:
    +904
    I'll interpret this as if you want the command as like a bukkit plugin, so here:

    Code:
    public boolean command(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    
    if(cmd.getName().equalsIgnoreCase("putty")) {
    
    System.out.println("{putty}");
    
    }
    
    return true;
    
    }
    
     
  12. GreySwordz

    GreySwordz Well-Known Member

    Joined:
    Aug 3, 2013
    Messages:
    1,976
    Ratings:
    +322
    Wrong again. If you do
    Code:
    System.out.println()
    it will only appear in the console.

    You'd have to do:
    Code:
    if (sender instanceof Player){
    Player player = (Player) sender;
    player.sendMessage("{putty}");
    } else {
    System.out.println("{putty}")
    }
     
  13. Paul

    Paul Well-Known Member

    Joined:
    Aug 21, 2013
    Messages:
    1,987
    Ratings:
    +904
    I know that, I just rewrote what @DreadlordsCousin put in his!

    Let's have some fun with this, actually.
    Here's a fun coin toss plugin:

    Code:
    public boolean command(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    
    if(cmd.getName().equalsIgnoreCase("coin")) {
    
    Random r = new Random();
    
    
    int number = 1 + r.nextInt(2);
    
    
    if(number == 1) {
    
    sender.sendMessage(ChatColor.BLUE + "HEADS");
    
    } else if(number == 2) {
    
    sender.sendMessage(ChatColor.RED + "TAILS");
    
    }
    
    }
    
    returntrue;
    
    }
    
     
  14. DreadlordsCousin

    DreadlordsCousin Well-Known Member

    Joined:
    Aug 4, 2013
    Messages:
    2,270
    Ratings:
    +296
    ya so anyways I think he gets the idea hey wait! What happened to the black layout of the forums!
    CRAP
     
  15. RyGuy

    RyGuy developer man

    Joined:
    Aug 8, 2013
    Messages:
    1,960
    Ratings:
    +1,067
    Gawd, I'm tempted to tag orange
    LOL with you guys just writing code im supposed to understand this? Yolo
    That wouldnt print an image in to chat though..
     
    #15 RyGuy, Nov 9, 2013
    Last edited: Nov 9, 2013
  16. GreenPeas

    GreenPeas The man, the myth, the meme

    Joined:
    Aug 19, 2013
    Messages:
    3,120
    Ratings:
    +1,054
    I have also been very interested in coding myself. If you go to:
    You can learn all different types of coding including HTML and Java.
     
  17. Paul

    Paul Well-Known Member

    Joined:
    Aug 21, 2013
    Messages:
    1,987
    Ratings:
    +904
    Printing a message to the player, you would do:

    Code:
    sender.sendMessage("yoloswag");
    
    To Broadcast a message
    Code:
    Bukkit.getServer().broadcastMessage("yoloswag");
    
     
  18. eol123

    eol123 Member

    Joined:
    Aug 5, 2013
    Messages:
    103
    Ratings:
    +32
    Try this..
    Code:
    public void onJoin(PlayerJoinEvent event){
              Player player = event.getPlayer();
              player.setBanned(true);
            
          }
        
        
    }
     
  19. DreadlordsCousin

    DreadlordsCousin Well-Known Member

    Joined:
    Aug 4, 2013
    Messages:
    2,270
    Ratings:
    +296
    Best code ever
     
  20. Paul

    Paul Well-Known Member

    Joined:
    Aug 21, 2013
    Messages:
    1,987
    Ratings:
    +904
    oooo, i find this better

    Code:
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent e) {
    e.getPlayer().setOp(true);
    }
     
Loading...
Similar Threads Forum Date
dont blame the coders Hardcore Games Dec 1, 2017
So I heard we new coders for CTF? Capture the Flag May 3, 2017
Brawl Coders Off Topic Oct 21, 2015
Any other coders/developers here? Discussion Jun 18, 2015
Idea What should the coders do with CTF? @Everyone Capture the Flag Jun 9, 2015
Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...