β οΈ Warning: This page is still under construction!
Objects
This page details and outlines the object classes in the plugin, attempting to give a detailed explanation of their functionality, both from a programming perspective and an in-game perspective.
Object Hierarchy
π Note: This diagram is mainly just a placeholder for now but should give the general sense of the object-class hierarchy.
ββββββββββ
βNameableβ
βββββ¬βββββ
β
β
βΌ
βββββββββββββ
βCultsObjectβ
βββββββββββββ€
ββββββββββββΌβ΄ββββββββββββ
β β β
β β β
β βΌ β
β ββββββ β
β βCultβ β
β ββββββ β
β β² β² β
βΌ β β βΌ
ββββββββββ β β βββββββ
βBelieverβββββ¬βββ ββββββββββ€Deityβ
ββββ΄βββββββββ΄ββββ€ βββββββ
β β
β Believer β
β β
β Head Priest β
β β
β Priest β
β β
βββββββββββββββββ
Nameable
A simple interface to show that a class can be named, agnostic if itβs a CultsObject or not.
public interface Nameable {
/**
* Get the name of the specified object
* @return A String representing the name of the object.
*/
String getName();
/**
* Gets the formatted name of the object.
* @return The formatted name.
*/
default String getFormattedName() {
return getName().replace('_', ' ');
}
}
CultsObject
The CultsObject class is the main class that implements Nameable, all other object classes should extend this one.
public abstract class CultsObject implements Nameable {
String name;
UUID id;
protected CultsObject(String name) {
this.name = name;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setId(UUID id) {
this.id = id;
}
public UUID getId() {
return id;
}
@Override
public String toString() {
return getName();
}
}
Believer
The Believer class is a simple class that extends CultsObject and its main purpose is to register the player as a βbelieverβ entity.
public class Believer extends CultsObject {
String name;
protected Believer(String name) {
super(name);
}
@Override
public String getName() {
return name;
}
@Override
public UUID getId() {
return super.getId();
}
}
Deity
The Deity class also extends CultsObject. The purpose of this class is to represent a βdeity/godβ entity which is created upon interaction with an Altar for the first time.
Cult
Finally, we reach the Cult object. A cult takes a list of Believers as its members, a single Believer as its Head Priest and a single Diety as itβs main deity (agnostic of whether itβs part of a Pantheon or not). Believers can be promoted to Priest, which functions as a sort of βofficerβ or moderator of the cult. It also records the coords of its Altar and saves that as its βholy landβ.
Holy Land
The Holy Land is the chunk containing the Altar. This creates a geographical βhomeβ for the cult. This is to help track a series of cult-specific events, such as but not limited to a Sacrafice.
Transmutation
See Transmutations
Transmutationsare a mechanic of the cults system that allows for believers of a cult to recieve βsupernaturalβ powers from being devout worshippers of their deity. This includes various things such as increased strength buff, jump boost, mining speed etc.