mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-26 04:05:56 +01:00
Forgot offline block protection. Added now.
Change-Id: Ib4e8866e5da655e01bdbb64f61d2130c664bc241
This commit is contained in:
parent
5ddc24f855
commit
999be49f5c
@ -258,14 +258,21 @@ public class FactionsPlayerListener extends PlayerListener{
|
|||||||
|
|
||||||
Material material = block.getType();
|
Material material = block.getType();
|
||||||
|
|
||||||
|
Faction otherFaction = Board.getFactionAt(new FLocation(block));
|
||||||
|
|
||||||
// We only care about some material types.
|
// We only care about some material types.
|
||||||
if ( ! Conf.territoryProtectedMaterials.contains(material)) {
|
if (otherFaction.getOnlinePlayers()!=null){
|
||||||
return true;
|
if ( ! Conf.territoryProtectedMaterials.contains(material)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if ( ! Conf.territoryProtectedMaterialsWhenOffline.contains(material)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FPlayer me = FPlayer.get(player);
|
FPlayer me = FPlayer.get(player);
|
||||||
Faction myFaction = me.getFaction();
|
Faction myFaction = me.getFaction();
|
||||||
Faction otherFaction = Board.getFactionAt(new FLocation(block));
|
|
||||||
|
|
||||||
// In safe zones you may use any block...
|
// In safe zones you may use any block...
|
||||||
if (otherFaction.isNormal() && myFaction != otherFaction) {
|
if (otherFaction.isNormal() && myFaction != otherFaction) {
|
||||||
|
Loading…
Reference in New Issue
Block a user