MCore use CommandSender above Player. Adhere to this standard.
This commit is contained in:
parent
299316a915
commit
4449b56246
@ -8,7 +8,6 @@ import java.util.Set;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.ConsoleCommandSender;
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.massivecraft.factions.iface.RelationParticipator;
|
import com.massivecraft.factions.iface.RelationParticipator;
|
||||||
import com.massivecraft.mcore.ps.PS;
|
import com.massivecraft.mcore.ps.PS;
|
||||||
@ -185,7 +184,7 @@ public enum FPerm
|
|||||||
if (informIfNot)
|
if (informIfNot)
|
||||||
{
|
{
|
||||||
FPlayer notify = null;
|
FPlayer notify = null;
|
||||||
if (testSubject instanceof Player)
|
if (testSubject instanceof CommandSender)
|
||||||
notify = FPlayerColl.get().get(testSubject);
|
notify = FPlayerColl.get().get(testSubject);
|
||||||
else if (testSubject instanceof FPlayer)
|
else if (testSubject instanceof FPlayer)
|
||||||
notify = (FPlayer)testSubject;
|
notify = (FPlayer)testSubject;
|
||||||
|
@ -4,9 +4,7 @@ import com.massivecraft.factions.FPerm;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.Rel;
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFPlayer;
|
import com.massivecraft.factions.cmd.arg.ARFPlayer;
|
||||||
import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast;
|
|
||||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsDeinvite extends FCommand
|
public class CmdFactionsDeinvite extends FCommand
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.massivecraft.factions.event;
|
package com.massivecraft.factions.event;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
@ -30,7 +30,7 @@ public class FactionDisbandEvent extends Event implements Cancellable
|
|||||||
// TODO: Could the fields be reorganized to achieve symmetry?
|
// TODO: Could the fields be reorganized to achieve symmetry?
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
private Player sender;
|
private CommandSender sender;
|
||||||
|
|
||||||
public Faction getFaction()
|
public Faction getFaction()
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@ public class FactionDisbandEvent extends Event implements Cancellable
|
|||||||
return FPlayer.get(sender);
|
return FPlayer.get(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player getPlayer()
|
public CommandSender getPlayer()
|
||||||
{
|
{
|
||||||
return this.sender;
|
return this.sender;
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ public class FactionDisbandEvent extends Event implements Cancellable
|
|||||||
// CONSTRUCT
|
// CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public FactionDisbandEvent(Player sender, String factionId)
|
public FactionDisbandEvent(CommandSender sender, String factionId)
|
||||||
{
|
{
|
||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
this.sender = sender;
|
this.sender = sender;
|
||||||
|
Loading…
Reference in New Issue
Block a user