SpleefAPI - Modes

Coming in EasySpleef v0.1.2
WARNING! Put this in the onEnable Method

Note: This is meant for version compatibility problems. This allows YOUR plugin to not throw any errors. This may not be required. Version Syntax example: 0.1.2

if(!Bukkit.getPluginManager().getPlugin("EasySpleef").getDescription().getVersion().equalsIgnoreCase("easySpleefVersionYourUsing")){
	Bukkit.getPluginManager().disablePlugin(this);
	return;
}
Create a Mode
import org.bukkit.entity.Player;

import com.alpharex12.spleef.SpleefArena;
import com.alpharex12.spleef.modes.Mode;

public class CustomMode extends Mode {

	public CustomMode() {
		super("Test Mode");
	}

	public void applyInventory(Player p) {
	}

	public boolean pvp() {
		return false;
	}

	public void tick(SpleefArena a) {
	}

	public void playerTick(SpleefArena a, Player p) {
	}

	public String getDescription() {
		return "putYourDescriptionHere";
	}

}
Register a Mode

Note: Must be in onEnable() Method

CustomMode mode = new CustomMode();
SpleefAPI.registerMode(modeInstance);

Comments

Posts Quoted:
Reply
Clear All Quotes