A New Channel! Bukkit Tutorials by MineStein!

Discussion in 'Resources' started by MineStein, Jun 15, 2014.

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

    Phasesaber

    I know this is for the content and the code itself, but you need a new intro.... just ew....
    (I see WAY to many generic intros, please help the internet by getting a new one or making your own.)
     
  2. MineStein
    I can barely hear you at 100% computer volume and 100% youtube volume. I don't know if anyone mentioned this already, but you should raise the volume before you render the video.
     
  3. Offline

    MineStein

    Assist I am aware of the audio problem. It isn't normally like that. My microphone is broken, I already posted that I was getting a new mic.

    Phasesaber I have been looking :)

    A new video today! This time, we write a basic anti-swear plugin! Check it here!

    Note: Radio Speed Code Part 2 is Coming out Tomorrow

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  4. Offline

    MineStein

    Another video! This time, I upload part 2/2 of our Radio plugin! Here
     
  5. Offline

    Phasesaber

    When you do a speed-code, you want to have the plugin be a long plugin. Like, MORE THAN 2 CLASSES. Long enough to make you have to, you know, SPEED IT UP. Anywho, make on a minigame plugin or something.
     
  6. Offline

    MineStein

    Phasesaber Sorry, I am still finding the time to get a new microphone for Bukkit tutorials :/
     
  7. Offline

    ZodiacTheories

    MineStein

    Just noticed your second tutorial.

    Two things:

    1. Get that intro sorted out. I would even make one for you!

    2. Microphone, I know that you said that you are getting a new one but I do not recommend making videos without your new one as you might lose subs due to your mic :p
     
  8. Offline

    MineStein

    ZodiacTheories
    1) I had someone making an intro for me, but he never did. He just keeps making other ones on his channel! :p Kinda annoying.

    2) I know XD Sorry, had to upload something.

    New video! Today we code a hub plugin! Check it out here!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
    ZodiacTheories likes this.
  9. Offline

    xTigerRebornx

    MineStein A few things I noticed from your video:
    1. In a few of your events, I notice that you do something like this (pseudocode)
    Code:
    if(conditions){
      event.setCancelled(true)
    } else {
      event.setCancelled(false);
    }
    Why are you putting the else statement? It'd make more sense to just let other plugins handle that part, instead of you (potentially) breaking a lower priority because of that else statement. This can be seen in your login listener and your damage listener (I believe, might not be exact)

    2. Why are you using a hard-coded color code instead of the ChatColor enum, the API put it in there so that you don't use that :p

    3. In your listener for the "banned", how come you are relying on your own list for those who are banned? It'd be much smarter just to insert a Player#isBanned() check instead of relying on your Collection (that you never save)

    4. Your InventoryClickEvent listener, you never check for the possibility that the clicked item can be null, you just automatically go for the type

    Note: These are just things I noticed that would lead to problems when people try to learn off of it and think "This is the right way to do it" and things that may cause break-age. I don't intend to be bashful, only to give constructive criticism.

    Some things I liked:
    Volume Warning (RIP those who didn't read)
    IDE Color scheme
    The idea of "Speed Coding"
     
    ZodiacTheories likes this.
  10. Offline

    MineStein

    xTigerRebornx
    1) I prefer using the color codes, it makes the line a lot shorter than it would be using the enum.
    2) You are right about the banned ArrayList.
    3) About the null check, I think I did?

    Code:java
    1. @EventHandler
    2. public void onInventoryInteract(InventoryClickEvent event) {
    3. if (event.getInventory().getName().equals(menuGUI.getName())) {
    4. if (event.getCurrentItem().getType()==null) {
    5. return;
    6. }
    7. if (event.getCurrentItem().getType()==Material.WOOL) {
    8. Player p = (Player) event.getWhoClicked();
    9. p.sendMessage(Core.TAG + "§3Teleporting to Info...");
    10. //TODO Teleport player to info
    11. }
    12. }
    13. else {
    14. return;
    15. }
    16. }


    Things you liked:
    1) Yep, the volume warning was necessary.
    2) I love the color scheme as well!
    3) I needed some sort of filler for now, until I get my mic fixed/bought. I thought about how to make something that is easy to create, and easy to edit.

    Thanks for the feedback! :)
     
  11. Offline

    xTigerRebornx

    MineStein You have a check for the current item's type, but not for the current item itself. What happens when they click outside the inventory? What happens when they click an empty slot? An NPE will be thrown for trying to call ItemStack#getType() on a null ItemStack.

    Edit: Would like a response to the very first point (if you don't mind)
     
  12. Offline

    Gater12

    MineStein
    You should use enums. Generally good practice. What if the color code suddenly had a change?

    Should encourage new developers to do the right thing.
     
  13. Offline

    MineStein

    xTigerRebornx
    Yeah, I know about the else statement. It was a bad habit I formed when I was learning.

    Gater12
    The bukkit tutorials use the ChatColor enum. Those are meant for learning. The intent of speed codes (On my channel) is to watch, enjoy the music, etc. But not for learning :)
     
  14. Offline

    Phasesaber

    I like hardcoding them in instead of using the enum, looks nicer, and is easy to put. §g took me 3 seconds, but if I want to use the API, I have to do ChatColor.BANANAN. Too much work.

    Same thing I said above, plus the color codes won't change. If they did, the community would freak out more than the EULA changes.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  15. Offline

    Gater12

    Phasesaber
    You could always create a method to colorize for you. Or static imports.
     
    Phasesaber likes this.
  16. Offline

    Phasesaber

    Again, too much work. Just Alt+2+1+<color code> and bam!
     
  17. Offline

    MineStein

    Phasesaber I prefer hardcoding them in as well.
     
    Phasesaber likes this.
  18. Offline

    xTigerRebornx

    Phasesaber It can be shorter, but for the sake of a "tutorial" video, you should teach the Bukkit API way (since it is a tutorial for learning the API/Making plugins w/ it)

    And if what you are concerned about is time and looking nicer, import the ChatColor statically.

    Code:
    import static org.bukkit.ChatColor.*;
     
    public void color(){
      System.out.println(RED + "Red Words");
    }
    This looks "nicer"/Human-readable and may save time instead of remembering the numbers/letters for corresponding.
     
  19. Offline

    MineStein

    xTigerRebornx Yeah, I have used the static import before. I prefer to just use the § symbol anyways.
     
    Phasesaber likes this.
  20. Offline

    xTigerRebornx

    MineStein Another thing about what people have mentioned:
    What if those color codes changed? What if those became deprecated in MC and they switch to something else, like Strings? Anything not using the ChatColor enum would eventually break, but the ChatColor enum would stay updated.
     
  21. Offline

    MineStein

  22. Offline

    xTigerRebornx

    MineStein The API is designed to work cross-versions. I doubt there are any (reasonable) situtations where it wouldn't change (unless it was deprecated in favor of something better)
     
  23. Offline

    KmanCrazy

    MineStein MineStein Bukkit is not meant for us to use and then use the minecraft way of doing it. If you do that you might as well just not use the api and try to code your own bukkit. Using the symbol could get changed and that wouldn't be good for your plugin.
     
  24. Offline

    MineStein

    KmanCrazy You are completely neglecting what I previously said.
     
  25. Offline

    KmanCrazy

    I honestly don't think the bukkit forums are a place to advertise your channel. Saying that you have created a channel for bukkit tutorials is ok and then the link but a link to every single video especially just minecraft videos that don't involve anything with bukkit tutorials. It is in the wrong place to be advertising. This thread is in plugin development and should not be used to advertise your channel. Maybe in off topic or minecraft discussion but anywhere else advertising your channel should not be right.
     
    tehface likes this.
  26. Offline

    MineStein

  27. Offline

    ResultStatic

    MineStein I learned everything i know from watching HowToBasic's tutorials. He thoroughly explains the topic at hand and connects with his viewers
     
    drpk and ABDTGaming like this.
  28. Offline

    MineStein

    Hey guys! I am back with another Bukkit video. Another episode of Bukkit Randoms here.
     
  29. Offline

    ABDTGaming

    Simple, use "§"
     
  30. Offline

    xTigerRebornx

    ABDTGaming You've seemed to miss the whole "It changed" part. If it is no longer §, then your plugin that you've hardcoded that symbol in breaks, while if you were using ChatColor, chances are that Bukkit has updated it to support the new color code formatting.
     
Thread Status:
Not open for further replies.

Share This Page