From db03d466baba4a6bbf111873cb9464c241d82d8e Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sun, 6 Feb 2011 16:07:10 +0100 Subject: [PATCH] A deinvite bugfix and some color formating misses --- plugin.yml | 2 +- src/com/bukkit/mcteam/factions/Commands.java | 6 +++--- src/com/bukkit/mcteam/factions/entities/Conf.java | 8 ++++---- src/com/bukkit/mcteam/factions/entities/Faction.java | 2 +- src/com/bukkit/mcteam/factions/entities/Follower.java | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugin.yml b/plugin.yml index 84457b96..63617f4c 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,3 +1,3 @@ name: Factions -version: 1.0 alpha +version: 1.0 beta1 main: com.bukkit.mcteam.factions.Factions \ No newline at end of file diff --git a/src/com/bukkit/mcteam/factions/Commands.java b/src/com/bukkit/mcteam/factions/Commands.java index 2d22d148..20199a6f 100644 --- a/src/com/bukkit/mcteam/factions/Commands.java +++ b/src/com/bukkit/mcteam/factions/Commands.java @@ -537,9 +537,9 @@ public class Commands { // Inform all players for (Follower follower : Follower.getAll()) { if (follower.factionId == me.factionId) { - follower.sendMessage(Conf.colorMember+me.getFullName()+Conf.colorSystem+" gave "+Conf.colorMember+targetFollower.getFullName()+" the leadership of your faction."); + follower.sendMessage(Conf.colorMember+me.getFullName()+Conf.colorSystem+" gave "+Conf.colorMember+targetFollower.getFullName()+Conf.colorSystem+" the leadership of your faction."); } else { - follower.sendMessage(me.getFullName(follower)+Conf.colorSystem+" gave "+targetFollower.getFullName(follower)+" the leadership of "+me.getFaction().getName(follower)); + follower.sendMessage(me.getFullName(follower)+Conf.colorSystem+" gave "+targetFollower.getFullName(follower)+Conf.colorSystem+" the leadership of "+me.getFaction().getName(follower)); } } } else if (targetRole == Role.MODERATOR) { @@ -629,7 +629,7 @@ public class Commands { } Board.unclaim(coord); - me.sendMessage(Conf.colorAction+"Successfully unclaimed"); + me.getFaction().sendMessage(Conf.colorMember+me.getFullName()+Conf.colorSystem+" unclaimed some land..."); } public static void relation(Follower me, Relation whishedRelation, String otherFactionName) { diff --git a/src/com/bukkit/mcteam/factions/entities/Conf.java b/src/com/bukkit/mcteam/factions/entities/Conf.java index 8ef4a0da..72b245c0 100644 --- a/src/com/bukkit/mcteam/factions/entities/Conf.java +++ b/src/com/bukkit/mcteam/factions/entities/Conf.java @@ -177,10 +177,10 @@ public class Conf { aliasTrue.add("on"); aliasTrue.add("+"); - powerPerLand = 1; // 1 power grants one land - powerPerPlayer = 5; // One player has 5 power - powerPerMinute = 0.2; // Default health rate... it takes 5 min to heal one death - powerPerDeath = 1; //A death makes you loose 2 power + powerPerLand = 1; // 1 power grants one land Perhaps this should not even be a config value... + powerPerPlayer = 10; // One player has 10 power + powerPerMinute = 0.2; // Default health rate... it takes 10 min to heal one death + powerPerDeath = 2; //A death makes you loose 2 power powerDefaultBonus = 0; //A faction normally has a power bonus territoryProtectedMaterials.add(Material.WOODEN_DOOR); diff --git a/src/com/bukkit/mcteam/factions/entities/Faction.java b/src/com/bukkit/mcteam/factions/entities/Faction.java index 52726c75..5b2c8e63 100644 --- a/src/com/bukkit/mcteam/factions/entities/Faction.java +++ b/src/com/bukkit/mcteam/factions/entities/Faction.java @@ -142,7 +142,7 @@ public class Faction { public ArrayList deinvite(Follower follower) { ArrayList errors = new ArrayList(); - if (follower.getFaction().equals(this)) { + if (follower.getFaction() == this) { errors.add(Conf.colorSystem+follower.getFullName()+" is already a member of "+this.getName()); errors.add(Conf.colorSystem+"You might want to "+Conf.colorCommand+Conf.aliasBase.get(0)+" "+Conf.aliasKick.get(0)+Conf.colorParameter+" "+follower.getName()); } diff --git a/src/com/bukkit/mcteam/factions/entities/Follower.java b/src/com/bukkit/mcteam/factions/entities/Follower.java index e00ed0be..3bbc013c 100644 --- a/src/com/bukkit/mcteam/factions/entities/Follower.java +++ b/src/com/bukkit/mcteam/factions/entities/Follower.java @@ -259,7 +259,7 @@ public class Follower { return errors; } - return follower.getFaction().deinvite(follower); + return this.getFaction().deinvite(follower); } public ArrayList kick(Follower follower) {