Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Foldager's fix for Trevor1134's code
- //new version
- public boolean onCommand(CommandSender sender, Command cmd, String CommandLabel, String[] args) {
- if (cmd.getName().equalsIgnoreCase("justusadmin")) {
- if (sender.hasPermission("justusadmin.help")) {
- if (args.length == 0) {
- //do /justusadmin help
- } else if (args.length == 1){
- if (args[0] == "help") {
- //help message
- } else {
- //do /justusadmin help
- }
- } else if (args.length < 3){
- if (args[0] == "help") {
- if (args.length == 1) {
- //show help
- } else if (args.length == 2) {
- if (args[1] == "1" {
- } else if (args[1] == "1"){
- //show page 1
- } else if (args[1] == "2"){
- //show page 2
- } else {
- //do help cmd
- }
- }
- if (args[1] == "1")
- } else if (args[0] == "help") && (args[1] == "2") {
- //page 2
- } else {
- //do /justusadmin help
- }
- }
- }
- }
- }
- //old version
- public boolean onCommand(CommandSender sender, Command cmd, String CommandLabel, String[] args) {
- if (cmd.getName().equalsIgnoreCase("justusadmin")) {
- if (sender.hasPermission("justusadmin.help")) {
- if (args.length == 0) {
- //do /justusadmin help
- } else if (args.length == 1){
- if (args[0] == "help") {
- //help message
- } else {
- //do /justusadmin help
- }
- } else if (args.length == 2){
- if (args[0] == "help") && (args[1] == "1") {
- //page 1
- } else if (args[0] == "help") && (args[1] == "2") {
- //page 2
- } else {
- //do /justusadmin help
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement