mirror of
https://github.com/plexusorg/Plex.git
synced 2025-06-25 13:24:28 +00:00
Reformat
This commit is contained in:
@ -10,10 +10,11 @@ import dev.plex.config.TomlConfig;
|
||||
import dev.plex.handlers.ListenerHandler;
|
||||
import dev.plex.settings.ServerSettings;
|
||||
import dev.plex.util.PlexLog;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.util.logging.Logger;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Credits for TOML library go to https://github.com/mwanji/toml4j
|
||||
|
@ -9,12 +9,13 @@ import dev.plex.Plex;
|
||||
import dev.plex.command.annotation.CommandParameters;
|
||||
import dev.plex.command.annotation.CommandPermissions;
|
||||
import dev.plex.command.source.RequiredCommandSource;
|
||||
import java.util.Arrays;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public abstract class PlexCommand implements SimpleCommand
|
||||
{
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
package dev.plex.command.annotation;
|
||||
|
||||
import dev.plex.command.source.RequiredCommandSource;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
|
@ -3,12 +3,13 @@ package dev.plex.config;
|
||||
import dev.plex.Plex;
|
||||
import dev.plex.toml.Toml;
|
||||
import dev.plex.toml.TomlWriter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.function.Consumer;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
public class TomlConfig
|
||||
|
@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
|
||||
import dev.plex.listener.PlexListener;
|
||||
import dev.plex.util.PlexLog;
|
||||
import dev.plex.util.ReflectionsUtil;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -7,13 +7,14 @@ import com.velocitypowered.api.proxy.server.ServerPing;
|
||||
import dev.plex.listener.PlexListener;
|
||||
import dev.plex.settings.ServerSettings;
|
||||
import dev.plex.util.RandomUtil;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
|
||||
public class ServerListener extends PlexListener
|
||||
{
|
||||
|
@ -2,10 +2,11 @@ package dev.plex.settings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
public class ServerSettings
|
||||
{
|
||||
|
@ -4,6 +4,7 @@ package dev.plex.toml;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import static dev.plex.toml.ValueWriters.WRITERS;
|
||||
|
||||
public abstract class ArrayValueWriter implements dev.plex.toml.ValueWriter
|
||||
|
@ -1,14 +1,10 @@
|
||||
package dev.plex.toml;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
class ObjectValueWriter implements ValueWriter
|
||||
{
|
||||
|
@ -1,11 +1,6 @@
|
||||
package dev.plex.toml;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Deque;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
class Results
|
||||
|
@ -1,6 +1,7 @@
|
||||
package dev.plex.toml;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import static dev.plex.toml.ValueWriters.WRITERS;
|
||||
|
||||
class TableArrayValueWriter extends ArrayValueWriter
|
||||
|
@ -2,23 +2,12 @@ package dev.plex.toml;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>Provides access to the keys and tables in a TOML data source.</p>
|
||||
*
|
||||
|
@ -1,17 +1,13 @@
|
||||
package dev.plex.toml;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static dev.plex.toml.ValueWriters.WRITERS;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
package dev.plex.toml;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static dev.plex.toml.ArrayValueReader.ARRAY_VALUE_READER;
|
||||
import static dev.plex.toml.BooleanValueReaderWriter.BOOLEAN_VALUE_READER_WRITER;
|
||||
import static dev.plex.toml.DateValueReaderWriter.DATE_VALUE_READER_WRITER;
|
||||
|
@ -1,8 +1,9 @@
|
||||
package dev.plex.util;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class RandomUtil
|
||||
{
|
||||
public static NamedTextColor getRandomColor()
|
||||
|
@ -3,6 +3,7 @@ package dev.plex.util;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.reflect.ClassPath;
|
||||
import dev.plex.Plex;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
@ -6,26 +6,26 @@
|
||||
#############################
|
||||
|
||||
[server]
|
||||
name = "Plexus"
|
||||
name = "Plexus"
|
||||
|
||||
# Placeholders
|
||||
# %mcversion% - The Velocity Version (i.e. 3.1.2-SNAPSHOT)
|
||||
# %servername% - The name provided above
|
||||
# %randomgradient% - Creates a random gradient every ping of two random colors for the whole string
|
||||
# Supports MiniMessage strings, no legacy & and §
|
||||
motd = ["%randomgradient%%servername% - %mcversion%", "Another motd"]
|
||||
colorizeMotd = false
|
||||
# Placeholders
|
||||
# %mcversion% - The Velocity Version (i.e. 3.1.2-SNAPSHOT)
|
||||
# %servername% - The name provided above
|
||||
# %randomgradient% - Creates a random gradient every ping of two random colors for the whole string
|
||||
# Supports MiniMessage strings, no legacy & and §
|
||||
motd = ["%randomgradient%%servername% - %mcversion%", "Another motd"]
|
||||
colorizeMotd = false
|
||||
|
||||
# Enables debug messages
|
||||
debug = false
|
||||
# Enables debug messages
|
||||
debug = false
|
||||
|
||||
# Due to game code only supporting legacy color codes for
|
||||
# player samples and not components, you may only use § or & here
|
||||
# for colors.
|
||||
sample = ["example", "example"]
|
||||
# Due to game code only supporting legacy color codes for
|
||||
# player samples and not components, you may only use § or & here
|
||||
# for colors.
|
||||
sample = ["example", "example"]
|
||||
|
||||
# Adds this amount to the current player count
|
||||
add-player-count = 0
|
||||
# Adds this amount to the current player count
|
||||
add-player-count = 0
|
||||
|
||||
# The max player count will always display as +1 more than the player count
|
||||
plus-one-max-count = true
|
||||
# The max player count will always display as +1 more than the player count
|
||||
plus-one-max-count = true
|
Reference in New Issue
Block a user