Advertisement
foldagerdk

Foldager's fix for Trevor1134's code

Jun 23rd, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.58 KB | None | 0 0
  1. //Foldager's fix for Trevor1134's code
  2. //new version
  3.  
  4. public boolean onCommand(CommandSender sender, Command cmd, String CommandLabel, String[] args) {
  5.     if (cmd.getName().equalsIgnoreCase("justusadmin")) {
  6.         if (sender.hasPermission("justusadmin.help")) {
  7.             if (args.length == 0) {
  8.                 //do /justusadmin help
  9.             } else if (args.length == 1){
  10.                 if (args[0] == "help") {
  11.                     //help message
  12.                 } else {
  13.                     //do /justusadmin help
  14.                 }
  15.             } else if (args.length < 3){
  16.                 if (args[0] == "help") {
  17.                     if (args.length == 1) {
  18.                     //show help
  19.                     } else if (args.length == 2) {
  20.                         if (args[1] == "1" {
  21.                         } else if (args[1] == "1"){
  22.                             //show page 1
  23.                         } else if (args[1] == "2"){
  24.                             //show page 2
  25.                         } else {
  26.                             //do help cmd
  27.                         }
  28.                     }
  29.                     if (args[1] == "1")
  30.                 } else if (args[0] == "help") && (args[1] == "2") {
  31.                     //page 2
  32.                 } else {
  33.                     //do /justusadmin help
  34.                 }
  35.             }
  36.         }
  37.     }
  38. }
  39.  
  40.  
  41.  
  42.  
  43.  
  44. //old version
  45. public boolean onCommand(CommandSender sender, Command cmd, String CommandLabel, String[] args) {
  46.     if (cmd.getName().equalsIgnoreCase("justusadmin")) {
  47.         if (sender.hasPermission("justusadmin.help")) {
  48.             if (args.length == 0) {
  49.                 //do /justusadmin help
  50.             } else if (args.length == 1){
  51.                 if (args[0] == "help") {
  52.                     //help message
  53.                 } else {
  54.                     //do /justusadmin help
  55.                 }
  56.             } else if (args.length == 2){
  57.                 if (args[0] == "help") && (args[1] == "1") {
  58.                     //page 1
  59.                 } else if (args[0] == "help") && (args[1] == "2") {
  60.                     //page 2
  61.                 } else {
  62.                     //do /justusadmin help
  63.                 }
  64.             }
  65.         }
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement