A color format fix and clas not found def fix
This commit is contained in:
parent
fb1305f97a
commit
478116c418
@ -8,8 +8,7 @@ import org.bukkit.entity.Player;
|
|||||||
import com.bukkit.mcteam.factions.Factions;
|
import com.bukkit.mcteam.factions.Factions;
|
||||||
import com.bukkit.mcteam.factions.struct.Relation;
|
import com.bukkit.mcteam.factions.struct.Relation;
|
||||||
import com.bukkit.mcteam.factions.struct.Role;
|
import com.bukkit.mcteam.factions.struct.Role;
|
||||||
import com.bukkit.mcteam.factions.util.Log;
|
import com.bukkit.mcteam.factions.util.*;
|
||||||
import com.bukkit.mcteam.factions.util.TextUtil;
|
|
||||||
import com.bukkit.mcteam.util.ChatFixUtil;
|
import com.bukkit.mcteam.util.ChatFixUtil;
|
||||||
|
|
||||||
public class Faction {
|
public class Faction {
|
||||||
@ -113,9 +112,6 @@ public class Faction {
|
|||||||
public ArrayList<String> invite(Follower follower) { // TODO Move out
|
public ArrayList<String> invite(Follower follower) { // TODO Move out
|
||||||
ArrayList<String> errors = new ArrayList<String>();
|
ArrayList<String> errors = new ArrayList<String>();
|
||||||
|
|
||||||
Log.debug("follower.getFaction().id"+follower.getFaction().id);
|
|
||||||
Log.debug("this.id"+this.id);
|
|
||||||
|
|
||||||
if (follower.getFaction().equals(this)) { // error här?
|
if (follower.getFaction().equals(this)) { // error här?
|
||||||
errors.add(Conf.colorSystem+follower.getName()+" is already a member of "+this.getTag());
|
errors.add(Conf.colorSystem+follower.getName()+" is already a member of "+this.getTag());
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import com.bukkit.mcteam.factions.Factions;
|
import com.bukkit.mcteam.factions.Factions;
|
||||||
import com.bukkit.mcteam.factions.struct.*;
|
import com.bukkit.mcteam.factions.struct.*;
|
||||||
import com.bukkit.mcteam.factions.util.Log;
|
|
||||||
import com.bukkit.mcteam.util.ChatFixUtil;
|
import com.bukkit.mcteam.util.ChatFixUtil;
|
||||||
|
|
||||||
public class Follower {
|
public class Follower {
|
||||||
@ -215,7 +214,7 @@ public class Follower {
|
|||||||
} else if (this.power < this.getPowerMin()) {
|
} else if (this.power < this.getPowerMin()) {
|
||||||
this.power = this.getPowerMin();
|
this.power = this.getPowerMin();
|
||||||
}
|
}
|
||||||
Log.debug("Power of "+this.getName()+" is now: "+this.power);
|
//Log.debug("Power of "+this.getName()+" is now: "+this.power);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getPowerMax() {
|
public double getPowerMax() {
|
||||||
|
@ -14,7 +14,6 @@ import com.bukkit.mcteam.factions.Factions;
|
|||||||
import com.bukkit.mcteam.factions.entities.Conf;
|
import com.bukkit.mcteam.factions.entities.Conf;
|
||||||
import com.bukkit.mcteam.factions.entities.Follower;
|
import com.bukkit.mcteam.factions.entities.Follower;
|
||||||
import com.bukkit.mcteam.factions.struct.Relation;
|
import com.bukkit.mcteam.factions.struct.Relation;
|
||||||
import com.bukkit.mcteam.factions.util.Log;
|
|
||||||
|
|
||||||
public class FactionsEntityListener extends EntityListener {
|
public class FactionsEntityListener extends EntityListener {
|
||||||
public Factions plugin;
|
public Factions plugin;
|
||||||
@ -80,7 +79,7 @@ public class FactionsEntityListener extends EntityListener {
|
|||||||
Follower attacker = Follower.get((Player)damager);
|
Follower attacker = Follower.get((Player)damager);
|
||||||
Relation relation = defender.getRelation(attacker);
|
Relation relation = defender.getRelation(attacker);
|
||||||
|
|
||||||
Log.debug(attacker.getName() + " attacked " + defender.getName());
|
//Log.debug(attacker.getName() + " attacked " + defender.getName());
|
||||||
|
|
||||||
// Players without faction may be hurt anywhere
|
// Players without faction may be hurt anywhere
|
||||||
if (defender.factionId == 0) {
|
if (defender.factionId == 0) {
|
||||||
@ -95,7 +94,7 @@ public class FactionsEntityListener extends EntityListener {
|
|||||||
|
|
||||||
// You can not hurt neutrals in their own territory.
|
// You can not hurt neutrals in their own territory.
|
||||||
if (relation == Relation.NEUTRAL && defender.isInOwnTerritory()) {
|
if (relation == Relation.NEUTRAL && defender.isInOwnTerritory()) {
|
||||||
attacker.sendMessage(Conf.colorSystem+"You can't hurt "+relation.getColor()+defender.getNameAndRelevant(attacker)+" in their own territory.");
|
attacker.sendMessage(Conf.colorSystem+"You can't hurt "+relation.getColor()+defender.getNameAndRelevant(attacker)+Conf.colorSystem+" in their own territory.");
|
||||||
defender.sendMessage(attacker.getNameAndRelevant(defender)+Conf.colorSystem+" tried to hurt you.");
|
defender.sendMessage(attacker.getNameAndRelevant(defender)+Conf.colorSystem+" tried to hurt you.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@ import org.bukkit.event.player.PlayerMoveEvent;
|
|||||||
import com.bukkit.mcteam.factions.Commands;
|
import com.bukkit.mcteam.factions.Commands;
|
||||||
import com.bukkit.mcteam.factions.Factions;
|
import com.bukkit.mcteam.factions.Factions;
|
||||||
import com.bukkit.mcteam.factions.entities.*;
|
import com.bukkit.mcteam.factions.entities.*;
|
||||||
import com.bukkit.mcteam.factions.util.*;
|
import com.bukkit.mcteam.factions.util.TextUtil;
|
||||||
|
import com.bukkit.mcteam.factions.util.Log;
|
||||||
|
|
||||||
|
|
||||||
public class FactionsPlayerListener extends PlayerListener{
|
public class FactionsPlayerListener extends PlayerListener{
|
||||||
public Factions plugin;
|
public Factions plugin;
|
||||||
|
Loading…
Reference in New Issue
Block a user