Fixes quite a lot of warnings

This commit is contained in:
Kristian Knarvik 2022-08-05 03:42:35 +02:00
parent f8407a3692
commit 950faa7100
270 changed files with 3014 additions and 3078 deletions

1
.gitignore vendored
View File

@ -167,7 +167,6 @@ GitHub.sublime-settings
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags

10
pom.xml
View File

@ -57,7 +57,7 @@
<dependency>
<groupId>com.massivecraft.massivecore</groupId>
<artifactId>MassiveCore</artifactId>
<version>RELEASE</version>
<version>3.3.3</version>
<scope>system</scope>
<systemPath>${project.basedir}\lib\MassiveCore.jar</systemPath>
</dependency>
@ -76,12 +76,12 @@
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-core</artifactId>
<version>RELEASE</version>
<version>7.0.5</version>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>RELEASE</version>
<version>7.0.5</version>
</dependency>
<!-- Vault -->
<dependency>
@ -93,7 +93,7 @@
<dependency>
<groupId>com.griefcraft</groupId>
<artifactId>lwc</artifactId>
<version>RELEASE</version>
<version>4.4.0</version>
<scope>system</scope>
<systemPath>${project.basedir}\lib\LWC.jar</systemPath>
</dependency>
@ -108,7 +108,7 @@
<dependency>
<groupId>mineverse.Aust1n46.chat</groupId>
<artifactId>VentureChat</artifactId>
<version>RELEASE</version>
<version>3.4.1_1.19_patch</version>
<scope>system</scope>
<systemPath>${project.basedir}\lib\VentureChat.jar</systemPath>
</dependency>

View File

