Format. Haven't done this in awhile. Just sneak it in.

This commit is contained in:
Trent Hensler 2018-01-04 17:40:27 -08:00
parent f019c4f833
commit 5c2abb34de
24 changed files with 113 additions and 137 deletions

View File

@ -22,7 +22,8 @@ public class FLocation implements Serializable {
try { try {
Class.forName("org.bukkit.WorldBorder"); Class.forName("org.bukkit.WorldBorder");
worldBorderClassPresent = true; worldBorderClassPresent = true;
} catch (ClassNotFoundException ignored) {} } catch (ClassNotFoundException ignored) {
}
worldBorderSupport = worldBorderClassPresent; worldBorderSupport = worldBorderClassPresent;
} }

View File

@ -18,7 +18,6 @@ public class FactionRenameEvent extends FactionPlayerEvent implements Cancellabl
* Get the player involved in the event. * Get the player involved in the event.
* *
* @return Player involved in the event. * @return Player involved in the event.
*
* @deprecated use getfPlayer().getPlayer() instead. * @deprecated use getfPlayer().getPlayer() instead.
*/ */
@Deprecated @Deprecated
@ -30,7 +29,6 @@ public class FactionRenameEvent extends FactionPlayerEvent implements Cancellabl
* Get the faction tag before it was renamed. * Get the faction tag before it was renamed.
* *
* @return old faction tag. * @return old faction tag.
*
* @deprecated use getFaction().getTag() instead. * @deprecated use getFaction().getTag() instead.
*/ */
@Deprecated @Deprecated

View File

@ -33,7 +33,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
* Get the id of the faction. * Get the id of the faction.
* *
* @return id of faction as String * @return id of faction as String
*
* @deprecated use getFaction().getId() instead. * @deprecated use getFaction().getId() instead.
*/ */
@Deprecated @Deprecated
@ -45,7 +44,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
* Get the tag of the faction. * Get the tag of the faction.
* *
* @return tag of faction as String * @return tag of faction as String
*
* @deprecated use getFaction().getTag() instead. * @deprecated use getFaction().getTag() instead.
*/ */
@Deprecated @Deprecated
@ -57,7 +55,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
* Get the Player involved in this event. * Get the Player involved in this event.
* *
* @return player from FPlayer. * @return player from FPlayer.
*
* @deprecated use getfPlayer().getPlayer() instead. * @deprecated use getfPlayer().getPlayer() instead.
*/ */
@Deprecated @Deprecated

View File

@ -16,7 +16,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
* Get the id of the faction. * Get the id of the faction.
* *
* @return id of faction as String * @return id of faction as String
*
* @deprecated use getFaction().getId() instead. * @deprecated use getFaction().getId() instead.
*/ */
@Deprecated @Deprecated
@ -28,7 +27,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
* Get the tag of the faction. * Get the tag of the faction.
* *
* @return tag of faction as String * @return tag of faction as String
*
* @deprecated use getFaction().getTag() instead. * @deprecated use getFaction().getTag() instead.
*/ */
@Deprecated @Deprecated
@ -40,7 +38,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
* Get the Player involved in the event. * Get the Player involved in the event.
* *
* @return Player from FPlayer. * @return Player from FPlayer.
*
* @deprecated use getfPlayer().getPlayer() instead. * @deprecated use getfPlayer().getPlayer() instead.
*/ */
@Deprecated @Deprecated

View File

@ -28,7 +28,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
* Get the id of the faction. * Get the id of the faction.
* *
* @return id of faction as String * @return id of faction as String
*
* @deprecated use getFaction().getId() instead. * @deprecated use getFaction().getId() instead.
*/ */
@Deprecated @Deprecated
@ -40,7 +39,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
* Get the tag of the faction. * Get the tag of the faction.
* *
* @return tag of faction as String * @return tag of faction as String
*
* @deprecated use getFaction().getTag() instead. * @deprecated use getFaction().getTag() instead.
*/ */
@Deprecated @Deprecated
@ -52,7 +50,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
* Get the Player involved in the event. * Get the Player involved in the event.
* *
* @return Player from FPlayer. * @return Player from FPlayer.
*
* @deprecated use getfPlayer().getPlayer() instead. * @deprecated use getfPlayer().getPlayer() instead.
*/ */
@Deprecated @Deprecated

