Custom boolean and action
You can create custom booleans and actions if you use CommandRank v2.0 or higher.
The default CustomAction looks like that:
package me.black_ixx.commandRank.custom; import org.bukkit.entity.Player; public class CustomAction{ public static void execute(Player p) { // /* *Write in your code here * *Replace the CustomAction.class (org.black_ixx.commandRank.custom.CustomAction.class) *with your new class. * *Dont change the code outside of the // and // */ // }
The default CustomBoolean looks like that:
package me.black_ixx.commandRank.custom; import org.bukkit.entity.Player; public class CustomBoolean{ public static boolean check(Player p) { // /* *Write in your code here * *Replace the CustomBoolean.class (org.black_ixx.commandRank.custom.CustomBoolean.class) *with your new class. * *Dont change the code outside of the // and // * *If the check returns with false, the RankUp will be canceled. */ return true; // } }
Now you have to follow this steps:
- Create a new project
- Create a package with this name: "me.black_ixx.commandRank.custom"
- Create a class named CustomAction / CustomBoolean
- Paste the default code
- Change the code (consider the notices)
- Export the project
- Open the CommandRank.jar
- Replace the CustomBoolean.class (org.black_ixx.commandRank.custom.CustomBoolean.class) with your new class.
- Finished
Comments