@ -1,14 +1,14 @@
package net.knarcraft.factions;
import net.knarcraft.factions.entity.Faction;
import com.massivecraft.massivecore.util.extractor.Extractor;
import net.knarcraft.factions.entity.Faction;
public class ExtractorFactionAccountId implements Extractor {
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static ExtractorFactionAccountId i = new ExtractorFactionAccountId();
private static final ExtractorFactionAccountId i = new ExtractorFactionAccountId();
public static ExtractorFactionAccountId get() {
return i;

View File

@ -1,6 +1,10 @@
package net.knarcraft.factions;
import com.google.gson.GsonBuilder;
import com.massivecraft.massivecore.MassivePlugin;
import com.massivecraft.massivecore.command.type.RegistryType;
import com.massivecraft.massivecore.store.migrator.MigratorUtil;
import com.massivecraft.massivecore.util.MUtil;
import net.knarcraft.factions.adapter.BoardAdapter;
import net.knarcraft.factions.adapter.BoardMapAdapter;
import net.knarcraft.factions.adapter.TerritoryAccessAdapter;
@ -76,10 +80,6 @@ import net.knarcraft.factions.mixin.PowerMixin;
import net.knarcraft.factions.task.TaskFlagPermCreate;
import net.knarcraft.factions.task.TaskPlayerPowerUpdate;
import net.knarcraft.factions.task.TaskTax;
import com.massivecraft.massivecore.MassivePlugin;
import com.massivecraft.massivecore.command.type.RegistryType;
import com.massivecraft.massivecore.store.migrator.MigratorUtil;
import com.massivecraft.massivecore.util.MUtil;
import org.bukkit.ChatColor;
import java.util.List;
@ -95,7 +95,7 @@ public class Factions extends MassivePlugin {
public final static String ID_SAFEZONE = "safezone";
public final static String ID_WARZONE = "warzone";
public final static String NAME_NONE_DEFAULT = ChatColor.DARK_GREEN.toString() + "Wilderness";
public final static String NAME_NONE_DEFAULT = ChatColor.DARK_GREEN + "Wilderness";
public final static String NAME_SAFEZONE_DEFAULT = "SafeZone";
public final static String NAME_WARZONE_DEFAULT = "WarZone";

View File

@ -1,10 +1,10 @@
package net.knarcraft.factions;
import com.massivecraft.massivecore.collections.MassiveSet;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.entity.MPlayerColl;
import com.massivecraft.massivecore.collections.MassiveSet;
import java.util.Collections;
import java.util.Map;
@ -24,7 +24,7 @@ public class FactionsIndex {
// INSTANCE
// -------------------------------------------- //
private static FactionsIndex i = new FactionsIndex();
private static final FactionsIndex i = new FactionsIndex();
public static FactionsIndex get() {
return i;
@ -35,7 +35,7 @@ public class FactionsIndex {
// -------------------------------------------- //
private final Map<MPlayer, Faction> mplayer2faction;
private final Map<Faction, Set<MPlayer>> faction2mplayers;
private final Map<Faction, Set<MPlayer>> faction2mPlayers;
// -------------------------------------------- //
// CONSTRUCT
@ -43,7 +43,7 @@ public class FactionsIndex {
private FactionsIndex() {
this.mplayer2faction = new WeakHashMap<>();
this.faction2mplayers = new WeakHashMapCreativeImpl();
this.faction2mPlayers = new WeakHashMapCreativeImpl();
}
// -------------------------------------------- //
@ -70,7 +70,7 @@ public class FactionsIndex {
}
public synchronized Set<MPlayer> getMPlayers(Faction faction) {
return new MassiveSet<>(this.faction2mplayers.get(faction));
return new MassiveSet<>(this.faction2mPlayers.get(faction));
}
// -------------------------------------------- //
@ -101,7 +101,7 @@ public class FactionsIndex {
if (!mplayer.attached()) {
Faction factionIndexed = this.mplayer2faction.remove(mplayer);
if (factionIndexed != null) {
faction2mplayers.get(factionIndexed).remove(mplayer);
faction2mPlayers.get(factionIndexed).remove(mplayer);
}
return;
}
@ -120,9 +120,9 @@ public class FactionsIndex {
for (Faction faction : factions) {
boolean connected = this.isConnected(mplayer, faction);
if (connected) {
this.faction2mplayers.get(faction).add(mplayer);
this.faction2mPlayers.get(faction).add(mplayer);
} else {
this.faction2mplayers.get(faction).remove(mplayer);
this.faction2mPlayers.get(faction).remove(mplayer);
}
}

View File

@ -1,10 +1,10 @@
package net.knarcraft.factions;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPerm;
import com.massivecraft.massivecore.Colorized;
import com.massivecraft.massivecore.Named;
import com.massivecraft.massivecore.collections.MassiveSet;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPerm;
import org.bukkit.ChatColor;
import java.util.Collections;

View File

@ -1,10 +1,10 @@
package net.knarcraft.factions;
import com.massivecraft.massivecore.collections.MassiveSet;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.util.RelationUtil;
import com.massivecraft.massivecore.collections.MassiveSet;
import java.util.Collection;
import java.util.Collections;
@ -47,7 +47,7 @@ public class TerritoryAccess {
// FIELDS: VERSION
// -------------------------------------------- //
public int version = 1;
public final int version = 1;
// -------------------------------------------- //
// FIELDS: DELTA

View File

@ -15,7 +15,7 @@ public class BoardAdapter implements JsonDeserializer<Board>, JsonSerializer<Boa
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static BoardAdapter i = new BoardAdapter();
private static final BoardAdapter i = new BoardAdapter();
public static BoardAdapter get() {
return i;
@ -25,7 +25,6 @@ public class BoardAdapter implements JsonDeserializer<Board>, JsonSerializer<Boa
// OVERRIDE
// -------------------------------------------- //
@SuppressWarnings("unchecked")
@Override
public Board deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
return new Board(context.deserialize(json, Board.MAP_TYPE));

View File

@ -7,8 +7,8 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import net.knarcraft.factions.TerritoryAccess;
import com.massivecraft.massivecore.ps.PS;
import net.knarcraft.factions.TerritoryAccess;
import java.lang.reflect.Type;
import java.util.Map;
@ -20,7 +20,7 @@ public class BoardMapAdapter implements JsonDeserializer<Map<PS, TerritoryAccess
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static BoardMapAdapter i = new BoardMapAdapter();
private static final BoardMapAdapter i = new BoardMapAdapter();
public static BoardMapAdapter get() {
return i;
@ -37,9 +37,9 @@ public class BoardMapAdapter implements JsonDeserializer<Map<PS, TerritoryAccess
JsonObject jsonObject = json.getAsJsonObject();
for (Entry<String, JsonElement> entry : jsonObject.entrySet()) {
String[] ChunkCoordParts = entry.getKey().split("[,\\s]+");
int chunkX = Integer.parseInt(ChunkCoordParts[0]);
int chunkZ = Integer.parseInt(ChunkCoordParts[1]);
String[] chunkCoordinateParts = entry.getKey().split("[,\\s]+");
int chunkX = Integer.parseInt(chunkCoordinateParts[0]);
int chunkZ = Integer.parseInt(chunkCoordinateParts[1]);
PS chunk = PS.valueOf(chunkX, chunkZ);
TerritoryAccess territoryAccess = context.deserialize(entry.getValue(), TerritoryAccess.class);

View File

@ -10,8 +10,8 @@ import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.reflect.TypeToken;
import net.knarcraft.factions.TerritoryAccess;
import com.massivecraft.massivecore.store.migrator.MigratorUtil;
import net.knarcraft.factions.TerritoryAccess;
import java.lang.reflect.Type;
import java.util.Collections;
@ -34,7 +34,7 @@ public class TerritoryAccessAdapter implements JsonDeserializer<TerritoryAccess>
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static TerritoryAccessAdapter i = new TerritoryAccessAdapter();
private static final TerritoryAccessAdapter i = new TerritoryAccessAdapter();
public static TerritoryAccessAdapter get() {
return i;

View File

@ -9,10 +9,10 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* The ChatFormater is a system offered by factions for tag parsing.
* The ChatFormatter is a system offered by factions for tag parsing.
* <p>
* Note that every tag and modifier id must be lowercase.
* A tag with id "derp" is allowed but not with id "Derp". For that reason the tag {sender} will work but {Sender} wont.
* A tag with id "derp" is allowed but not with id "Derp". For that reason the tag {sender} will work but {Sender} won't.
*/
public class ChatFormatter {
// -------------------------------------------- //
@ -33,23 +33,23 @@ public class ChatFormatter {
// FORMAT
// -------------------------------------------- //
public static String format(String msg, CommandSender sender, CommandSender recipient) {
public static String format(String message, CommandSender sender, CommandSender recipient) {
// We build the return value in this string buffer
StringBuffer ret = new StringBuffer();
StringBuilder returnValue = new StringBuilder();
// A matcher to match all the tags in the msg
Matcher matcher = pattern.matcher(msg);
Matcher matcher = pattern.matcher(message);
// For each tag we find
while (matcher.find()) {
// The fullmatch is something like "{sender|lp|rp}"
String fullmatch = matcher.group(0);
// The fullMatch is something like "{sender|lp|rp}"
String fullMatch = matcher.group(0);
// The submatch is something like "sender|lp|rp"
String submatch = matcher.group(1);
// The subMatch is something like "sender|lp|rp"
String subMatch = matcher.group(1);
// The parts are something like ["sender", "lp", "rp"]
String[] parts = submatch.split(ESC_SEPARATOR);
String[] parts = subMatch.split(ESC_SEPARATOR);
// The modifier ids are something like ["lp", "rp"] and tagId something like "sender"
List<String> modifierIds = new ArrayList<>(Arrays.asList(parts));
@ -61,23 +61,23 @@ public class ChatFormatter {
String replacement;
if (tag == null) {
// No change if tag wasn't found
replacement = fullmatch;
replacement = fullMatch;
} else {
replacement = compute(tag, modifierIds, sender, recipient);
if (replacement == null) {
// If a tag or modifier returns null it's the same as opting out.
replacement = fullmatch;
replacement = fullMatch;
}
}
matcher.appendReplacement(ret, replacement);
matcher.appendReplacement(returnValue, replacement);
}
// Append the rest
matcher.appendTail(ret);
matcher.appendTail(returnValue);
// And finally we return the string value of the buffer we built
return ret.toString();
return returnValue.toString();
}
// -------------------------------------------- //

View File

@ -12,7 +12,7 @@ public class ChatModifierLc extends ChatModifier {
super("lc");
}
private static ChatModifierLc i = new ChatModifierLc();
private static final ChatModifierLc i = new ChatModifierLc();
public static ChatModifierLc get() {
return i;

View File

@ -13,7 +13,7 @@ public class ChatModifierLp extends ChatModifier {
super("lp");
}
private static ChatModifierLp i = new ChatModifierLp();
private static final ChatModifierLp i = new ChatModifierLp();
public static ChatModifierLp get() {
return i;

View File

@ -1,7 +1,7 @@
package net.knarcraft.factions.chat.modifier;
import net.knarcraft.factions.chat.ChatModifier;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.chat.ChatModifier;
import org.bukkit.command.CommandSender;
public class ChatModifierParse extends ChatModifier {
@ -13,7 +13,7 @@ public class ChatModifierParse extends ChatModifier {
super("parse");
}
private static ChatModifierParse i = new ChatModifierParse();
private static final ChatModifierParse i = new ChatModifierParse();
public static ChatModifierParse get() {
return i;

View File

@ -12,7 +12,7 @@ public class ChatModifierRp extends ChatModifier {
super("rp");
}
private static ChatModifierRp i = new ChatModifierRp();
private static final ChatModifierRp i = new ChatModifierRp();
public static ChatModifierRp get() {
return i;

View File

@ -12,7 +12,7 @@ public class ChatModifierUc extends ChatModifier {
super("uc");
}
private static ChatModifierUc i = new ChatModifierUc();
private static final ChatModifierUc i = new ChatModifierUc();
public static ChatModifierUc get() {
return i;

View File

@ -1,7 +1,7 @@
package net.knarcraft.factions.chat.modifier;
import net.knarcraft.factions.chat.ChatModifier;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.chat.ChatModifier;
import org.bukkit.command.CommandSender;
public class ChatModifierUcf extends ChatModifier {
@ -13,7 +13,7 @@ public class ChatModifierUcf extends ChatModifier {
super("ucf");
}
private static ChatModifierUcf i = new ChatModifierUcf();
private static final ChatModifierUcf i = new ChatModifierUcf();
public static ChatModifierUcf get() {
return i;

View File

@ -14,7 +14,7 @@ public class ChatTagName extends ChatTag {
super("factions_name");
}
private static ChatTagName i = new ChatTagName();
private static final ChatTagName i = new ChatTagName();
public static ChatTagName get() {
return i;
@ -27,10 +27,10 @@ public class ChatTagName extends ChatTag {
@Override
public String getReplacement(CommandSender sender, CommandSender recipient) {
// Get entities
MPlayer usender = MPlayer.get(sender);
MPlayer uSender = MPlayer.get(sender);
// No "force"
Faction faction = usender.getFaction();
Faction faction = uSender.getFaction();
if (faction.isNone()) {
return "";
}

View File

@ -14,7 +14,7 @@ public class ChatTagNameforce extends ChatTag {
super("factions_nameforce");
}
private static ChatTagNameforce i = new ChatTagNameforce();
private static final ChatTagNameforce i = new ChatTagNameforce();
public static ChatTagNameforce get() {
return i;

View File

@ -13,7 +13,7 @@ public class ChatTagRelcolor extends ChatTag {
super("factions_relcolor");
}
private static ChatTagRelcolor i = new ChatTagRelcolor();
private static final ChatTagRelcolor i = new ChatTagRelcolor();
public static ChatTagRelcolor get() {
return i;

View File

@ -1,8 +1,8 @@
package net.knarcraft.factions.chat.tag;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.chat.ChatTag;
import net.knarcraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.command.CommandSender;
public class ChatTagRole extends ChatTag {
@ -14,7 +14,7 @@ public class ChatTagRole extends ChatTag {
super("factions_role");
}
private static ChatTagRole i = new ChatTagRole();
private static final ChatTagRole i = new ChatTagRole();
public static ChatTagRole get() {
return i;

View File

@ -14,7 +14,7 @@ public class ChatTagRoleprefix extends ChatTag {
super("factions_roleprefix");
}
private static ChatTagRoleprefix i = new ChatTagRoleprefix();
private static final ChatTagRoleprefix i = new ChatTagRoleprefix();
public static ChatTagRoleprefix get() {
return i;

View File

@ -13,7 +13,7 @@ public class ChatTagRoleprefixforce extends ChatTag {
super("factions_roleprefixforce");
}
private static ChatTagRoleprefixforce i = new ChatTagRoleprefixforce();
private static final ChatTagRoleprefixforce i = new ChatTagRoleprefixforce();
public static ChatTagRoleprefixforce get() {
return i;

View File

@ -13,7 +13,7 @@ public class ChatTagTitle extends ChatTag {
super("factions_title");
}
private static ChatTagTitle i = new ChatTagTitle();
private static final ChatTagTitle i = new ChatTagTitle();
public static ChatTagTitle get() {
return i;

View File

@ -1,9 +1,9 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.command.MassiveCommandDeprecated;
import com.massivecraft.massivecore.command.MassiveCommandVersion;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.entity.MConf;
import java.util.List;
@ -12,7 +12,7 @@ public class CmdFactions extends FactionsCommand {
// INSTANCE
// -------------------------------------------- //
private static CmdFactions i = new CmdFactions();
private static final CmdFactions i = new CmdFactions();
public static CmdFactions get() {
return i;
@ -28,21 +28,21 @@ public class CmdFactions extends FactionsCommand {
public CmdFactionsPlayer cmdFactionsPlayer = new CmdFactionsPlayer();
public CmdFactionsStatus cmdFactionsStatus = new CmdFactionsStatus();
public CmdFactionsJoin cmdFactionsJoin = new CmdFactionsJoin();
public CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave();
public CmdFactionsWarp cmdFactionsWarp = new CmdFactionsWarp();
public final CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave();
public final CmdFactionsWarp cmdFactionsWarp = new CmdFactionsWarp();
public CmdFactionsHome cmdFactionsHome = new CmdFactionsHome();
public CmdFactionsSethome cmdFactionsSethome = new CmdFactionsSethome();
public CmdFactionsUnsethome cmdFactionsUnsethome = new CmdFactionsUnsethome();
public CmdFactionsVote cmdFactionsVote = new CmdFactionsVote();
public final CmdFactionsVote cmdFactionsVote = new CmdFactionsVote();
public CmdFactionsMap cmdFactionsMap = new CmdFactionsMap();
public CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate();
public CmdFactionsName cmdFactionsName = new CmdFactionsName();
public CmdFactionsDescription cmdFactionsDescription = new CmdFactionsDescription();
public final CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate();
public final CmdFactionsName cmdFactionsName = new CmdFactionsName();
public final CmdFactionsDescription cmdFactionsDescription = new CmdFactionsDescription();
public CmdFactionsMotd cmdFactionsMotd = new CmdFactionsMotd();
public CmdFactionsInvite cmdFactionsInvite = new CmdFactionsInvite();
public CmdFactionsKick cmdFactionsKick = new CmdFactionsKick();
public CmdFactionsTitle cmdFactionsTitle = new CmdFactionsTitle();
public CmdFactionsRank cmdFactionsRank = new CmdFactionsRank();
public final CmdFactionsInvite cmdFactionsInvite = new CmdFactionsInvite();
public final CmdFactionsKick cmdFactionsKick = new CmdFactionsKick();
public final CmdFactionsTitle cmdFactionsTitle = new CmdFactionsTitle();
public final CmdFactionsRank cmdFactionsRank = new CmdFactionsRank();
public CmdFactionsMoney cmdFactionsMoney = new CmdFactionsMoney();
public CmdFactionsTop cmdFactionsTop = new CmdFactionsTop();
public CmdFactionsSeeChunk cmdFactionsSeeChunk = new CmdFactionsSeeChunk();
@ -52,17 +52,17 @@ public class CmdFactions extends FactionsCommand {
public CmdFactionsUnclaim cmdFactionsUnclaim = new CmdFactionsUnclaim();
public CmdFactionsAccess cmdFactionsAccess = new CmdFactionsAccess();
public CmdFactionsChunkname cmdFactionsChunkname = new CmdFactionsChunkname();
public CmdFactionsRelation cmdFactionsRelation = new CmdFactionsRelation();
public final CmdFactionsRelation cmdFactionsRelation = new CmdFactionsRelation();
public CmdFactionsRelationOld cmdFactionsRelationOldAlly = new CmdFactionsRelationOld("ally");
public CmdFactionsRelationOld cmdFactionsRelationOldTruce = new CmdFactionsRelationOld("truce");
public CmdFactionsRelationOld cmdFactionsRelationOldNeutral = new CmdFactionsRelationOld("neutral");
public CmdFactionsRelationOld cmdFactionsRelationOldEnemy = new CmdFactionsRelationOld("enemy");
public CmdFactionsTax cmdFactionsTax = new CmdFactionsTax();
public CmdFactionsPerm cmdFactionsPerm = new CmdFactionsPerm();
public CmdFactionsFlag cmdFactionsFlag = new CmdFactionsFlag();
public final CmdFactionsPerm cmdFactionsPerm = new CmdFactionsPerm();
public final CmdFactionsFlag cmdFactionsFlag = new CmdFactionsFlag();
public CmdFactionsFly cmdFactionsFly = new CmdFactionsFly();
public CmdFactionsUnstuck cmdFactionsUnstuck = new CmdFactionsUnstuck();
public CmdFactionsOverride cmdFactionsOverride = new CmdFactionsOverride();
public final CmdFactionsOverride cmdFactionsOverride = new CmdFactionsOverride();
public CmdFactionsDisband cmdFactionsDisband = new CmdFactionsDisband();
public CmdFactionsPowerboost cmdFactionsPowerBoost = new CmdFactionsPowerboost();
public CmdFactionsSetpower cmdFactionsSetpower = new CmdFactionsSetpower();

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.TerritoryAccess;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.util.AsciiMap;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.Txt;
import java.util.Collection;

View File

@ -1,17 +1,17 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.Board;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveMap;
import com.massivecraft.massivecore.mixin.MixinWorld;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.ps.PSFormatHumanSpace;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.Board;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import java.util.List;
import java.util.Map;

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.ChunkUtil;
import net.knarcraft.factions.Perm;
import java.util.Set;

View File

@ -1,14 +1,13 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.ChunkUtil;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import java.util.Set;
import java.util.function.Predicate;
@ -36,7 +35,7 @@ public class CmdFactionsAccessSetFill extends CmdFactionsAccessSetXSimple {
// -------------------------------------------- //
@Override
public Set<PS> getChunks() throws MassiveException {
public Set<PS> getChunks() {
// Common Startup
final PS chunk = PS.valueOf(me.getLocation()).getChunk(true);

View File

@ -1,9 +1,9 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import net.knarcraft.factions.Perm;
import java.util.Collections;
import java.util.Set;

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.ChunkUtil;
import net.knarcraft.factions.Perm;
import java.util.Set;

View File

@ -1,9 +1,9 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.Faction;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.ps.PS;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import java.util.Set;

View File

@ -1,9 +1,9 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeInteger;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.MConf;
public abstract class CmdFactionsAccessSetXRadius extends CmdFactionsAccessSetX {

View File

@ -1,9 +1,5 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.TerritoryAccess;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.util.AsciiMap;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.command.type.TypeNullable;
@ -11,6 +7,10 @@ import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.TerritoryAccess;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.util.AsciiMap;
public class CmdFactionsChunkname extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,5 +1,9 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.collections.MassiveSet;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.store.EntityInternalMap;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Rel;
import net.knarcraft.factions.TerritoryAccess;
import net.knarcraft.factions.entity.Board;
@ -10,11 +14,6 @@ import net.knarcraft.factions.entity.Invitation;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.entity.MPlayerColl;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveSet;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.store.EntityInternalMap;
import com.massivecraft.massivecore.util.Txt;
import java.util.Iterator;
import java.util.Map.Entry;
@ -26,7 +25,7 @@ public class CmdFactionsClean extends FactionsCommand {
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
Object message;
int count;

View File

@ -1,9 +1,9 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.command.editor.CommandEditSingleton;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.MConf;
public class CmdFactionsConfig extends CommandEditSingleton<MConf> {
// -------------------------------------------- //

View File

@ -1,5 +1,8 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.store.MStore;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.req.ReqHasntFaction;
import net.knarcraft.factions.cmd.type.TypeFactionNameStrict;
@ -8,9 +11,6 @@ import net.knarcraft.factions.entity.FactionColl;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.event.EventFactionsCreate;
import net.knarcraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.store.MStore;
import org.bukkit.ChatColor;
public class CmdFactionsCreate extends FactionsCommand {

View File

@ -1,12 +1,12 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.mixin.MixinDisplayName;
import net.knarcraft.factions.cmd.req.ReqHasFaction;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsDescriptionChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.mixin.MixinDisplayName;
public class CmdFactionsDescription extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,5 +1,10 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation;
import com.massivecraft.massivecore.util.ConfirmationUtil;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
@ -10,11 +15,6 @@ import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsDisband;
import net.knarcraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation;
import com.massivecraft.massivecore.util.ConfirmationUtil;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsDisband extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,9 +1,8 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.entity.MFlag;
import net.knarcraft.factions.entity.MFlagColl;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.util.Txt;
import java.util.List;
import java.util.stream.Collectors;
@ -22,7 +21,7 @@ public class CmdFactionsDocumentationFlags extends FactionsCommandDocumentation
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
msgDoc("Flags are a way to give certain factions certain attributes " +
" such as disabling pvp or enabling friendly fire.");
msgDoc("To see all the flags type:");

View File

@ -1,7 +1,5 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
public class CmdFactionsDocumentationPerms extends FactionsCommandDocumentation {
// -------------------------------------------- //
// CONSTRUCT
@ -16,7 +14,7 @@ public class CmdFactionsDocumentationPerms extends FactionsCommandDocumentation
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
msgDoc("Permissions decide who can do what in your faction. " +
"Permissions can be given to a rank, a player, a relation, " +
"everyone in another faction or everyone with a specific rank in another faction.");

View File

@ -1,7 +1,6 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
public class CmdFactionsDocumentationPower extends FactionsCommandDocumentation {
// -------------------------------------------- //
@ -17,7 +16,7 @@ public class CmdFactionsDocumentationPower extends FactionsCommandDocumentation
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
msgDoc("All players have an amount of power ranging from <h>%.2f <i>to <h>%.2f<i>.", MConf.get().powerMin, MConf.get().powerMax);
msgDoc("The power of a faction is equal to the combined power of all it's members.");
msgDoc("Your power is <h>%.2f<i>", msender.getPower());

View File

@ -1,9 +1,8 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.entity.Rank;
import org.bukkit.ChatColor;
import java.util.Comparator;
@ -24,7 +23,7 @@ public class CmdFactionsDocumentationRanks extends FactionsCommandDocumentation
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
msgDoc("Ranks divide the faction into groups.");
List<Rank> ranks = msenderFaction.getRanks().getAll(Comparator.comparingInt(Rank::getPriority).reversed());

View File

@ -1,12 +1,11 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.req.ReqTaxEnabled;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.TimeDiffUtil;
import com.massivecraft.massivecore.util.TimeUnit;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.req.ReqTaxEnabled;
import net.knarcraft.factions.entity.MConf;
import java.util.LinkedHashMap;
@ -24,7 +23,7 @@ public class CmdFactionsDocumentationTax extends FactionsCommandDocumentation {
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
LinkedHashMap<TimeUnit, Long> timeUnitcounts = TimeDiffUtil.limit(TimeDiffUtil.unitcounts(MConf.get().taxTaskPeriodMillis, TimeUnit.getAll()), 3);
String periodString = TimeDiffUtil.formatedVerboose(timeUnitcounts);

View File

@ -3,7 +3,6 @@ package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPerm;
import com.massivecraft.massivecore.MassiveException;
import java.util.Set;
@ -21,7 +20,7 @@ public class CmdFactionsDocumentationWarps extends FactionsCommandDocumentation
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
msgDoc("A faction can have warps which allows it's members to easily go to important places within the faction.");
if (MConf.get().warpsMax < 0) {

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.event.EventFactionsFactionShowAsync;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.PriorityLines;
import com.massivecraft.massivecore.mixin.MixinMessage;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.event.EventFactionsFactionShowAsync;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;

View File

@ -5,8 +5,8 @@ public class CmdFactionsFlag extends FactionsCommand {
// FIELDS
// -------------------------------------------- //
public CmdFactionsFlagList cmdFactionsFlagList = new CmdFactionsFlagList();
public final CmdFactionsFlagList cmdFactionsFlagList = new CmdFactionsFlagList();
public CmdFactionsFlagShow cmdFactionsFlagShow = new CmdFactionsFlagShow();
public CmdFactionsFlagSet cmdFactionsFlagSet = new CmdFactionsFlagSet();
public final CmdFactionsFlagSet cmdFactionsFlagSet = new CmdFactionsFlagSet();
}

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.entity.MFlag;
import net.knarcraft.factions.entity.MFlagColl;
import net.knarcraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.entity.MFlag;
import net.knarcraft.factions.entity.MFlagColl;
import net.knarcraft.factions.entity.MPlayer;
import org.bukkit.Bukkit;
import java.util.List;

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMFlag;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MFlag;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.event.EventFactionsFlagChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
public class CmdFactionsFlagSet extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MFlag;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MFlag;
import java.util.List;

View File

@ -1,12 +1,12 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.engine.EngineFly;
import net.knarcraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.MassiveCommandToggle;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.engine.EngineMassiveCorePlayerUpdate;
import com.massivecraft.massivecore.ps.PS;
import net.knarcraft.factions.engine.EngineFly;
import net.knarcraft.factions.entity.MPlayer;
import org.bukkit.entity.Player;
public class CmdFactionsFly extends MassiveCommandToggle {
@ -14,7 +14,7 @@ public class CmdFactionsFly extends MassiveCommandToggle {
// INSTANCE
// -------------------------------------------- //
private static CmdFactionsFly i = new CmdFactionsFly();
private static final CmdFactionsFly i = new CmdFactionsFly();
public static CmdFactionsFly get() {
return i;
@ -38,7 +38,7 @@ public class CmdFactionsFly extends MassiveCommandToggle {
}
@Override
public boolean getValue() throws MassiveException {
public boolean getValue() {
return MPlayer.get(sender).isFlying();
}

View File

@ -1,11 +1,10 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.util.MUtil;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.MConf;
import java.util.List;
@ -31,7 +30,7 @@ public class CmdFactionsHome extends FactionsCommandWarp {
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
public void perform() {
List<String> args = MUtil.list(MConf.get().warpsHomeName, this.argAt(0));
CmdFactions.get().cmdFactionsWarp.cmdFactionsWarpGo.execute(me, args);
}

View File

@ -6,7 +6,7 @@ public class CmdFactionsInvite extends FactionsCommand {
// -------------------------------------------- //
public CmdFactionsInviteList cmdFactionsInviteList = new CmdFactionsInviteList();
public CmdFactionsInviteAdd cmdFactionsInviteAdd = new CmdFactionsInviteAdd();
public CmdFactionsInviteRemove cmdFactionsInviteRemove = new CmdFactionsInviteRemove();
public final CmdFactionsInviteAdd cmdFactionsInviteAdd = new CmdFactionsInviteAdd();
public final CmdFactionsInviteRemove cmdFactionsInviteRemove = new CmdFactionsInviteRemove();
}

View File

@ -1,15 +1,15 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.Invitation;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsInvitedChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.Invitation;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsInvitedChange;
import org.bukkit.ChatColor;
import java.util.Collection;

View File

@ -1,10 +1,5 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Invitation;
import net.knarcraft.factions.entity.MPerm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.command.Parameter;
@ -15,6 +10,11 @@ import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.TimeDiffUtil;
import com.massivecraft.massivecore.util.TimeUnit;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Invitation;
import net.knarcraft.factions.entity.MPerm;
import java.util.LinkedHashMap;
import java.util.List;

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsInvitedChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsInvitedChange;
import org.bukkit.ChatColor;
import java.util.ArrayList;
@ -63,7 +63,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand {
Mson kick = Mson.mson(
mson("You might want to kick him. ").color(ChatColor.YELLOW),
mson(ChatColor.RED.toString() + tooltip).tooltip(ChatColor.YELLOW.toString() + tooltip).suggest(command)
mson(ChatColor.RED + tooltip).tooltip(ChatColor.YELLOW + tooltip).suggest(command)
);
// Inform
@ -106,7 +106,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand {
Mson invite = Mson.mson(
mson("You might want to invite him. ").color(ChatColor.YELLOW),
mson(ChatColor.GREEN.toString() + tooltip).tooltip(ChatColor.YELLOW.toString() + tooltip).suggest(command)
mson(ChatColor.GREEN + tooltip).tooltip(ChatColor.YELLOW + tooltip).suggest(command)
);
// Inform

View File

@ -1,5 +1,8 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.cmd.type.TypeFaction;
@ -9,9 +12,6 @@ import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MFlag;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsJoin extends FactionsCommand {

View File

@ -1,5 +1,7 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.util.IdUtil;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.Faction;
@ -8,8 +10,6 @@ import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.util.IdUtil;
import org.bukkit.ChatColor;
public class CmdFactionsKick extends FactionsCommand {

View File

@ -1,15 +1,15 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.comparator.ComparatorFactionList;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import net.knarcraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.comparator.ComparatorFactionList;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import net.knarcraft.factions.entity.MPlayer;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.util.AsciiMap;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.util.AsciiMap;
public class CmdFactionsMap extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
public class CmdFactionsMoneyBalance extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,15 +1,15 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyDeposit extends FactionsCommand {

View File

@ -1,15 +1,15 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferF2f extends FactionsCommand {

View File

@ -1,5 +1,9 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled;
import net.knarcraft.factions.cmd.type.TypeFaction;
@ -8,10 +12,6 @@ import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferF2p extends FactionsCommand {

View File

@ -1,5 +1,9 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled;
import net.knarcraft.factions.cmd.type.TypeFaction;
@ -8,10 +12,6 @@ import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferP2f extends FactionsCommand {

View File

@ -1,5 +1,9 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled;
import net.knarcraft.factions.cmd.type.TypeFaction;
@ -7,10 +11,6 @@ import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyWithdraw extends FactionsCommand {

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.ConfirmationUtil;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import net.knarcraft.factions.entity.MConf;
public class CmdFactionsMoneyconvert extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,14 +1,14 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsMotdChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.TypeNullable;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.mixin.MixinDisplayName;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.event.EventFactionsMotdChange;
public class CmdFactionsMotd extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeFactionNameLenient;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.event.EventFactionsNameChange;
import com.massivecraft.massivecore.MassiveException;
public class CmdFactionsName extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,10 +1,10 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
public class CmdFactionsOverride extends FactionsCommand {
// -------------------------------------------- //

View File

@ -5,10 +5,10 @@ public class CmdFactionsPerm extends FactionsCommand {
// FIELDS
// -------------------------------------------- //
CmdFactionsPermList cmdFactionsPermList = new CmdFactionsPermList();
CmdFactionsPermShow cmdFactionsPermShow = new CmdFactionsPermShow();
CmdFactionsPermView cmdFactionsPermView = new CmdFactionsPermView();
CmdFactionsPermViewall cmdFactionsPermViewall = new CmdFactionsPermViewall();
CmdFactionsPermSet cmdFactionsPermSet = new CmdFactionsPermSet();
final CmdFactionsPermList cmdFactionsPermList = new CmdFactionsPermList();
final CmdFactionsPermShow cmdFactionsPermShow = new CmdFactionsPermShow();
final CmdFactionsPermView cmdFactionsPermView = new CmdFactionsPermView();
final CmdFactionsPermViewall cmdFactionsPermViewall = new CmdFactionsPermViewall();
final CmdFactionsPermSet cmdFactionsPermSet = new CmdFactionsPermSet();
}

View File

@ -1,12 +1,12 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPermColl;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPermColl;
import org.bukkit.Bukkit;
import java.util.List;

View File

@ -1,5 +1,8 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMPerm;
import net.knarcraft.factions.cmd.type.TypeMPermable;
@ -7,9 +10,6 @@ import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.event.EventFactionsPermChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsPermSet extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMPerm;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.util.Txt;
import java.util.Collection;
import java.util.List;

View File

@ -1,16 +1,16 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
import java.util.List;
@ -60,8 +60,7 @@ public class CmdFactionsPermView extends FactionsCommand {
String permissionSingularPlural = permNames.size() == 1 ? "permission" : "permissions";
msg("<i>In <reset>%s <reset>%s <i>specifically has the %s: <reset>%s<i>.", faction.describeTo(msender), permable.getDisplayName(sender), permissionSingularPlural, names);
}
if (permable instanceof MPlayer) {
MPlayer mplayer = (MPlayer) permable;
if (permable instanceof MPlayer mplayer) {
msg("<i>They may have other permissions through their faction membership, rank or relation to <reset>%s<i>.", faction.describeTo(msender));
List<Mson> msons = new MassiveList<>();
@ -76,15 +75,13 @@ public class CmdFactionsPermView extends FactionsCommand {
Mson msons2 = Mson.implode(msons, Mson.SPACE);
message(mson(mson("Commands: ").color(ChatColor.YELLOW), msons2));
}
if (permable instanceof Faction) {
Faction faction1 = (Faction) permable;
if (permable instanceof Faction faction1) {
msg("<i>They may have other permissions through their relation to <reset>%s<i>.", faction.describeTo(msender));
Mson msonRelation = Mson.parse("<command>[relation]").command(this, faction.getRelationTo(faction1).toString(), faction.getName());
Mson msons = Mson.implode(MUtil.list(msonRelation), Mson.SPACE);
message(mson(mson("Commands: ").color(ChatColor.YELLOW), msons));
}
if (permable instanceof Rank && !faction.hasRank((Rank) permable)) {
Rank rank = (Rank) permable;
if (permable instanceof Rank rank && !faction.hasRank((Rank) permable)) {
msg("<i>They may have other permissions thorugh their faction membership or relation to <reset>%s<i>.", faction.describeTo(msender));
Mson msonFaction = Mson.parse("<command>[faction]").command(this, rank.getFaction().getName(), faction.getName());
Mson msonRelation = Mson.parse("<command>[relation]").command(this, faction.getRelationTo(rank.getFaction()).toString(), faction.getName());

View File

@ -1,14 +1,14 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMPermable;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.util.Txt;
import java.util.List;
import java.util.stream.Collectors;
@ -44,18 +44,15 @@ public class CmdFactionsPermViewall extends FactionsCommand {
List<MPerm.MPermable> permables = new MassiveList<>();
permables.add(permable);
if (permable instanceof MPlayer) {
MPlayer mplayer = (MPlayer) permable;
if (permable instanceof MPlayer mplayer) {
permables.add(mplayer.getFaction());
permables.add(mplayer.getRank());
permables.add(faction.getRelationTo(mplayer));
}
if (permable instanceof Faction) {
Faction faction1 = (Faction) permable;
if (permable instanceof Faction faction1) {
permables.add(faction.getRelationTo(faction1));
}
if (permable instanceof Rank && !faction.hasRank((Rank) permable)) {
Rank rank = (Rank) permable;
if (permable instanceof Rank rank && !faction.hasRank((Rank) permable)) {
Faction faction1 = rank.getFaction();
permables.add(faction1);
permables.add(faction.getRelationTo(faction1));

View File

@ -1,14 +1,14 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.Progressbar;
import com.massivecraft.massivecore.event.EventMassiveCorePlayerCleanInactivityToleranceMillis;
import com.massivecraft.massivecore.util.TimeDiffUtil;
import com.massivecraft.massivecore.util.TimeUnit;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.MConf;
import net.knarcraft.factions.entity.MPlayer;
import java.util.LinkedHashMap;
import java.util.Map.Entry;

View File

@ -5,8 +5,8 @@ public class CmdFactionsPowerboost extends FactionsCommand {
// FIELDS
// -------------------------------------------- //
public CmdFactionsPowerboostPlayer cmdFactionsPowerBoostPlayer = new CmdFactionsPowerboostPlayer();
public CmdFactionsPowerboostFaction cmdFactionsPowerBoostFaction = new CmdFactionsPowerboostFaction();
public final CmdFactionsPowerboostPlayer cmdFactionsPowerBoostPlayer = new CmdFactionsPowerboostPlayer();
public final CmdFactionsPowerboostFaction cmdFactionsPowerBoostFaction = new CmdFactionsPowerboostFaction();
// -------------------------------------------- //
// CONSTRUCT

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.FactionsParticipator;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.Type;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.FactionsParticipator;
public abstract class CmdFactionsPowerboostAbstract extends FactionsCommand {
// -------------------------------------------- //

View File

@ -5,7 +5,7 @@ public class CmdFactionsRank extends FactionsCommand {
// FIELDS
// -------------------------------------------- //
public CmdFactionsRankSet cmdFactionsRankSet = new CmdFactionsRankSet();
public final CmdFactionsRankSet cmdFactionsRankSet = new CmdFactionsRankSet();
public CmdFactionsRankShow cmdFactionsRankShow = new CmdFactionsRankShow();
public CmdFactionsRankList cmdFactionsRankList = new CmdFactionsRankList();
public CmdFactionsRankEdit cmdFactionsRankEdit = new CmdFactionsRankEdit();

View File

@ -1,8 +1,8 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
public class CmdFactionsRankEdit extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,12 +1,12 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeInteger;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.command.type.primitive.TypeStringParsed;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Rank;
import java.util.Collection;

View File

@ -1,13 +1,13 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeRank;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.util.Txt;
import java.util.Collection;
import java.util.List;
@ -34,7 +34,7 @@ public class CmdFactionsRankEditDelete extends FactionsCommand {
Faction faction = this.readArgAt(1, msenderFaction);
// Rank if any passed.
TypeRank typeRank = new TypeRank(faction);
TypeRank typeRank = TypeRank.get(faction, null);
Rank rank = typeRank.read(this.argAt(0), sender);
CmdFactionsRankEdit.ensureAllowed(msender, faction, "delete");

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeRank;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import java.util.Collection;
@ -32,7 +32,7 @@ public class CmdFactionsRankEditName extends FactionsCommand {
Faction faction = this.readArgAt(2, msenderFaction);
// Rank if any passed.
TypeRank typeRank = new TypeRank(faction);
TypeRank typeRank = TypeRank.get(faction, null);
Rank rank = typeRank.read(this.argAt(0), sender);
// Args

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeRank;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
public class CmdFactionsRankEditPrefix extends FactionsCommand {
// -------------------------------------------- //
@ -30,7 +30,7 @@ public class CmdFactionsRankEditPrefix extends FactionsCommand {
Faction faction = this.readArgAt(2, msenderFaction);
// Rank if any passed.
TypeRank typeRank = new TypeRank(faction);
TypeRank typeRank = TypeRank.get(faction, null);
Rank rank = typeRank.read(this.argAt(0), sender);
// Args

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeInteger;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeRank;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeInteger;
import java.util.Collection;
@ -32,7 +32,7 @@ public class CmdFactionsRankEditPriority extends FactionsCommand {
Faction faction = this.readArgAt(2, msenderFaction);
// Rank if any passed.
TypeRank typeRank = new TypeRank(faction);
TypeRank typeRank = TypeRank.get(faction, null);
Rank rank = typeRank.read(this.argAt(0), sender);
CmdFactionsRankEdit.ensureAllowed(msender, faction, "edit");

View File

@ -1,12 +1,12 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.Rank;
import java.util.Comparator;
import java.util.List;

View File

@ -1,8 +1,8 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.util.MUtil;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
public class CmdFactionsRankOld extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,5 +1,8 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveSet;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
@ -13,9 +16,6 @@ import net.knarcraft.factions.entity.MPlayerColl;
import net.knarcraft.factions.entity.Rank;
import net.knarcraft.factions.event.EventFactionsMembershipChange;
import net.knarcraft.factions.event.EventFactionsRankChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveSet;
import com.massivecraft.massivecore.util.Txt;
import java.util.HashSet;
import java.util.Set;

View File

@ -1,10 +1,10 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.cmd.type.TypeMPlayer;
import net.knarcraft.factions.entity.MPlayer;
import net.knarcraft.factions.entity.Rank;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsRankShow extends FactionsCommand {
// -------------------------------------------- //

View File

@ -5,7 +5,7 @@ public class CmdFactionsRelation extends FactionsCommand {
// FIELDS
// -------------------------------------------- //
public CmdFactionsRelationSet cmdFactionsRelationSet = new CmdFactionsRelationSet();
public final CmdFactionsRelationSet cmdFactionsRelationSet = new CmdFactionsRelationSet();
public CmdFactionsRelationList cmdFactionsRelationList = new CmdFactionsRelationList();
public CmdFactionsRelationWishes cmdFactionsRelationWishes = new CmdFactionsRelationWishes();

View File

@ -1,11 +1,5 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.Rel;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeRelation;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.collections.MassiveSet;
@ -14,6 +8,12 @@ import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.Rel;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeRelation;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import org.bukkit.Bukkit;
import java.util.List;

View File

@ -1,10 +1,10 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.util.MUtil;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
public class CmdFactionsRelationOld extends FactionsCommand {
// -------------------------------------------- //

View File

@ -1,5 +1,8 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.MassiveCommand;
import com.massivecraft.massivecore.mson.Mson;
import net.knarcraft.factions.Rel;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.cmd.type.TypeRelation;
@ -7,9 +10,6 @@ import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MFlag;
import net.knarcraft.factions.entity.MPerm;
import net.knarcraft.factions.event.EventFactionsRelationChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.MassiveCommand;
import com.massivecraft.massivecore.mson.Mson;
import org.bukkit.ChatColor;
public class CmdFactionsRelationSet extends FactionsCommand {

View File

@ -1,10 +1,5 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.Rel;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveMap;
import com.massivecraft.massivecore.command.Parameter;
@ -12,6 +7,11 @@ import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
import net.knarcraft.factions.Factions;
import net.knarcraft.factions.Rel;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import org.bukkit.Bukkit;
import java.util.Map;

View File

@ -1,10 +1,10 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.util.AsciiMap;
import net.knarcraft.factions.util.VisualizeUtil;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.ps.PSFormatHumanSpace;
import net.knarcraft.factions.util.AsciiMap;
import net.knarcraft.factions.util.VisualizeUtil;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
@ -56,7 +56,7 @@ public class CmdFactionsSeeChunkOld extends FactionsCommand {
showPillar(me, world, blockX, blockZ);
// Inform
boolean showCoords = AsciiMap.showChunkCoords(chunk);
boolean showCoords = AsciiMap.showChunkCoordinates(chunk);
String chunkDesc = showCoords ? chunk.toString(PSFormatHumanSpace.get()) : "chunk";
msg("<i>Visualized %s", chunkDesc);
}

View File

@ -1,14 +1,14 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.Board;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.mixin.MixinWorld;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.MUtil;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.Board;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import java.util.Collections;
import java.util.List;

View File

@ -1,14 +1,14 @@
package net.knarcraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.cmd.type.TypeFaction;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.FactionColl;
import net.knarcraft.factions.entity.MPerm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import java.util.Collections;
import java.util.Set;

View File

@ -1,11 +1,11 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.ChunkUtil;
import net.knarcraft.factions.Perm;
import java.util.Set;

View File

@ -1,14 +1,13 @@
package net.knarcraft.factions.cmd;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.ChunkUtil;
import net.knarcraft.factions.Perm;
import net.knarcraft.factions.entity.BoardColl;
import net.knarcraft.factions.entity.Faction;
import net.knarcraft.factions.entity.MConf;
import java.util.Set;
import java.util.function.Predicate;
@ -41,7 +40,7 @@ public class CmdFactionsSetFill extends CmdFactionsSetXSimple {
// -------------------------------------------- //
@Override
public Set<PS> getChunks() throws MassiveException {
public Set<PS> getChunks() {
// Common Startup
final PS chunk = PS.valueOf(me.getLocation()).getChunk(true);

Some files were not shown because too many files have changed in this diff Show More