mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-11 19:36:46 +01:00
Format. Haven't done this in awhile. Just sneak it in.
This commit is contained in:
parent
f019c4f833
commit
5c2abb34de
@ -22,7 +22,8 @@ public class FLocation implements Serializable {
|
||||
try {
|
||||
Class.forName("org.bukkit.WorldBorder");
|
||||
worldBorderClassPresent = true;
|
||||
} catch (ClassNotFoundException ignored) {}
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
|
||||
worldBorderSupport = worldBorderClassPresent;
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ public class FactionRenameEvent extends FactionPlayerEvent implements Cancellabl
|
||||
* Get the player involved in the event.
|
||||
*
|
||||
* @return Player involved in the event.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -30,7 +29,6 @@ public class FactionRenameEvent extends FactionPlayerEvent implements Cancellabl
|
||||
* Get the faction tag before it was renamed.
|
||||
*
|
||||
* @return old faction tag.
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -33,7 +33,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -45,7 +44,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -57,7 +55,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the Player involved in this event.
|
||||
*
|
||||
* @return player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -16,7 +16,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -28,7 +27,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -40,7 +38,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
|
||||
* Get the Player involved in the event.
|
||||
*
|
||||
* @return Player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -28,7 +28,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -40,7 +39,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -52,7 +50,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
|
||||
* Get the Player involved in the event.
|
||||
*
|
||||
* @return Player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -21,7 +21,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -33,7 +32,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -45,7 +43,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the Player involved in the event.
|
||||
*
|
||||
* @return Player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -39,7 +39,8 @@ public enum Role {
|
||||
return NORMAL;
|
||||
case 2:
|
||||
return MODERATOR;
|
||||
case 3: return ADMIN;
|
||||
case 3:
|
||||
return ADMIN;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -4,7 +4,6 @@ import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TagUtil;
|
||||
import me.clip.placeholderapi.external.EZPlaceholderHook;
|
||||
import org.apache.commons.lang.time.DurationFormatUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -7,6 +7,7 @@ public enum Access {
|
||||
|
||||
/**
|
||||
* Case insensitive check for access.
|
||||
*
|
||||
* @param check
|
||||
* @return
|
||||
*/
|
||||
|
@ -37,6 +37,7 @@ public enum Action {
|
||||
|
||||
/**
|
||||
* Case insensitive check for action.
|
||||
*
|
||||
* @param check
|
||||
* @return
|
||||
*/
|
||||
|
@ -173,7 +173,6 @@ public abstract class MemoryBoard extends Board {
|
||||
* @param flocation - center location.
|
||||
* @param faction - faction checking for.
|
||||
* @param radius - chunk radius to check.
|
||||
*
|
||||
* @return true if another Faction is within the radius, otherwise false.
|
||||
*/
|
||||
public boolean hasFactionWithin(FLocation flocation, Faction faction, int radius) {
|
||||
|
@ -591,7 +591,6 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
* Check if the scoreboard should be shown. Simple method to be used by above method.
|
||||
*
|
||||
* @param toShow Faction to be shown.
|
||||
*
|
||||
* @return true if should show, otherwise false.
|
||||
*/
|
||||
public boolean showInfoBoard(Faction toShow) {
|
||||
@ -686,6 +685,7 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
public boolean canClaimForFaction(Faction forFaction) {
|
||||
return this.isAdminBypassing() || !forFaction.isWilderness() && (forFaction == this.getFaction() && this.getRole().isAtLeast(Role.MODERATOR)) || (forFaction.isSafeZone() && Permission.MANAGE_SAFE_ZONE.has(getPlayer())) || (forFaction.isWarZone() && Permission.MANAGE_WAR_ZONE.has(getPlayer()));
|
||||
}
|
||||
|
||||
public boolean canClaimForFactionAtLocation(Faction forFaction, Location location, boolean notifyFailure) {
|
||||
FLocation flocation = new FLocation(location);
|
||||
|
||||
|
@ -128,7 +128,6 @@ public enum TagReplacer {
|
||||
*
|
||||
* @param fac Target faction
|
||||
* @param fp Target player (can be null)
|
||||
*
|
||||
* @return the value for this enum!
|
||||
*/
|
||||
protected String getValue(Faction fac, FPlayer fp) {
|
||||
@ -232,7 +231,6 @@ public enum TagReplacer {
|
||||
* Returns a list of all the variables we can use for this type<br>
|
||||
*
|
||||
* @param type the type we want
|
||||
*
|
||||
* @return a list of all the variables with this type
|
||||
*/
|
||||
protected static List<TagReplacer> getByType(TagType type) {
|
||||
@ -252,7 +250,6 @@ public enum TagReplacer {
|
||||
/**
|
||||
* @param original raw line with variables
|
||||
* @param value what to replace var in raw line with
|
||||
*
|
||||
* @return the string with the new value
|
||||
*/
|
||||
public String replace(String original, String value) {
|
||||
@ -261,7 +258,6 @@ public enum TagReplacer {
|
||||
|
||||
/**
|
||||
* @param toSearch raw line with variables
|
||||
*
|
||||
* @return if the raw line contains this enums variable
|
||||
*/
|
||||
public boolean contains(String toSearch) {
|
||||
|
@ -23,7 +23,6 @@ public class TagUtil {
|
||||
*
|
||||
* @param faction for faction
|
||||
* @param line raw line from config with variables to replace for
|
||||
*
|
||||
* @return clean line
|
||||
*/
|
||||
public static String parsePlain(Faction faction, String line) {
|
||||
@ -40,7 +39,6 @@ public class TagUtil {
|
||||
*
|
||||
* @param fplayer for player
|
||||
* @param line raw line from config with variables to replace for
|
||||
*
|
||||
* @return clean line
|
||||
*/
|
||||
public static String parsePlain(FPlayer fplayer, String line) {
|
||||
@ -62,7 +60,6 @@ public class TagUtil {
|
||||
* @param faction for faction
|
||||
* @param fplayer from player
|
||||
* @param line raw line from config with variables to replace for
|
||||
*
|
||||
* @return clean line
|
||||
*/
|
||||
public static String parsePlain(Faction faction, FPlayer fplayer, String line) {
|
||||
@ -85,7 +82,6 @@ public class TagUtil {
|
||||
* @param faction for faction (viewers faction)
|
||||
* @param fme for player (viewer)
|
||||
* @param line fancy message prefix
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static List<FancyMessage> parseFancy(Faction faction, FPlayer fme, String line) {
|
||||
@ -102,7 +98,6 @@ public class TagUtil {
|
||||
* Checks if a line has fancy variables
|
||||
*
|
||||
* @param line raw line from config with variables
|
||||
*
|
||||
* @return if the line has fancy variables
|
||||
*/
|
||||
public static boolean hasFancy(String line) {
|
||||
@ -120,7 +115,6 @@ public class TagUtil {
|
||||
* @param target Faction to get relate from
|
||||
* @param fme Player to relate to
|
||||
* @param prefix First part of the fancy message
|
||||
*
|
||||
* @return list of fancy messages to send
|
||||
*/
|
||||
protected static List<FancyMessage> getFancy(Faction target, FPlayer fme, TagReplacer type, String prefix) {
|
||||
@ -208,7 +202,6 @@ public class TagUtil {
|
||||
* Parses tooltip variables from config <br> Supports variables for factions only (type 2)
|
||||
*
|
||||
* @param faction faction to tooltip for
|
||||
*
|
||||
* @return list of tooltips for a fancy message
|
||||
*/
|
||||
private static List<String> tipFaction(Faction faction) {
|
||||
@ -223,7 +216,6 @@ public class TagUtil {
|
||||
* Parses tooltip variables from config <br> Supports variables for players and factions (types 1 and 2)
|
||||
*
|
||||
* @param fplayer player to tooltip for
|
||||
*
|
||||
* @return list of tooltips for a fancy message
|
||||
*/
|
||||
private static List<String> tipPlayer(FPlayer fplayer) {
|
||||
|
Loading…
Reference in New Issue
Block a user