Fixed a bug with the smoke effect for the faction home and one NPE.
This commit is contained in:
parent
88fe43d600
commit
618c5fceed
@ -391,13 +391,13 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
||||
@Override
|
||||
public String describeTo(RelationParticipator that, boolean ucfirst)
|
||||
{
|
||||
return RelationUtil.describeThatToMe(that, this, ucfirst);
|
||||
return RelationUtil.describeThatToMe(this, that, ucfirst);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeTo(RelationParticipator that)
|
||||
{
|
||||
return RelationUtil.describeThatToMe(that, this);
|
||||
return RelationUtil.describeThatToMe(this, that);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -131,9 +131,9 @@ public class CmdHome extends FCommand
|
||||
{
|
||||
List<Location> smokeLocations = new ArrayList<Location>();
|
||||
smokeLocations.add(me.getLocation());
|
||||
smokeLocations.add(me.getLocation().add(0, 1, 0));
|
||||
smokeLocations.add(me.getLocation().clone().add(0, 1, 0));
|
||||
smokeLocations.add(myFaction.getHome());
|
||||
smokeLocations.add(myFaction.getHome().add(0, 1, 0));
|
||||
smokeLocations.add(myFaction.getHome().clone().add(0, 1, 0));
|
||||
SmokeUtil.spawnCloudRandom(smokeLocations, Conf.homesTeleportCommandSmokeEffectThickness);
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class Econ
|
||||
// Bypassing players can do any kind of transaction
|
||||
if (i instanceof FPlayer && ((FPlayer)i).isAdminBypassing()) return true;
|
||||
|
||||
// Players with the any withdraw can to.
|
||||
// Players with the any withdraw can do.
|
||||
if (i instanceof FPlayer && Permission.MONEY_WITHDRAW_ANY.has(((FPlayer)i).getPlayer())) return true;
|
||||
|
||||
// You can deposit to anywhere you feel like. It's your loss if you can't withdraw it again.
|
||||
|
@ -56,20 +56,17 @@ public class RelationUtil
|
||||
return "" + getRelationColor(me, that) + ret;
|
||||
}
|
||||
|
||||
public static String describeThatToMe(RelationParticipator that,
|
||||
RelationParticipator me)
|
||||
public static String describeThatToMe(RelationParticipator that, RelationParticipator me)
|
||||
{
|
||||
return describeThatToMe(that, me, false);
|
||||
}
|
||||
|
||||
public static Relation getRelationTo(RelationParticipator me,
|
||||
RelationParticipator that)
|
||||
public static Relation getRelationTo(RelationParticipator me, RelationParticipator that)
|
||||
{
|
||||
return getRelationTo(that, me, false);
|
||||
}
|
||||
|
||||
public static Relation getRelationTo(RelationParticipator me,
|
||||
RelationParticipator that, boolean ignorePeaceful)
|
||||
public static Relation getRelationTo(RelationParticipator me, RelationParticipator that, boolean ignorePeaceful)
|
||||
{
|
||||
Faction fthat = getFaction(that);
|
||||
if (fthat == null) return Relation.NEUTRAL; // ERROR
|
||||
|
@ -82,6 +82,8 @@ public class PermUtil {
|
||||
*/
|
||||
public boolean has (CommandSender me, String perm)
|
||||
{
|
||||
if (me == null) return false;
|
||||
|
||||
if ( ! (me instanceof Player))
|
||||
{
|
||||
return me.hasPermission(perm);
|
||||
@ -108,7 +110,7 @@ public class PermUtil {
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (informSenderIfNot)
|
||||
else if (informSenderIfNot && me != null)
|
||||
{
|
||||
me.sendMessage(this.getForbiddenMessage(perm));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user