Api

Main API

Use this to force Pantheons on before your plugin tries working!

PluginManager pm = getServer().getPluginManager();
        Pantheons panth = (Pantheons)pm.getPlugin("Pantheons");
        if (!panth.isEnabled())
        {
            pm.enablePlugin(panth);
        }

Listeners

Use these to register listeners for the 3 events,

LevelEvent

PantheonListeners pl=new PantheonListeners();
        pl.addLevelListener(new LevelListener() {

            @Override
            public void levelChanged(LevelEvent event)
            {
                //THE METHOD TO CALL HERE
            }
        });

LevelEvent has three things in it.

  • event.getPlayer() - returns player
  • event.isUp() - return true if they leveled up and false if they leveled down
  • event.god() - is the God involved

WorshipEvent

PantheonListeners pl=new PantheonListeners();
        pl.addWorshipListener(new WorshipListener() {

            @Override
            public void worshipChanged(WorshipEvent event)
            {
                //THE METHOD TO CALL HERE
            }
        });

WorshipEvent has three things in it.

  • event.getPlayer() - returns player
  • event.isWorshiping() - return true if they started worshiping and false if they fosaken
  • event.god() - is the God involved

FollowEvent

PantheonListeners pl=new PantheonListeners();
        pl.addFollowListener(new FollowListener() {

            @Override
            public void followChanged(FollowEvent event)
            {
                //THE METHOD TO CALL HERE
            }
        });

FollowEvent has three things in it.

  • event.getPlayer() - returns player
  • event.isFollowing() - return true if they started Following and false if they fosaken during following
  • event.god() - is the God involved

Registration API

Most of the API returns a boolean if it worked or not!

API.registerGod(String name);
This is mandatory for checking compatibility and returning the Gods variable.

(OPTIONAL) API.registerSacrifice(Gods god, String sacrifice, int amount);
Use this to register a initiation sacrifice and the amount to your God.

(OPTIONAL) API.registerItems(Gods god, int items[]. int amount[]);
Use this to register an items array and corresponding amount array to the requirements of initiation to your God

(OPTIONAL) API.registerPVP(Gods god, int amount, boolean useOppossing);
Use this to register pvp as a requirement for your God's initiation. useOppossing means that only kills of an oppossing God's followers will count.

(OPTIONAL) API.registerSuicide(Gods god, int amount);
Use this to register suicide as a requirement for initiation to your God.

(OPTIONAL) API.pcInitiation(Gods god);
Use this to tell the API you have additional plugin controlled requirements

(OPTIONAL) API.registerFaithSacrifice(Gods god, String sacrifices[]);
Use this to register an array of mob names that can be killed for faith for your Gods.

(OPTIONAL) API.registerFaithPVP(Gods god, boolean useOppossing);
Use this to register PVP as a way to gain faith for your God, usOppossing locks it to ONLU oppossing God's followers.

(OPTIONAL) API.registerFaithItems(Gods god, int items[]);
Register an array of items that can be used to gain faith for your God.

(OPTIONAL) API.pcFaith(Gods god);
Tell the API that there is a way for your God to gain faith that is controlled by it's plugin.

(OPTIONAL) API.registerOpposingGods(Gods god, String name[]);
Use this to register your opposing God's by name.

(OPTIONAL) API.registerFaithLossKills(Gods god, String kills[]);
Use this to register an array of mobs that cause you to lose faith.

(OPTIONAL) API.registerFaithLossPVP(Gods god, boolean useSame);
Use this to register PVP as a way to lose faith, useSame makes it so only killing the followers of this God while following this God causes you to lose faith.

(OPTIONAL) API.registerPunish(Gods god, String type);
Use this to register punishment if someone forsakes your God, takes fire, lightning or death.

API.registerTitles(Gods god, String titles[], int levels[]);
Use this to register an array of titles and corresponding levels to your God. The first Level and title must be for Level 0 or else level 0 will default to it anyway.

API.registerMessages(Gods god, String description, String requisits, String initialization, String leave, String perks, String faith, String faithLoss);
Use this to register the description, initilization requisits, initiliazation messege, leave messege, perk description, faith description and faith Loss Description to your God.

API.finalizeGod(Gods god);
Use this to finalize your God and activate it.

Player API

API.rank(Player player);
Returns the rank of the player

API.faith(Player player);
Returns the faith of the player

API.level(Player player);
Returns the level of the player

API.addFaith(Player player, int amount);
Adds faith to the player

API.removeFaith(Player player, int amount);
Removes faith from the player

API.setFaith(Player player, int amount);
Sets the players faith

API.getGod(Player player);
Returns the players God, NU113 if there is not one;

API.getFollow(Player player);
Returns the player's Follow God, NU113 if there is not one;

API.setGod(Player player);
Forces initiation on the player if they are eligable for it

API.removeGod(Player player);
Causes the player to forsake his God

API.setControlVariable(Player player);
Toggles the player having completed the plugin controlled initiation.

API.addSacrifice(Player player);
Adds a sacrifice point to the player.

API.removeSacrifice(Player player);
Removes a sacrifice point from the player.

API.addPVP(Player player);
Adds a PVP point to the player.

API.removePVP(Player player);
Removes a PVP point from the player.

API.addSuicide(Player player);
Adds a Suicide point to the player.

API.removeSuicide(Player player);
Removes a Suicide point from the player.

API.readSacrifice(Player player);
Read the player's sacrifice points.

API.readSuicide(Player player);
Read the player's suicide points.

API.readPVP(Player player);
Read the player's PVP points.

Configuration API

API.hasGodPermissions(Player player);
Check to see if the player has permissions for essential commands.

API.pvpEnabled();
Checks to see if this feature is enabled.

API.sacrificeEnabled();
Checks to see if this feature is enabled.

API.suicideEnabled();
Checks to see if this feature is enabled.

API.punishEnabled();
Checks to see if this feature is enabled.

API.levelCap();
Checks the level cap.

API.faithCap();
Checks the faith cap.

ALLOWED MONSTERS /w SPELLING

chicken
sheep
cow
pig
squid
wolf
zombie
skeleton
spider
creeper
giant
ghast
pigzombie

ALLOWED PUNISH TYPES

fire
lightning
death