Allergy reaction kicked in. This commit removes the Spout features. I have nothing against spout but if we are going to have them we should do them properly. They should be coded in such a way that they could be in an external plugin alltogether. Also removed netbeans stuff from IDE that should not be in the github repo.
This commit is contained in:
@@ -14,7 +14,6 @@ public class CmdFactions extends FCommand
|
||||
public CmdFactionsLeader cmdFactionsLeader = new CmdFactionsLeader();
|
||||
public CmdFactionsAutoClaim cmdFactionsAutoClaim = new CmdFactionsAutoClaim();
|
||||
public CmdFactionsAdmin cmdFactionsAdmin = new CmdFactionsAdmin();
|
||||
public CmdFactionsCape cmdFactionsCape = new CmdFactionsCape();
|
||||
public CmdFactionsClaim cmdFactionsClaim = new CmdFactionsClaim();
|
||||
public CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate();
|
||||
public CmdFactionsDemote cmdFactionsDemote = new CmdFactionsDemote();
|
||||
@@ -72,7 +71,6 @@ public class CmdFactions extends FCommand
|
||||
this.addSubCommand(this.cmdFactionsTag);
|
||||
this.addSubCommand(this.cmdFactionsDemote);
|
||||
this.addSubCommand(this.cmdFactionsDescription);
|
||||
this.addSubCommand(this.cmdFactionsCape);
|
||||
this.addSubCommand(this.cmdFactionsPerm);
|
||||
this.addSubCommand(this.cmdFactionsFlag);
|
||||
this.addSubCommand(this.cmdFactionsInvite);
|
||||
|
@@ -8,7 +8,6 @@ import com.massivecraft.factions.cmd.arg.ARFaction;
|
||||
import com.massivecraft.factions.entity.BoardColls;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||
import com.massivecraft.mcore.ps.PS;
|
||||
import com.massivecraft.mcore.util.Txt;
|
||||
@@ -87,7 +86,6 @@ public class CmdFactionsAccess extends FCommand
|
||||
}
|
||||
|
||||
msg("<i>%s has been %s<i> the access list for this territory.", target, Txt.parse(added ? "<lime>added to" : "<rose>removed from"));
|
||||
SpoutFeatures.updateAccessInfoLoc(chunk);
|
||||
showAccessList(territory, locFaction);
|
||||
}
|
||||
|
||||
|
@@ -1,31 +0,0 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.mcore.cmd.HelpCommand;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
public class CmdFactionsCape extends FCommand
|
||||
{
|
||||
public CmdFactionsCapeGet cmdCapeGet = new CmdFactionsCapeGet();
|
||||
public CmdFactionsCapeSet cmdCapeSet = new CmdFactionsCapeSet();
|
||||
public CmdFactionsCapeRemove cmdCapeRemove = new CmdFactionsCapeRemove();
|
||||
|
||||
public CmdFactionsCape()
|
||||
{
|
||||
this.addAliases("cape");
|
||||
|
||||
this.addRequirements(ReqHasPerm.get(Perm.CAPE.node));
|
||||
|
||||
this.addSubCommand(this.cmdCapeGet);
|
||||
this.addSubCommand(this.cmdCapeSet);
|
||||
this.addSubCommand(this.cmdCapeRemove);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform()
|
||||
{
|
||||
this.getCommandChain().add(this);
|
||||
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain);
|
||||
}
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.FPerm;
|
||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
|
||||
public abstract class CmdFactionsCapeAbstract extends FCommand
|
||||
{
|
||||
public Faction capeFaction;
|
||||
public String currentCape;
|
||||
|
||||
public CmdFactionsCapeAbstract()
|
||||
{
|
||||
this.addOptionalArg("faction", "you");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean validCall(CommandSender sender, List<String> args)
|
||||
{
|
||||
this.capeFaction = null;
|
||||
this.currentCape = null;
|
||||
|
||||
if (this.myFaction == null && ! this.argIsSet(this.requiredArgs.size()))
|
||||
{
|
||||
msg("<b>You must specify a faction from console.");
|
||||
return false;
|
||||
}
|
||||
|
||||
this.capeFaction = this.arg(this.requiredArgs.size(), ARFaction.get(myFaction), myFaction);
|
||||
if (this.capeFaction == null) return false;
|
||||
|
||||
// Do we have permission to manage the cape of that faction?
|
||||
if (fme != null && ! FPerm.CAPE.has(fme, capeFaction)) return false;
|
||||
|
||||
this.currentCape = this.capeFaction.getCape();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
public class CmdFactionsCapeGet extends CmdFactionsCapeAbstract
|
||||
{
|
||||
public CmdFactionsCapeGet()
|
||||
{
|
||||
this.addAliases("get");
|
||||
|
||||
this.addRequirements(ReqHasPerm.get(Perm.CAPE_GET.node));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform()
|
||||
{
|
||||
if (currentCape == null)
|
||||
{
|
||||
msg("<h>%s <i>has no cape set.", capeFaction.describeTo(fme, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
msg("<i>The cape of <h>%s <i>is \"<h>%s<i>\".", capeFaction.describeTo(fme, true), currentCape);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.util.RelationUtil;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
public class CmdFactionsCapeRemove extends CmdFactionsCapeAbstract
|
||||
{
|
||||
public CmdFactionsCapeRemove()
|
||||
{
|
||||
this.addAliases("rm", "rem", "remove", "del", "delete");
|
||||
|
||||
this.addRequirements(ReqHasPerm.get(Perm.CAPE_REMOVE.node));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform()
|
||||
{
|
||||
if (currentCape == null)
|
||||
{
|
||||
msg("<h>%s <i>has no cape set.", capeFaction.describeTo(fme, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
capeFaction.setCape(null);
|
||||
SpoutFeatures.updateCape(capeFaction, null);
|
||||
msg("<h>%s <i>removed the cape from <h>%s<i>.", RelationUtil.describeThatToMe(fme, fme, true), capeFaction.describeTo(fme));
|
||||
capeFaction.msg("<h>%s <i>removed the cape from <h>%s<i>.", RelationUtil.describeThatToMe(fme, capeFaction, true), capeFaction.describeTo(capeFaction));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.util.RelationUtil;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
public class CmdFactionsCapeSet extends CmdFactionsCapeAbstract
|
||||
{
|
||||
|
||||
public CmdFactionsCapeSet()
|
||||
{
|
||||
this.addAliases("set");
|
||||
|
||||
this.addRequiredArg("url");
|
||||
this.setErrorOnToManyArgs(false);
|
||||
|
||||
this.addRequirements(ReqHasPerm.get(Perm.CAPE_SET.node));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform()
|
||||
{
|
||||
String newCape = this.argConcatFrom(0);
|
||||
|
||||
if (isUrlValid(newCape))
|
||||
{
|
||||
capeFaction.setCape(newCape);
|
||||
SpoutFeatures.updateCape(capeFaction, null);
|
||||
msg("<h>%s <i>set the cape of <h>%s<i> to \"<h>%s<i>\".", RelationUtil.describeThatToMe(fme, fme, true), capeFaction.describeTo(fme), newCape);
|
||||
capeFaction.msg("<h>%s <i>set the cape of <h>%s<i> to \"<h>%s<i>\".", RelationUtil.describeThatToMe(fme, capeFaction, true), capeFaction.describeTo(capeFaction), newCape);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg("<i>\"<h>%s<i>\" is not a valid URL.", newCape);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isUrlValid(String urlString)
|
||||
{
|
||||
try
|
||||
{
|
||||
new URL(urlString);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@@ -14,7 +14,6 @@ import com.massivecraft.factions.FFlag;
|
||||
import com.massivecraft.factions.FPerm;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
import com.massivecraft.mcore.money.Money;
|
||||
|
||||
@@ -94,8 +93,5 @@ public class CmdFactionsDisband extends FCommand
|
||||
}
|
||||
|
||||
faction.detach();
|
||||
|
||||
SpoutFeatures.updateTitle(null, null);
|
||||
SpoutFeatures.updateCape(null, null);
|
||||
}
|
||||
}
|
||||
|
@@ -8,7 +8,6 @@ import com.massivecraft.factions.cmd.arg.ARFaction;
|
||||
import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.event.FactionsEventRelationChange;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
public abstract class CmdFactionsRelationAbstract extends FCommand
|
||||
@@ -89,9 +88,5 @@ public abstract class CmdFactionsRelationAbstract extends FCommand
|
||||
otherFaction.msg("<i>This will have no effect while their faction is peaceful.");
|
||||
myFaction.msg("<i>This will have no effect while your faction is peaceful.");
|
||||
}
|
||||
|
||||
SpoutFeatures.updateTitle(myFaction, otherFaction);
|
||||
SpoutFeatures.updateTitle(otherFaction, myFaction);
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(null);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,6 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.massivecraft.factions.ConfServer;
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast;
|
||||
@@ -10,7 +9,6 @@ import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.FactionColl;
|
||||
import com.massivecraft.factions.entity.FactionColls;
|
||||
import com.massivecraft.factions.event.FactionsEventTagChange;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
@@ -70,11 +68,6 @@ public class CmdFactionsTag extends FCommand
|
||||
}
|
||||
faction.msg("<i>The faction %s<i> changed their name to %s.", fme.getColorTo(faction)+oldtag, myFaction.getTag(faction));
|
||||
}
|
||||
|
||||
if (ConfServer.spoutFactionTagsOverNames)
|
||||
{
|
||||
SpoutFeatures.updateTitle(myFaction, null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,13 +1,11 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.ConfServer;
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.factions.cmd.arg.ARUPlayer;
|
||||
import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.factions.event.FactionsEventTitleChange;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.mcore.cmd.arg.ARString;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
@@ -48,11 +46,6 @@ public class CmdFactionsTitle extends FCommand
|
||||
|
||||
// Inform
|
||||
myFaction.msg("%s<i> changed a title: %s", fme.describeTo(myFaction, true), you.describeTo(myFaction, true));
|
||||
|
||||
if (ConfServer.spoutFactionTitlesOverNames)
|
||||
{
|
||||
SpoutFeatures.updateTitle(me, null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -6,7 +6,6 @@ import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.factions.event.FactionsEventLandUnclaim;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.FPerm;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.Perm;
|
||||
@@ -55,7 +54,6 @@ public class CmdFactionsUnclaim extends FCommand
|
||||
}
|
||||
|
||||
BoardColls.get().removeAt(chunk);
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(chunk);
|
||||
myFaction.msg("%s<i> unclaimed some land.", fme.describeTo(myFaction, true));
|
||||
|
||||
if (MConf.get().logLandUnclaims)
|
||||
|
@@ -9,7 +9,6 @@ import com.massivecraft.factions.entity.BoardColls;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.factions.event.FactionsEventLandUnclaimAll;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||
|
||||
public class CmdFactionsUnclaimall extends FCommand
|
||||
@@ -49,9 +48,6 @@ public class CmdFactionsUnclaimall extends FCommand
|
||||
|
||||
// Inform
|
||||
myFaction.msg("%s<i> unclaimed ALL of your faction's land.", fme.describeTo(myFaction, true));
|
||||
|
||||
// TODO: Move this to a listener instead.
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(null);
|
||||
|
||||
if (MConf.get().logLandUnclaims)
|
||||
{
|
||||
|
Reference in New Issue
Block a user