View File

@ -21,7 +21,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
* Get the id of the faction. * Get the id of the faction.
* *
* @return id of faction as String * @return id of faction as String
*
* @deprecated use getFaction().getId() instead. * @deprecated use getFaction().getId() instead.
*/ */
@Deprecated @Deprecated
@ -33,7 +32,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
* Get the tag of the faction. * Get the tag of the faction.
* *
* @return tag of faction as String * @return tag of faction as String
*
* @deprecated use getFaction().getTag() instead. * @deprecated use getFaction().getTag() instead.
*/ */
@Deprecated @Deprecated
@ -45,7 +43,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
* Get the Player involved in the event. * Get the Player involved in the event.
* *
* @return Player from FPlayer. * @return Player from FPlayer.
*
* @deprecated use getfPlayer().getPlayer() instead. * @deprecated use getfPlayer().getPlayer() instead.
*/ */
@Deprecated @Deprecated

View File

@ -39,7 +39,8 @@ public enum Role {
return NORMAL; return NORMAL;
case 2: case 2:
return MODERATOR; return MODERATOR;
case 3: return ADMIN; case 3:
return ADMIN;
} }
return null; return null;

View File

@ -4,7 +4,6 @@ import com.massivecraft.factions.*;
import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.integration.Econ;
import com.massivecraft.factions.struct.Relation; import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import com.massivecraft.factions.zcore.util.TagUtil;
import me.clip.placeholderapi.external.EZPlaceholderHook; import me.clip.placeholderapi.external.EZPlaceholderHook;
import org.apache.commons.lang.time.DurationFormatUtils; import org.apache.commons.lang.time.DurationFormatUtils;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;

View File

