Suppresses unused warnings

This commit is contained in:
Kristian Knarvik 2022-11-14 01:59:49 +01:00
parent 1c926413d0
commit 785e46e972
11 changed files with 15 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package net.knarcraft.knarlib;
/**
* KnarLib's main class
*/
@SuppressWarnings("unused")
public final class KnarLib {
private KnarLib() {

View File

@ -8,6 +8,7 @@ import org.bukkit.command.CommandSender;
/**
* A formatter for formatting displayed messages
*/
@SuppressWarnings("unused")
public final class StringFormatter {
private final String pluginName;

View File

@ -11,6 +11,7 @@ import static net.knarcraft.knarlib.formatting.StringFormatter.replacePlaceholde
/**
* A utility for formatting a string specifying an amount of time
*/
@SuppressWarnings("unused")
public final class TimeFormatter {
private static Map<Double, TranslatableTimeUnit[]> timeUnits;

View File

@ -3,6 +3,7 @@ package net.knarcraft.knarlib.formatting;
/**
* A message which can be translated
*/
@SuppressWarnings("unused")
public interface TranslatableMessage {
/**

View File

@ -6,6 +6,7 @@ package net.knarcraft.knarlib.formatting;
* <p>These time units must have a translatable message if you want to use the time formatter. Register one value with
* the translator's "registerMessageCategory" method!</p>
*/
@SuppressWarnings("unused")
public enum TranslatableTimeUnit implements TranslatableMessage {
/**

View File

@ -25,6 +25,7 @@ import java.util.logging.Level;
* Add a file strings.yml in your resources directory with data: `en.ENUM: "Text"`. You must have a `en` language as
* it's used as the fallback, but you can additionally add any language code you want.</p>
*/
@SuppressWarnings("unused")
public final class Translator {
private final List<TranslatableMessage> messageCategories = new ArrayList<>();

View File

@ -3,6 +3,7 @@ package net.knarcraft.knarlib.property;
/**
* An enum representing the different types of color conversions available
*/
@SuppressWarnings("unused")
public enum ColorConversion {
/**

View File

@ -10,6 +10,7 @@ import java.util.regex.Pattern;
/**
* A helper class for dealing with colors
*/
@SuppressWarnings("unused")
public final class ColorHelper {
private static boolean requireAmpersandInHexColors = false;

View File

@ -18,6 +18,7 @@ import java.util.Map;
/**
* A helper class for dealing with files
*/
@SuppressWarnings("unused")
public final class FileHelper {
private FileHelper() {

View File

@ -6,6 +6,7 @@ import java.util.List;
/**
* Helper class for getting string lists required for auto-completion
*/
@SuppressWarnings("unused")
public final class TabCompletionHelper {
private TabCompletionHelper() {

View File

@ -14,6 +14,7 @@ import java.util.logging.Level;
/**
* The update checker is responsible for looking for new updates
*/
@SuppressWarnings("unused")
public final class UpdateChecker {
private final static String updateNotice = "A new update is available: %s (You are still on %s)";
@ -26,7 +27,9 @@ public final class UpdateChecker {
* Checks if there's a new update available, and alerts the user if necessary
*
* @param plugin <p>The plugin to check for updates for</p>
* @param apiResourceURL <p>The spigot URL to check for updates. Example: https://api.spigotmc.org/legacy/update.php?resource={resourceId}</p>
* @param apiResourceURL <p>The spigot URL to check for updates. Example:
* <a href="https://api.spigotmc.org/legacy/update.php?resource=1111">
* https://api.spigotmc.org/legacy/update.php?resource={resourceId}</a></p>
* @param getVersionSupplier <p>The supplier used to get the current plugin version</p>
* @param setVersionMethod <p>A method to call with the new version as an argument. Can be used to alert admins about an available update or similar.</p>
*/