Bungee - Spigot RCM 1.1 1.1

this is a new plugin that is being worked on 24/7 to get better and better everyday

  1. RealClientMod submitted a new resource:

    RCM 1.0 - this is a new plugin that is being worked on 24/7 to get better and better everyday

    Read more about this resource...
     
  2. RealClientMod updated RCM 1.0 with a new update entry:

    RCM 1.1

    Read the rest of this update entry...
     
  3. RealClientMod updated RCM 1.1 with a new update entry:

    RCM 1.1

    Read the rest of this update entry...
     
  4. Hei RealClientMod,

    i decompiled your plugin to see how clean and efficient your code is.
    My english is bad but i hope i can discribe you what i mean.

    Just an example:
    In one class you used a StringBuilder to make alle args to one String.
    In another class you wanted the args as string again bit this time you made a the same without a stringbuilder.
    In a small project this is no problem but if you have a big project you have to be a consistant programmer.

    I just looked at your code. I haven't tryed it on my server but i found some bugs and with 'some' i mean a lot.

    For exmaple:
    Code (Text):

      String msg = args[0];
        for (int i = 1; i < args.length; i++) {
      msg = msg + " " + args[i];
      }
     
    Thats your code for making the array with the args in it to a string. But if you execute the command you show see that the first word gets cut off.
    If you execute the command like this for exmaple:"/broadcast this is a test". 'than' this is args[0], 'is' is args[1] and so on... you start getting the args on args[1] wich is 'is'. So after the for-loop the String msg = " is a test". Oh and you the the space at the beginning? Thats also a 'problem'. Well... i would do it like this;

    Code (Text):

      String msg = null;
      for (String s : args) {
        if(msg == null){
           msg = s;
        }else{
           msg = msg + " " + s;
        }
      }
     
    And here is another problem. You made for class-files. For each gamemode one .class. Thats totaly efficient.
    Why do you dont make a single .class file with a switch and in each switch the if-statement that asks for the permission?


    I havent coded it completly because i am lazy and i just want to show what i mean.
    Code (Text):

    switch(args[0]){
      case 'creative':
    case '1':
        if(player.hasPermission("rcm.gamemode.creative"){
          player.setGameMode(GameMode.CREATIVE);
          p.sendMessage("Your Message Here!");
          return true;
        }else{
          p.sendMessage("NO PERMISSION!");
          return true;
        }
        break;
      case 'adventure':
      case '0':
        if(player.hasPermission("rcm.gamemode.adventure"){
          player.setGameMode(GameMode.ADVENTURE);
          p.sendMessage("Your Message Here!");
          return true;
        }else{
          p.sendMessage("NO PERMISSION!");
          return true;
        }
        break;
      default:
        return false;
        break;
    }
     

    But for a beginner its ok and you should keep on :)

    EDIT:// Oh and could you explain why u change the gamemode in the vanish command?!
     
  5. RealClientMod updated RCM 1.1 with a new update entry:

    RCM 1.1

    Read the rest of this update entry...
     
  6. RealClientMod updated RCM 1.1 with a new update entry:

    RCM 1.1

    Read the rest of this update entry...
     
  7. RealClientMod updated RCM 1.1 with a new update entry:

    RCM 1.1

    Read the rest of this update entry...
     
  8. i don't know why i added gamemode to vanish i removed it so u can download the latest build to my plugin and i put it in different classes for the gamemode because i just wanted it to be short and not long lines of code
     
  9. thanks for the support anyway!
     
  10. RealClientMod updated RCM 1.1 with a new update entry:

    RCM

    Read the rest of this update entry...