@ -7,6 +7,7 @@ public enum Access {
/** /**
* Case insensitive check for access. * Case insensitive check for access.
*
* @param check * @param check
* @return * @return
*/ */

View File

@ -37,6 +37,7 @@ public enum Action {
/** /**
* Case insensitive check for action. * Case insensitive check for action.
*
* @param check * @param check
* @return * @return
*/ */

View File

@ -173,7 +173,6 @@ public abstract class MemoryBoard extends Board {
* @param flocation - center location. * @param flocation - center location.
* @param faction - faction checking for. * @param faction - faction checking for.
* @param radius - chunk radius to check. * @param radius - chunk radius to check.
*
* @return true if another Faction is within the radius, otherwise false. * @return true if another Faction is within the radius, otherwise false.
*/ */
public boolean hasFactionWithin(FLocation flocation, Faction faction, int radius) { public boolean hasFactionWithin(FLocation flocation, Faction faction, int radius) {

View File

@ -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. * Check if the scoreboard should be shown. Simple method to be used by above method.
* *
* @param toShow Faction to be shown. * @param toShow Faction to be shown.
*
* @return true if should show, otherwise false. * @return true if should show, otherwise false.
*/ */
public boolean showInfoBoard(Faction toShow) { public boolean showInfoBoard(Faction toShow) {
@ -686,6 +685,7 @@ public abstract class MemoryFPlayer implements FPlayer {
public boolean canClaimForFaction(Faction forFaction) { 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())); 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) { public boolean canClaimForFactionAtLocation(Faction forFaction, Location location, boolean notifyFailure) {
FLocation flocation = new FLocation(location); FLocation flocation = new FLocation(location);

View File

@ -128,7 +128,6 @@ public enum TagReplacer {
* *
* @param fac Target faction * @param fac Target faction
* @param fp Target player (can be null) * @param fp Target player (can be null)
*
* @return the value for this enum! * @return the value for this enum!
*/ */
protected String getValue(Faction fac, FPlayer fp) { 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> * Returns a list of all the variables we can use for this type<br>
* *
* @param type the type we want * @param type the type we want
*
* @return a list of all the variables with this type * @return a list of all the variables with this type
*/ */
protected static List<TagReplacer> getByType(TagType type) { protected static List<TagReplacer> getByType(TagType type) {
@ -252,7 +250,6 @@ public enum TagReplacer {
/** /**
* @param original raw line with variables * @param original raw line with variables
* @param value what to replace var in raw line with * @param value what to replace var in raw line with
*
* @return the string with the new value * @return the string with the new value
*/ */
public String replace(String original, String value) { public String replace(String original, String value) {
@ -261,7 +258,6 @@ public enum TagReplacer {
/** /**
* @param toSearch raw line with variables * @param toSearch raw line with variables
*
* @return if the raw line contains this enums variable * @return if the raw line contains this enums variable
*/ */
public boolean contains(String toSearch) { public boolean contains(String toSearch) {

View File

@ -23,7 +23,6 @@ public class TagUtil {
* *
* @param faction for faction * @param faction for faction
* @param line raw line from config with variables to replace for * @param line raw line from config with variables to replace for
*
* @return clean line * @return clean line
*/ */
public static String parsePlain(Faction faction, String line) { public static String parsePlain(Faction faction, String line) {
@ -40,7 +39,6 @@ public class TagUtil {
* *
* @param fplayer for player * @param fplayer for player
* @param line raw line from config with variables to replace for * @param line raw line from config with variables to replace for
*
* @return clean line * @return clean line
*/ */
public static String parsePlain(FPlayer fplayer, String line) { public static String parsePlain(FPlayer fplayer, String line) {
@ -62,7 +60,6 @@ public class TagUtil {
* @param faction for faction * @param faction for faction
* @param fplayer from player * @param fplayer from player
* @param line raw line from config with variables to replace for * @param line raw line from config with variables to replace for
*
* @return clean line * @return clean line
*/ */
public static String parsePlain(Faction faction, FPlayer fplayer, String 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 faction for faction (viewers faction)
* @param fme for player (viewer) * @param fme for player (viewer)
* @param line fancy message prefix * @param line fancy message prefix
*
* @return * @return
*/ */
public static List<FancyMessage> parseFancy(Faction faction, FPlayer fme, String line) { 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 * Checks if a line has fancy variables
* *
* @param line raw line from config with variables * @param line raw line from config with variables
*
* @return if the line has fancy variables * @return if the line has fancy variables
*/ */
public static boolean hasFancy(String line) { public static boolean hasFancy(String line) {
@ -120,7 +115,6 @@ public class TagUtil {
* @param target Faction to get relate from * @param target Faction to get relate from
* @param fme Player to relate to * @param fme Player to relate to
* @param prefix First part of the fancy message * @param prefix First part of the fancy message
*
* @return list of fancy messages to send * @return list of fancy messages to send
*/ */
protected static List<FancyMessage> getFancy(Faction target, FPlayer fme, TagReplacer type, String prefix) { 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) * Parses tooltip variables from config <br> Supports variables for factions only (type 2)
* *
* @param faction faction to tooltip for * @param faction faction to tooltip for
*
* @return list of tooltips for a fancy message * @return list of tooltips for a fancy message
*/ */
private static List<String> tipFaction(Faction faction) { 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) * Parses tooltip variables from config <br> Supports variables for players and factions (types 1 and 2)
* *
* @param fplayer player to tooltip for * @param fplayer player to tooltip for
*
* @return list of tooltips for a fancy message * @return list of tooltips for a fancy message
*/ */
private static List<String> tipPlayer(FPlayer fplayer) { private static List<String> tipPlayer(FPlayer fplayer) {