diff --git a/README.md b/README.md index 378b6cff..99f56b90 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ FactionsUUID ==================== -I'd appreciate it if you could pay for the [resource](http://www.spigotmc.org/resources/factionsuuid.1035/) if your server makes money. If you only run your server for your kids or some friends and don't make any money, then I don't want to stop you from doing so by forcing you to buy a $10 plugin. If that's the case, then just send me a message and we can work something out. +I'd appreciate it if you could pay for the [resource](http://www.spigotmc.org/resources/factionsuuid.1035/) if your server makes money. If you only run your server for your kids or some friends and don't make any money, then I don't want to stop you from doing so by forcing you to buy a $15 plugin. If that's the case, then just send me a message and we can work something out. The repo is open because of that and because I still hope to see people contributing upstream :) diff --git a/src/main/java/com/massivecraft/factions/FPlayer.java b/src/main/java/com/massivecraft/factions/FPlayer.java index a8e124a8..897d5e27 100644 --- a/src/main/java/com/massivecraft/factions/FPlayer.java +++ b/src/main/java/com/massivecraft/factions/FPlayer.java @@ -54,6 +54,8 @@ public interface FPlayer extends EconomyParticipator { public boolean isAdminBypassing(); + public boolean isVanished(); + public void setIsAdminBypassing(boolean val); public void setChatMode(ChatMode chatMode); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdHome.java b/src/main/java/com/massivecraft/factions/cmd/CmdHome.java index c70a09ee..59b0c911 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdHome.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdHome.java @@ -79,7 +79,7 @@ public class CmdHome extends FCommand { } FPlayer fp = FPlayers.getInstance().getByPlayer(p); - if (fme.getRelationTo(fp) != Relation.ENEMY) { + if (fme.getRelationTo(fp) != Relation.ENEMY || fp.isVanished()) { continue; } diff --git a/src/main/java/com/massivecraft/factions/integration/Essentials.java b/src/main/java/com/massivecraft/factions/integration/Essentials.java index a5409e52..a4cd2e1d 100644 --- a/src/main/java/com/massivecraft/factions/integration/Essentials.java +++ b/src/main/java/com/massivecraft/factions/integration/Essentials.java @@ -36,4 +36,8 @@ public class Essentials { } return true; } + + public static boolean isVanished(Player player) { + return essentials.getUser(player).isVanished(); + } } diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java index 0f5b0fbe..e0a8eba5 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java @@ -6,6 +6,7 @@ import com.massivecraft.factions.event.LandClaimEvent; import com.massivecraft.factions.iface.EconomyParticipator; import com.massivecraft.factions.iface.RelationParticipator; import com.massivecraft.factions.integration.Econ; +import com.massivecraft.factions.integration.Essentials; import com.massivecraft.factions.integration.Worldguard; import com.massivecraft.factions.scoreboards.FScoreboard; import com.massivecraft.factions.scoreboards.sidebar.FInfoSidebar; @@ -168,6 +169,10 @@ public abstract class MemoryFPlayer implements FPlayer { return this.isAdminBypassing; } + public boolean isVanished() { + return Essentials.isVanished(getPlayer()); + } + public void setIsAdminBypassing(boolean val) { this.isAdminBypassing = val; }