Skip to content

Commit

Permalink
Finish adding "Depenizen" to @plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 17, 2014
1 parent 3b62286 commit 4dab3b2
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 52 deletions.
26 changes: 13 additions & 13 deletions src/main/java/net/gnomeffinway/depenizen/objects/dFaction.java
Expand Up @@ -109,7 +109,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element(Decimal)
// @description
// Returns the amount of money the faction currently has.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
if (attribute.startsWith("balance"))
return new Element(Money.get(faction))
Expand All @@ -120,7 +120,7 @@ public String getAttribute(Attribute attribute) {
// @returns dLocation
// @description
// Returns the location of the faction's home, if any.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("home")) {
if (faction.hasHome())
Expand All @@ -133,7 +133,7 @@ else if (attribute.startsWith("home")) {
// @returns Element
// @description
// Returns the unique ID for this faction.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("id")) {
return new Element(faction.getId()).getAttribute(attribute.fulfill(1));
Expand All @@ -144,7 +144,7 @@ else if (attribute.startsWith("id")) {
// @returns Element(Boolean)
// @description
// Returns true if the faction is open.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("isopen") || attribute.startsWith("is_open"))
return new Element(faction.isOpen())
Expand All @@ -155,7 +155,7 @@ else if (attribute.startsWith("isopen") || attribute.startsWith("is_open"))
// @returns Element(Boolean)
// @description
// Returns true if the faction is peaceful.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("ispeaceful") || attribute.startsWith("is_peaceful"))
return new Element(faction.getFlag(FFlag.PEACEFUL))
Expand All @@ -166,7 +166,7 @@ else if (attribute.startsWith("ispeaceful") || attribute.startsWith("is_peaceful
// @returns Element(Boolean)
// @description
// Returns true if the faction is permanent.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("ispermanent") || attribute.startsWith("is_permanent"))
return new Element(faction.getFlag(FFlag.PERMANENT))
Expand All @@ -177,7 +177,7 @@ else if (attribute.startsWith("ispermanent") || attribute.startsWith("is_permane
// @returns dPlayer
// @description
// Returns the faction's leader as a dPlayer.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("leader")) {
if (faction.getLeader() != null)
Expand All @@ -190,7 +190,7 @@ else if (attribute.startsWith("leader")) {
// @returns Element
// @description
// Returns the name of the faction.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("name"))
return new Element(faction.getName())
Expand All @@ -201,7 +201,7 @@ else if (attribute.startsWith("name"))
// @returns Element(Number)
// @description
// Returns the number of players in the faction.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("playercount") || attribute.startsWith("player_count"))
return new Element(faction.getUPlayers().size())
Expand All @@ -212,7 +212,7 @@ else if (attribute.startsWith("playercount") || attribute.startsWith("player_cou
// @returns Element(Decimal)
// @description
// Returns the amount of power the faction currently has.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("power"))
return new Element(faction.getPower())
Expand All @@ -223,7 +223,7 @@ else if (attribute.startsWith("power"))
// @returns Element
// @description
// Returns the current relation between the faction and another faction.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("relation")) {
dFaction to = valueOf(attribute.getContext(1));
Expand All @@ -238,7 +238,7 @@ else if (attribute.startsWith("relation")) {
// @returns Element(Number)
// @description
// Returns the amount of land the faction has.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
else if (attribute.startsWith("size"))
return new Element(faction.getLandCount())
Expand All @@ -250,7 +250,7 @@ else if (attribute.startsWith("size"))
// @description
// Always returns 'Faction' for dFaction objects. All objects fetchable by the Object Fetcher will return the
// type of object that is fulfilling this attribute.
// @plugin Factions
// @plugin Depenizen, Factions
// -->
if (attribute.startsWith("type")) {
return new Element("Faction").getAttribute(attribute.fulfill(1));
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/net/gnomeffinway/depenizen/objects/dNation.java
Expand Up @@ -101,7 +101,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element(Decimal)
// @description
// Returns the current money balance of the nation.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
if (attribute.startsWith("balance")) {
try {
Expand All @@ -117,7 +117,7 @@ public String getAttribute(Attribute attribute) {
// @returns dTown
// @description
// Returns the capital city of the nation as a dTown.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("capital")) {
if (nation.hasCapital())
Expand All @@ -130,7 +130,7 @@ else if (attribute.startsWith("capital")) {
// @returns Element(Boolean)
// @description
// Returns true if the nation is neutral.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("isneutral") || attribute.startsWith("is_neutral"))
return new Element(nation.isNeutral())
Expand All @@ -141,7 +141,7 @@ else if (attribute.startsWith("isneutral") || attribute.startsWith("is_neutral")
// @returns dPlayer
// @description
// Returns the king of the nation.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("king"))
return dPlayer.valueOf(nation.getCapital().getMayor().getName())
Expand All @@ -152,7 +152,7 @@ else if (attribute.startsWith("king"))
// @returns Element
// @description
// Returns the nation's name.
// @plugin Towny
// @plugin Depenizen, Towny
else if (attribute.startsWith("name"))
return new Element(nation.getName())
.getAttribute(attribute.fulfill(1));
Expand All @@ -162,7 +162,7 @@ else if (attribute.startsWith("name"))
// @returns Element(Number)
// @description
// Returns the amount of players in the nation.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("playercount") || attribute.startsWith("player_count"))
return new Element(nation.getNumResidents())
Expand All @@ -173,7 +173,7 @@ else if (attribute.startsWith("playercount") || attribute.startsWith("player_cou
// @returns Element
// @description
// Returns the nation's current relation with another nation.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("relation")) {

Expand All @@ -196,7 +196,7 @@ else if (nation.hasEnemy(to.nation))
// @returns Element
// @description
// Returns the nation's tag.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("tag")) {
if (nation.hasTag())
Expand All @@ -209,7 +209,7 @@ else if (attribute.startsWith("tag")) {
// @returns Element(Decimal)
// @description
// Returns the nation's current taxes.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("taxes"))
return new Element(nation.getTaxes())
Expand All @@ -220,7 +220,7 @@ else if (attribute.startsWith("taxes"))
// @returns Element(Number)
// @description
// Returns the number of towns in the nation.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
else if (attribute.startsWith("towncount") || attribute.startsWith("town_count"))
return new Element(nation.getNumTowns())
Expand All @@ -232,7 +232,7 @@ else if (attribute.startsWith("towncount") || attribute.startsWith("town_count")
// @description
// Always returns 'Nation' for dNation objects. All objects fetchable by the Object Fetcher will return the
// type of object that is fulfilling this attribute.
// @plugin Towny
// @plugin Depenizen, Towny
// -->
if (attribute.startsWith("type")) {
return new Element("Nation").getAttribute(attribute.fulfill(1));
Expand Down
Expand Up @@ -103,7 +103,7 @@ public String getAttribute(Attribute attribute) {
// @returns dList(dMaterial)
// @description
// Lists the armor materials allowed in the class.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("allowed_armor")) {
Set<Material> allowed = heroClass.getAllowedArmor();
Expand All @@ -119,7 +119,7 @@ public String getAttribute(Attribute attribute) {
// @returns dList(dMaterial)
// @description
// Lists the weapon materials allowed in the class.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("allowed_weapons")) {
Set<Material> allowed = heroClass.getAllowedWeapons();
Expand All @@ -135,7 +135,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element
// @description
// Returns the name of the hero class.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("name")) {
return new Element(heroClass.getName()).getAttribute(attribute.fulfill(1));
Expand All @@ -147,7 +147,7 @@ public String getAttribute(Attribute attribute) {
// @description
// Always returns 'Hero Class' for HeroesClass objects. All objects fetchable by the Object Fetcher will return the
// type of object that is fulfilling this attribute.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("type")) {
return new Element("Hero Class").getAttribute(attribute.fulfill(1));
Expand Down
Expand Up @@ -159,7 +159,7 @@ public String getAttribute(Attribute attribute) {
// @description
// Returns the level of the hero for the specified class.
// If no class is specified, returns the hero's current highest level.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
else if(attribute.startsWith("level")) {
if (attribute.hasContext(1)) {
Expand All @@ -179,7 +179,7 @@ else if(attribute.startsWith("level")) {
// @returns dPlayer
// @description
// Returns the leader of the hero's party.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("party.leader")) {
return dPlayer.mirrorBukkitPlayer(hero.getParty().getLeader().getPlayer())
Expand All @@ -191,7 +191,7 @@ else if(attribute.startsWith("level")) {
// @returns dList(dPlayer)
// @description
// Returns a list of players currently in the hero's party.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("party.members")) {
dList members = new dList();
Expand All @@ -206,7 +206,7 @@ else if(attribute.startsWith("level")) {
// @returns HeroesClass
// @description
// Returns the primary class for the hero.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("primary_class")) {
return new HeroesClass(hero.getHeroClass()).getAttribute(attribute.fulfill(1));
Expand All @@ -217,7 +217,7 @@ else if(attribute.startsWith("level")) {
// @returns HeroesClass
// @description
// Returns the secondary class for the hero.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("secondary_class")) {
return new HeroesClass(hero.getHeroClass()).getAttribute(attribute.fulfill(1));
Expand All @@ -229,7 +229,7 @@ else if(attribute.startsWith("level")) {
// @description
// Always returns 'Hero' for HeroesHero objects. All objects fetchable by the Object Fetcher will return the
// type of object that is fulfilling this attribute.
// @plugin Heroes
// @plugin Depenizen, Heroes
// -->
if (attribute.startsWith("type")) {
return new Element("Hero").getAttribute(attribute.fulfill(1));
Expand Down
Expand Up @@ -138,7 +138,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element(Number)
// @description
// Returns the maximum experience a player can get in a specified job.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
if (attribute.startsWith("max")) {
return new Element(jobProgression.getMaxExperience())
Expand All @@ -150,7 +150,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element(Number)
// @description
// Returns the current experience level a player has in a specified job.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
if (attribute.startsWith("level")) {
return new Element(jobProgression.getLevel())
Expand All @@ -162,7 +162,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element(Double)
// @description
// Returns the current experience a player has in a specified job.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
return new Element(jobProgression.getExperience()).getAttribute(attribute);
}
Expand All @@ -173,7 +173,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element(ChatColor)
// @description
// Returns the ChatColor of the job.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
if (attribute.startsWith("color"))
return new Element(job.getChatColor().toString())
Expand All @@ -184,7 +184,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element
// @description
// Returns the description of the job.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
else if (attribute.startsWith("description"))
return new Element(job.getDescription()).getAttribute(attribute.fulfill(1));
Expand All @@ -197,7 +197,7 @@ else if (attribute.startsWith("name")) {
// @returns Element
// @description
// Returns the shortened name of the job.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
if (attribute.startsWith("short")) {
return new Element(job.getShortName())
Expand All @@ -209,7 +209,7 @@ else if (attribute.startsWith("name")) {
// @returns Element
// @description
// Returns the name of the job.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
return new Element(job.getName()).getAttribute(attribute);
}
Expand All @@ -220,7 +220,7 @@ else if (attribute.startsWith("name")) {
// @description
// Always returns 'Job' for JobsJob objects. All objects fetchable by the Object Fetcher will return the
// type of object that is fulfilling this attribute.
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
if (attribute.startsWith("type")) {
return new Element("Job").getAttribute(attribute.fulfill(1));
Expand Down
Expand Up @@ -60,7 +60,7 @@ public void adjust(Mechanism mechanism) {
// Sets the owner of the job, to enable player-required tags.
// @tags
// None
// @plugin Jobs
// @plugin Depenizen, Jobs
// -->
if (mechanism.matches("player") && mechanism.requireObject(dPlayer.class)) {
job.setOwner(mechanism.getValue().asType(dPlayer.class));
Expand Down

0 comments on commit 4dab3b2

Please sign in to comment.