Moves some classes, amd changes how the massive core is included

This commit is contained in:
Kristian Knarvik 2023-12-17 18:22:51 +01:00
parent 747e38c60d
commit 50f3ed6dee
27 changed files with 30 additions and 43 deletions

View File

@ -58,8 +58,7 @@
<groupId>com.massivecraft.massivecore</groupId>
<artifactId>MassiveCore</artifactId>
<version>3.3.3</version>
<scope>system</scope>
<systemPath>${project.basedir}\lib\MassiveCore.jar</systemPath>
<scope>compile</scope>
</dependency>
<!-- WorldEdit -->
<dependency>

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.req.ReqHasntFaction;
import com.massivecraft.factions.cmd.relations.req.ReqHasntFaction;
import com.massivecraft.factions.cmd.type.TypeFactionNameStrict;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqHasFaction;
import com.massivecraft.factions.cmd.relations.req.ReqHasFaction;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.event.EventFactionsDescriptionChange;

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqTaxEnabled;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.TimeDiffUtil;

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqFactionWarpsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqFactionWarpsEnabled;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPerm.MPermable;

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqHasFaction;
import com.massivecraft.factions.cmd.relations.req.ReqHasFaction;
public class CmdFactionsLeave extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqBankCommandsEnabled;
public class CmdFactionsMoney extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.integration.Econ;

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.Faction;

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.Faction;

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;

View File

@ -7,6 +7,7 @@ import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementIsntPlayer;
import com.massivecraft.massivecore.ps.PS;
import org.bukkit.command.CommandException;
import java.util.Collections;
import java.util.Set;
@ -49,7 +50,7 @@ public class CmdFactionsSetOneLocation extends FactionsCommand {
// Apply / Inform
if (this.claim) {
if (!BoardColl.get().getFactionAt(chunk).isNone()) {
throw new MassiveException().setMsg("<b>Only <h>wilderness<b> can be claimed using this method.");
throw new CommandException("<b>Only <h>wilderness<b> can be claimed using this method.");
}
msender.tryClaim(player.getFaction(), chunks);
} else {

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MFlag;

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqTaxEnabled;
import com.massivecraft.factions.task.TaskTax;
public class CmdFactionsTaxRun extends FactionsCommand {

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqTaxEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeTaxable;
import com.massivecraft.factions.entity.Faction;

View File

@ -72,22 +72,9 @@ public class CmdFactionsWarpGo extends FactionsCommandWarp {
Location locationHere = me.getLocation().clone();
// if player is not in a safe zone or their own faction territory, only allow teleport if no enemies are nearby
if
(
MConf.get().warpsTeleportAllowedEnemyDistance > 0
&&
factionHere.getFlag(MFlag.getFlagPvp())
&&
(
!msender.isInOwnTerritory()
||
(
msender.isInOwnTerritory()
&&
!MConf.get().warpsTeleportIgnoreEnemiesIfInOwnTerritory
)
)
) {
if (MConf.get().warpsTeleportAllowedEnemyDistance > 0 && factionHere.getFlag(MFlag.getFlagPvp()) &&
(!msender.isInOwnTerritory() || (msender.isInOwnTerritory() &&
!MConf.get().warpsTeleportIgnoreEnemiesIfInOwnTerritory))) {
World w = locationHere.getWorld();
double x = locationHere.getX();
double y = locationHere.getY();

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqFactionWarpsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqFactionWarpsEnabled;
import com.massivecraft.massivecore.mson.Mson;
public class FactionsCommandDocumentation extends FactionsCommand {

View File

@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqFactionWarpsEnabled;
import com.massivecraft.factions.cmd.relations.req.ReqFactionWarpsEnabled;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.massivecore.command.Visibility;

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.req;
package com.massivecraft.factions.cmd.relations.req;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.integration.Econ;

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.req;
package com.massivecraft.factions.cmd.relations.req;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.massivecore.command.MassiveCommand;

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.req;
package com.massivecraft.factions.cmd.relations.req;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.command.MassiveCommand;

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.req;
package com.massivecraft.factions.cmd.relations.req;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.command.MassiveCommand;

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.req;
package com.massivecraft.factions.cmd.relations.req;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Rank;

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.req;
package com.massivecraft.factions.cmd.relations.req;
import com.massivecraft.factions.task.TaskTax;
import com.massivecraft.massivecore.command.MassiveCommand;