Fix permision to withdraw money and chunk border/connected checking.

This commit is contained in:
Olof Larsson
2013-05-17 08:37:32 +02:00
parent a79577a355
commit ac95004450
3 changed files with 11 additions and 3 deletions

View File

@ -89,7 +89,11 @@ public class Econ
if (i == fI && fI == fYou) return true;
// Factions can be controlled by those that have permissions
if (you instanceof Faction && FPerm.WITHDRAW.has(fI, fYou)) return true;
if (you instanceof Faction)
{
if (i instanceof Faction && FPerm.WITHDRAW.has((Faction)i, fYou)) return true;
if (i instanceof UPlayer && FPerm.WITHDRAW.has((UPlayer)i, fYou, false)) return true;
}
// Otherwise you may not! ;,,;
i.msg("<h>%s<i> lacks permission to control <h>%s's<i> money.", i.describeTo(i, true), you.describeTo(i));