Don't allow vanished players to block others from teleporting. Fixes #111.
This commit is contained in:
parent
8b64b4bfe1
commit
962f92496c
@ -1,7 +1,7 @@
|
|||||||
FactionsUUID
|
FactionsUUID
|
||||||
====================
|
====================
|
||||||
<rant>
|
<rant>
|
||||||
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 :)
|
The repo is open because of that and because I still hope to see people contributing upstream :)
|
||||||
</rant>
|
</rant>
|
||||||
|
@ -54,6 +54,8 @@ public interface FPlayer extends EconomyParticipator {
|
|||||||
|
|
||||||
public boolean isAdminBypassing();
|
public boolean isAdminBypassing();
|
||||||
|
|
||||||
|
public boolean isVanished();
|
||||||
|
|
||||||
public void setIsAdminBypassing(boolean val);
|
public void setIsAdminBypassing(boolean val);
|
||||||
|
|
||||||
public void setChatMode(ChatMode chatMode);
|
public void setChatMode(ChatMode chatMode);
|
||||||
|
@ -79,7 +79,7 @@ public class CmdHome extends FCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FPlayer fp = FPlayers.getInstance().getByPlayer(p);
|
FPlayer fp = FPlayers.getInstance().getByPlayer(p);
|
||||||
if (fme.getRelationTo(fp) != Relation.ENEMY) {
|
if (fme.getRelationTo(fp) != Relation.ENEMY || fp.isVanished()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,4 +36,8 @@ public class Essentials {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isVanished(Player player) {
|
||||||
|
return essentials.getUser(player).isVanished();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.massivecraft.factions.event.LandClaimEvent;
|
|||||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||||
import com.massivecraft.factions.iface.RelationParticipator;
|
import com.massivecraft.factions.iface.RelationParticipator;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
|
import com.massivecraft.factions.integration.Essentials;
|
||||||
import com.massivecraft.factions.integration.Worldguard;
|
import com.massivecraft.factions.integration.Worldguard;
|
||||||
import com.massivecraft.factions.scoreboards.FScoreboard;
|
import com.massivecraft.factions.scoreboards.FScoreboard;
|
||||||
import com.massivecraft.factions.scoreboards.sidebar.FInfoSidebar;
|
import com.massivecraft.factions.scoreboards.sidebar.FInfoSidebar;
|
||||||
@ -168,6 +169,10 @@ public abstract class MemoryFPlayer implements FPlayer {
|
|||||||
return this.isAdminBypassing;
|
return this.isAdminBypassing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isVanished() {
|
||||||
|
return Essentials.isVanished(getPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
public void setIsAdminBypassing(boolean val) {
|
public void setIsAdminBypassing(boolean val) {
|
||||||
this.isAdminBypassing = val;
|
this.isAdminBypassing = val;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user