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:

  1. Create a new project
  2. Create a package with this name: "me.black_ixx.commandRank.custom"
  3. Create a class named CustomAction / CustomBoolean
  4. Paste the default code
  5. Change the code (consider the notices)
  6. Export the project
  7. Open the CommandRank.jar
  8. Replace the CustomBoolean.class (org.black_ixx.commandRank.custom.CustomBoolean.class) with your new class.
  9. Finished

Comments

Posts Quoted:
Reply
Clear All Quotes