How would i use Code (Text): String message = ""; if(args.length > 2) { for (int i = 1; i < args.length; i++) { message += args[i] + " "; } } In a different class? Like Something like Code (Text): target.kickPlayer(ChatColor.RED + "You have been banned from this server!" + MyOtherClass.message);[CODE]
What? ._. I don't think I understand what exactly you're trying to do? You can use that code snippet in any class such that there's an array titled "args" (presumably from an #onCommand() method)
Why do you want it to be in a different class? Why not just have that in the ban command class so you can grab it easily?
You would need to call an instance of the class and get the variable. For what your doing though, you should have this all in one class.