mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +00:00
IntelliJ reformat on utilities
This commit is contained in:
2 files changed
+15
-12
No files matched your search
@@ -51,6 +51,16 @@ public final class CarbonUtils {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private static final String[] colors;
|
private static final String[] colors;
|
||||||
|
|
||||||
|
static {
|
||||||
|
ArrayList<String> colorList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (NamedTextColor color : NamedTextColor.values()) {
|
||||||
|
colorList.add(color.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
colors = colorList.toArray(new String[0]);
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static Component createComponent(@NotNull final Player player) {
|
public static Component createComponent(@NotNull final Player player) {
|
||||||
if (!FunctionalityConstants.HAS_HOVER_EVENT_METHOD) {
|
if (!FunctionalityConstants.HAS_HOVER_EVENT_METHOD) {
|
||||||
@@ -157,7 +167,7 @@ public final class CarbonUtils {
|
|||||||
@NotNull
|
@NotNull
|
||||||
public static Argument textColorArgument() {
|
public static Argument textColorArgument() {
|
||||||
return new CustomArgument<>((input) -> {
|
return new CustomArgument<>((input) -> {
|
||||||
TextColor color = parseColor(input);
|
TextColor color = parseColor(input);
|
||||||
|
|
||||||
if (color == null) {
|
if (color == null) {
|
||||||
throw new CustomArgument.CustomArgumentException("Invalid color for input (" + input + ")");
|
throw new CustomArgument.CustomArgumentException("Invalid color for input (" + input + ")");
|
||||||
@@ -196,14 +206,4 @@ public final class CarbonUtils {
|
|||||||
throw new NotImplementedException("Not implemented yet.");
|
throw new NotImplementedException("Not implemented yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
|
||||||
ArrayList<String> colorList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (NamedTextColor color : NamedTextColor.values()) {
|
|
||||||
colorList.add(color.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
colors = colorList.toArray(new String[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,8 @@ public interface Registry<T> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified key and value to the registry
|
* Adds the specified key and value to the registry
|
||||||
* @param key The entry's key
|
*
|
||||||
|
* @param key The entry's key
|
||||||
* @param value The value to insert
|
* @param value The value to insert
|
||||||
* @return If successfully registered
|
* @return If successfully registered
|
||||||
*/
|
*/
|
||||||
@@ -17,6 +18,7 @@ public interface Registry<T> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the list of registered values
|
* Gets the list of registered values
|
||||||
|
*
|
||||||
* @return The list of registered values
|
* @return The list of registered values
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -24,6 +26,7 @@ public interface Registry<T> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtains an entry associated with the specified key
|
* Obtains an entry associated with the specified key
|
||||||
|
*
|
||||||
* @param key The key for the entry
|
* @param key The key for the entry
|
||||||
* @return The entry associated with the key
|
* @return The entry associated with the key
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user