From 4a18daf2d95cef46245b24675c5a08287fcbb597 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 24 Jul 2015 13:42:06 +0200 Subject: [PATCH] MassiveCore Change --- .../massivecraft/factions/cmd/CmdFactionsAccessPlayer.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsInviteAdd.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsInviteRemove.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsJoin.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsKick.java | 2 +- .../factions/cmd/CmdFactionsMoneyTransferFp.java | 2 +- .../factions/cmd/CmdFactionsMoneyTransferPf.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsPowerBoost.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsRank.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsTitle.java | 2 +- src/com/massivecraft/factions/cmd/arg/ARMPlayer.java | 7 +------ src/com/massivecraft/factions/entity/Faction.java | 2 +- 15 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java index 0632f43d..b6d97799 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java @@ -21,7 +21,7 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract this.addAliases("p", "player"); // Args - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); this.addArg(ARBoolean.get(), "yes/no", "toggle"); // Requirements diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java index 55014e9b..26825baf 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java @@ -23,7 +23,7 @@ public class CmdFactionsInviteAdd extends FactionsCommand this.addAliases("a", "add"); // Args - this.addArg(ARSet.get(ARMPlayer.getAny(), true), "players", true); + this.addArg(ARSet.get(ARMPlayer.get(), true), "players", true); // Requirements this.addRequirements(ReqHasPerm.get(Perm.INVITE_ADD.node)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java index 7f5c20ab..dea2deb8 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java @@ -25,7 +25,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand this.addAliases("r", "remove"); // Args - this.addArg(ARSet.get(ARMPlayer.getAny(), true), "players/all", true); + this.addArg(ARSet.get(ARMPlayer.get(), true), "players/all", true); // Requirements this.addRequirements(ReqHasPerm.get(Perm.INVITE_REMOVE.node)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java index 0d1fedda..52c2317b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java @@ -27,7 +27,7 @@ public class CmdFactionsJoin extends FactionsCommand // Args this.addArg(ARFaction.get(), "faction"); - this.addArg(ARMPlayer.getAny(), "player", "you"); + this.addArg(ARMPlayer.get(), "player", "you"); // Requirements this.addRequirements(ReqHasPerm.get(Perm.JOIN.node)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java index 96edbeed..a30c3e78 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java @@ -27,7 +27,7 @@ public class CmdFactionsKick extends FactionsCommand this.addAliases("kick"); // Args - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); // Requirements this.addRequirements(ReqHasPerm.get(Perm.KICK.node)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java index 647f41ee..2613ddd5 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java @@ -32,7 +32,7 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand // Args this.addArg(ARDouble.get(), "amount"); this.addArg(ARFaction.get(), "faction"); - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); // Requirements this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java index 1f3ac868..f26cb80b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java @@ -31,7 +31,7 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand // Args this.addArg(ARDouble.get(), "amount"); - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); this.addArg(ARFaction.get(), "faction"); // Requirements diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java index 0c3d4051..7fc9b38b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java @@ -27,7 +27,7 @@ public class CmdFactionsPlayer extends FactionsCommand this.addAliases("p", "player"); // Args - this.addArg(ARMPlayer.getAny(), "player", "you"); + this.addArg(ARMPlayer.get(), "player", "you"); // Requirements this.addRequirements(ReqHasPerm.get(Perm.PLAYER.node)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java b/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java index 4e8d5940..ac8077a4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java @@ -18,7 +18,7 @@ public class CmdFactionsPowerBoost extends FactionsCommand // FIELDS // -------------------------------------------- // - private ArgSetting settingMplayer = new ArgSetting(ARMPlayer.getAny(), "name"); + private ArgSetting settingMplayer = new ArgSetting(ARMPlayer.get(), "name"); private ArgSetting settingFaction = new ArgSetting(ARFaction.get(), "name"); // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRank.java b/src/com/massivecraft/factions/cmd/CmdFactionsRank.java index 3d6d3249..b64b9e02 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRank.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRank.java @@ -61,7 +61,7 @@ public class CmdFactionsRank extends FactionsCommand this.addAliases("rank"); // Args - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); this.addArg(rankReader, "action", "show"); this.addArg(ARFaction.get(), "faction", "their"); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java b/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java index 6951ee27..36278ec9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java @@ -27,7 +27,7 @@ public class CmdFactionsRankOld extends FactionsCommand this.addAliases(rankName); // Args - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); this.addArg(ARFaction.get(), "faction", "their"); // VisibilityMode diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java index 97df857c..21f04c49 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java @@ -21,7 +21,7 @@ public class CmdFactionsSetpower extends FactionsCommand this.addAliases("sp", "setpower"); // Args - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); this.addArg(ARDouble.get(), "power"); // Requirements diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java index 33f6ac44..a454e7d1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java @@ -24,7 +24,7 @@ public class CmdFactionsTitle extends FactionsCommand this.addAliases("title"); // Args - this.addArg(ARMPlayer.getAny(), "player"); + this.addArg(ARMPlayer.get(), "player"); this.addArg(ARString.get(), "title", "", true); // Requirements diff --git a/src/com/massivecraft/factions/cmd/arg/ARMPlayer.java b/src/com/massivecraft/factions/cmd/arg/ARMPlayer.java index 7ba7d85e..29582385 100644 --- a/src/com/massivecraft/factions/cmd/arg/ARMPlayer.java +++ b/src/com/massivecraft/factions/cmd/arg/ARMPlayer.java @@ -10,14 +10,9 @@ public class ARMPlayer // INSTANCE // -------------------------------------------- // - public static AR getAny() + public static AR get() { return MPlayerColl.get().getAREntity(); } - public static AR getOnline() - { - return MPlayerColl.get().getAREntity(true); - } - } diff --git a/src/com/massivecraft/factions/entity/Faction.java b/src/com/massivecraft/factions/entity/Faction.java index 953488a1..55945830 100644 --- a/src/com/massivecraft/factions/entity/Faction.java +++ b/src/com/massivecraft/factions/entity/Faction.java @@ -1078,7 +1078,7 @@ public class Faction extends Entity implements EconomyParticipator List ret = new ArrayList(); // Fill Ret - for (CommandSender sender : IdUtil.getOnlineSenders()) + for (CommandSender sender : IdUtil.getLocalSenders()) { if (MUtil.isntSender(sender)) continue;