mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 09:07:37 +00:00
Better permission validation
This commit is contained in:
parent
0c30f7dc4c
commit
aadac1746e
@ -10,11 +10,10 @@ import dev.plex.config.TomlConfig;
|
|||||||
import dev.plex.handlers.ListenerHandler;
|
import dev.plex.handlers.ListenerHandler;
|
||||||
import dev.plex.settings.ServerSettings;
|
import dev.plex.settings.ServerSettings;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Credits for TOML library go to https://github.com/mwanji/toml4j
|
* Credits for TOML library go to https://github.com/mwanji/toml4j
|
||||||
|
@ -9,13 +9,12 @@ import dev.plex.Plex;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
import java.util.Arrays;
|
||||||
import net.kyori.adventure.audience.Audience;
|
import net.kyori.adventure.audience.Audience;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
public abstract class PlexCommand implements SimpleCommand
|
public abstract class PlexCommand implements SimpleCommand
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package dev.plex.command.annotation;
|
package dev.plex.command.annotation;
|
||||||
|
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
|
@ -3,13 +3,12 @@ package dev.plex.config;
|
|||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.toml.Toml;
|
import dev.plex.toml.Toml;
|
||||||
import dev.plex.toml.TomlWriter;
|
import dev.plex.toml.TomlWriter;
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public class TomlConfig
|
public class TomlConfig
|
||||||
|
@ -4,7 +4,6 @@ import com.google.common.collect.Lists;
|
|||||||
import dev.plex.listener.PlexListener;
|
import dev.plex.listener.PlexListener;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.ReflectionsUtil;
|
import dev.plex.util.ReflectionsUtil;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -7,14 +7,13 @@ import com.velocitypowered.api.proxy.server.ServerPing;
|
|||||||
import dev.plex.listener.PlexListener;
|
import dev.plex.listener.PlexListener;
|
||||||
import dev.plex.settings.ServerSettings;
|
import dev.plex.settings.ServerSettings;
|
||||||
import dev.plex.util.RandomUtil;
|
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.UUID;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
|
|
||||||
public class ServerListener extends PlexListener
|
public class ServerListener extends PlexListener
|
||||||
{
|
{
|
||||||
|
@ -2,11 +2,10 @@ package dev.plex.settings;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public class ServerSettings
|
public class ServerSettings
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,6 @@ package dev.plex.toml;
|
|||||||
import java.lang.reflect.Array;
|
import java.lang.reflect.Array;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import static dev.plex.toml.ValueWriters.WRITERS;
|
import static dev.plex.toml.ValueWriters.WRITERS;
|
||||||
|
|
||||||
public abstract class ArrayValueWriter implements dev.plex.toml.ValueWriter
|
public abstract class ArrayValueWriter implements dev.plex.toml.ValueWriter
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
package dev.plex.toml;
|
package dev.plex.toml;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
class ObjectValueWriter implements ValueWriter
|
class ObjectValueWriter implements ValueWriter
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
package dev.plex.toml;
|
package dev.plex.toml;
|
||||||
|
|
||||||
import java.util.*;
|
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.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
class Results
|
class Results
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package dev.plex.toml;
|
package dev.plex.toml;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import static dev.plex.toml.ValueWriters.WRITERS;
|
import static dev.plex.toml.ValueWriters.WRITERS;
|
||||||
|
|
||||||
class TableArrayValueWriter extends ArrayValueWriter
|
class TableArrayValueWriter extends ArrayValueWriter
|
||||||
|
@ -2,11 +2,22 @@ package dev.plex.toml;
|
|||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import lombok.Getter;
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
import java.io.*;
|
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.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Provides access to the keys and tables in a TOML data source.</p>
|
* <p>Provides access to the keys and tables in a TOML data source.</p>
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
package dev.plex.toml;
|
package dev.plex.toml;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.io.*;
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.io.OutputStreamWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.io.Writer;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
import static dev.plex.toml.ValueWriters.WRITERS;
|
import static dev.plex.toml.ValueWriters.WRITERS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package dev.plex.toml;
|
package dev.plex.toml;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import static dev.plex.toml.ArrayValueReader.ARRAY_VALUE_READER;
|
import static dev.plex.toml.ArrayValueReader.ARRAY_VALUE_READER;
|
||||||
import static dev.plex.toml.BooleanValueReaderWriter.BOOLEAN_VALUE_READER_WRITER;
|
import static dev.plex.toml.BooleanValueReaderWriter.BOOLEAN_VALUE_READER_WRITER;
|
||||||
import static dev.plex.toml.DateValueReaderWriter.DATE_VALUE_READER_WRITER;
|
import static dev.plex.toml.DateValueReaderWriter.DATE_VALUE_READER_WRITER;
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
package dev.plex.util;
|
package dev.plex.util;
|
||||||
|
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
|
||||||
|
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
|
|
||||||
public class RandomUtil
|
public class RandomUtil
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,6 @@ package dev.plex.util;
|
|||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.reflect.ClassPath;
|
import com.google.common.reflect.ClassPath;
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -2,8 +2,6 @@ package dev.plex.cache;
|
|||||||
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.storage.StorageType;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package dev.plex.cache;
|
|||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -5,27 +5,34 @@ import dev.plex.Plex;
|
|||||||
import dev.plex.cache.DataUtils;
|
import dev.plex.cache.DataUtils;
|
||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.exception.*;
|
import dev.plex.command.exception.CommandFailException;
|
||||||
|
import dev.plex.command.exception.ConsoleMustDefinePlayerException;
|
||||||
|
import dev.plex.command.exception.ConsoleOnlyException;
|
||||||
|
import dev.plex.command.exception.PlayerNotBannedException;
|
||||||
|
import dev.plex.command.exception.PlayerNotFoundException;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import net.kyori.adventure.audience.Audience;
|
import net.kyori.adventure.audience.Audience;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.*;
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandMap;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
|
import org.bukkit.command.PluginIdentifiableCommand;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Superclass for all commands
|
* Superclass for all commands
|
||||||
*/
|
*/
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package dev.plex.command.annotation;
|
package dev.plex.command.annotation;
|
||||||
|
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package dev.plex.command.blocking;
|
package dev.plex.command.blocking;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class BlockedCommand
|
public class BlockedCommand
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,9 @@ import dev.plex.util.PlexLog;
|
|||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
import dev.plex.util.redis.MessageUtil;
|
import dev.plex.util.redis.MessageUtil;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -18,10 +21,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.adminchat", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.adminchat", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "adminchat", description = "Talk privately with other admins", usage = "/<command> <message>", aliases = "o,ac,sc,staffchat")
|
@CommandParameters(name = "adminchat", description = "Talk privately with other admins", usage = "/<command> <message>", aliases = "o,ac,sc,staffchat")
|
||||||
public class AdminChatCMD extends PlexCommand
|
public class AdminChatCMD extends PlexCommand
|
||||||
|
@ -4,6 +4,8 @@ import dev.plex.command.PlexCommand;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -12,9 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.adminworld", source = RequiredCommandSource.IN_GAME)
|
@CommandPermissions(permission = "plex.adminworld", source = RequiredCommandSource.IN_GAME)
|
||||||
@CommandParameters(name = "adminworld", aliases = "aw", description = "Teleport to the adminworld")
|
@CommandParameters(name = "adminworld", aliases = "aw", description = "Teleport to the adminworld")
|
||||||
public class AdminworldCMD extends PlexCommand
|
public class AdminworldCMD extends PlexCommand
|
||||||
|
@ -8,6 +8,7 @@ import dev.plex.command.exception.CommandFailException;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.event.GameModeUpdateEvent;
|
import dev.plex.event.GameModeUpdateEvent;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -16,8 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.gamemode.adventure", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.gamemode.adventure", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "adventure", aliases = "gma,egma,eadventure,adventuremode,eadventuremode", description = "Set your own or another player's gamemode to adventure mode")
|
@CommandParameters(name = "adventure", aliases = "gma,egma,eadventure,adventuremode,eadventuremode", description = "Set your own or another player's gamemode to adventure mode")
|
||||||
public class AdventureCMD extends PlexCommand
|
public class AdventureCMD extends PlexCommand
|
||||||
|
@ -13,6 +13,10 @@ import dev.plex.util.BungeeUtil;
|
|||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -21,11 +25,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "ban", usage = "/<command> <player> [reason] [-rb]", aliases = "offlineban,gtfo", description = "Bans a player, offline or online")
|
@CommandParameters(name = "ban", usage = "/<command> <player> [reason] [-rb]", aliases = "offlineban,gtfo", description = "Bans a player, offline or online")
|
||||||
@CommandPermissions(permission = "plex.ban", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.ban", source = RequiredCommandSource.ANY)
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ import dev.plex.command.PlexCommand;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.punishment.Punishment;
|
import dev.plex.punishment.Punishment;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -12,10 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@CommandParameters(name = "banlist", description = "Manages the banlist", usage = "/<command> [purge]")
|
@CommandParameters(name = "banlist", description = "Manages the banlist", usage = "/<command> [purge]")
|
||||||
@CommandPermissions(permission = "plex.banlist")
|
@CommandPermissions(permission = "plex.banlist")
|
||||||
public class BanListCommand extends PlexCommand
|
public class BanListCommand extends PlexCommand
|
||||||
|
@ -10,14 +10,13 @@ import dev.plex.command.source.RequiredCommandSource;
|
|||||||
import dev.plex.meta.PlayerMeta;
|
import dev.plex.meta.PlayerMeta;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.broadcastloginmessage", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.broadcastloginmessage", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "bcastloginmessage", usage = "/<command> <player>", description = "Broadcast your login message (for vanish support)", aliases = "bcastlm")
|
@CommandParameters(name = "bcastloginmessage", usage = "/<command> <player>", description = "Broadcast your login message (for vanish support)", aliases = "bcastlm")
|
||||||
public class BcastLoginMessageCMD extends PlexCommand
|
public class BcastLoginMessageCMD extends PlexCommand
|
||||||
|
@ -5,6 +5,10 @@ import dev.plex.command.annotation.CommandParameters;
|
|||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.listener.impl.BlockListener;
|
import dev.plex.listener.impl.BlockListener;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -12,11 +16,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.blockedit")
|
@CommandPermissions(permission = "plex.blockedit")
|
||||||
@CommandParameters(name = "blockedit", usage = "/<command> [list | purge | all | <player>]", aliases = "bedit", description = "Prevent players from modifying blocks")
|
@CommandParameters(name = "blockedit", usage = "/<command> [list | purge | all | <player>]", aliases = "bedit", description = "Prevent players from modifying blocks")
|
||||||
public class BlockEditCMD extends PlexCommand
|
public class BlockEditCMD extends PlexCommand
|
||||||
|
@ -6,15 +6,14 @@ import dev.plex.command.annotation.CommandParameters;
|
|||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.commandspy", source = RequiredCommandSource.IN_GAME)
|
@CommandPermissions(permission = "plex.commandspy", source = RequiredCommandSource.IN_GAME)
|
||||||
@CommandParameters(name = "commandspy", aliases = "cmdspy", description = "Spy on other player's commands")
|
@CommandParameters(name = "commandspy", aliases = "cmdspy", description = "Spy on other player's commands")
|
||||||
public class CommandSpyCMD extends PlexCommand
|
public class CommandSpyCMD extends PlexCommand
|
||||||
|
@ -5,6 +5,8 @@ import dev.plex.command.annotation.CommandParameters;
|
|||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -12,9 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.consolesay", source = RequiredCommandSource.CONSOLE)
|
@CommandPermissions(permission = "plex.consolesay", source = RequiredCommandSource.CONSOLE)
|
||||||
@CommandParameters(name = "consolesay", usage = "/<command> <message>", description = "Displays a message to everyone", aliases = "csay")
|
@CommandParameters(name = "consolesay", usage = "/<command> <message>", description = "Displays a message to everyone", aliases = "csay")
|
||||||
public class ConsoleSayCMD extends PlexCommand
|
public class ConsoleSayCMD extends PlexCommand
|
||||||
|
@ -8,6 +8,7 @@ import dev.plex.command.exception.CommandFailException;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.event.GameModeUpdateEvent;
|
import dev.plex.event.GameModeUpdateEvent;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -16,8 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.gamemode.creative", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.gamemode.creative", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "creative", aliases = "gmc,egmc,ecreative,eecreative,creativemode,ecreativemode", description = "Set your own or another player's gamemode to creative mode")
|
@CommandParameters(name = "creative", aliases = "gmc,egmc,ecreative,eecreative,creativemode,ecreativemode", description = "Set your own or another player's gamemode to creative mode")
|
||||||
public class CreativeCMD extends PlexCommand
|
public class CreativeCMD extends PlexCommand
|
||||||
|
@ -8,8 +8,10 @@ import dev.plex.menu.impl.MaterialMenu;
|
|||||||
import dev.plex.util.GameRuleUtil;
|
import dev.plex.util.GameRuleUtil;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -18,10 +20,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
@CommandParameters(name = "pdebug", description = "Plex's debug command", usage = "/<command> <aliases <command> | redis-reset <player> | gamerules>")
|
@CommandParameters(name = "pdebug", description = "Plex's debug command", usage = "/<command> <aliases <command> | redis-reset <player> | gamerules>")
|
||||||
@CommandPermissions(permission = "plex.debug")
|
@CommandPermissions(permission = "plex.debug")
|
||||||
public class DebugCMD extends PlexCommand
|
public class DebugCMD extends PlexCommand
|
||||||
|
@ -6,6 +6,12 @@ import dev.plex.command.annotation.CommandPermissions;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -16,8 +22,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.entitywipe", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.entitywipe", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "entitywipe", description = "Remove various server entities that may cause lag, such as dropped items, minecarts, and boats.", usage = "/<command> [entity] [radius]", aliases = "ew,rd")
|
@CommandParameters(name = "entitywipe", description = "Remove various server entities that may cause lag, such as dropped items, minecarts, and boats.", usage = "/<command> [entity] [radius]", aliases = "ew,rd")
|
||||||
public class EntityWipeCMD extends PlexCommand
|
public class EntityWipeCMD extends PlexCommand
|
||||||
|
@ -4,6 +4,8 @@ import dev.plex.command.PlexCommand;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -12,9 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.flatlands", source = RequiredCommandSource.IN_GAME)
|
@CommandPermissions(permission = "plex.flatlands", source = RequiredCommandSource.IN_GAME)
|
||||||
@CommandParameters(name = "flatlands", description = "Teleport to the flatlands")
|
@CommandParameters(name = "flatlands", description = "Teleport to the flatlands")
|
||||||
public class FlatlandsCMD extends PlexCommand
|
public class FlatlandsCMD extends PlexCommand
|
||||||
|
@ -9,16 +9,15 @@ import dev.plex.punishment.Punishment;
|
|||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "freeze", description = "Freeze a player on the server", usage = "/<command> <player>", aliases = "fr")
|
@CommandParameters(name = "freeze", description = "Freeze a player on the server", usage = "/<command> <player>", aliases = "fr")
|
||||||
@CommandPermissions(permission = "plex.freeze")
|
@CommandPermissions(permission = "plex.freeze")
|
||||||
public class FreezeCMD extends PlexCommand
|
public class FreezeCMD extends PlexCommand
|
||||||
|
@ -7,6 +7,9 @@ import dev.plex.command.exception.CommandFailException;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.event.GameModeUpdateEvent;
|
import dev.plex.event.GameModeUpdateEvent;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -15,10 +18,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "gamemode", usage = "/<command> <creative | survival | adventure | default | spectator> [player]", description = "Change your gamemode", aliases = "gm,egamemode,gmt,egmt")
|
@CommandParameters(name = "gamemode", usage = "/<command> <creative | survival | adventure | default | spectator> [player]", description = "Change your gamemode", aliases = "gm,egamemode,gmt,egmt")
|
||||||
@CommandPermissions(permission = "plex.gamemode", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.gamemode", source = RequiredCommandSource.ANY)
|
||||||
public class GamemodeCMD extends PlexCommand
|
public class GamemodeCMD extends PlexCommand
|
||||||
|
@ -13,6 +13,9 @@ import dev.plex.punishment.PunishmentType;
|
|||||||
import dev.plex.util.BungeeUtil;
|
import dev.plex.util.BungeeUtil;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -21,10 +24,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "kick", description = "Kicks a player", usage = "/<command> <player>")
|
@CommandParameters(name = "kick", description = "Kicks a player", usage = "/<command> <player>")
|
||||||
@CommandPermissions(permission = "plex.kick", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.kick", source = RequiredCommandSource.ANY)
|
||||||
public class KickCMD extends PlexCommand
|
public class KickCMD extends PlexCommand
|
||||||
|
@ -2,11 +2,13 @@ package dev.plex.command.impl;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import dev.plex.command.PlexCommand;
|
import dev.plex.command.PlexCommand;
|
||||||
import dev.plex.util.PlexUtils;
|
|
||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.hook.VaultHook;
|
import dev.plex.hook.VaultHook;
|
||||||
import dev.plex.meta.PlayerMeta;
|
import dev.plex.meta.PlayerMeta;
|
||||||
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -15,9 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "list", description = "Show a list of all online players", usage = "/<command> [-d | -v]", aliases = "lsit,who,playerlist,online")
|
@CommandParameters(name = "list", description = "Show a list of all online players", usage = "/<command> [-d | -v]", aliases = "lsit,who,playerlist,online")
|
||||||
@CommandPermissions(permission = "plex.list")
|
@CommandPermissions(permission = "plex.list")
|
||||||
public class ListCMD extends PlexCommand
|
public class ListCMD extends PlexCommand
|
||||||
|
@ -4,16 +4,14 @@ import dev.plex.command.PlexCommand;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "localspawn", description = "Teleport to the spawnpoint of the world you are in")
|
@CommandParameters(name = "localspawn", description = "Teleport to the spawnpoint of the world you are in")
|
||||||
@CommandPermissions(permission = "plex.localspawn", source = RequiredCommandSource.IN_GAME)
|
@CommandPermissions(permission = "plex.localspawn", source = RequiredCommandSource.IN_GAME)
|
||||||
public class LocalSpawnCMD extends PlexCommand
|
public class LocalSpawnCMD extends PlexCommand
|
||||||
|
@ -6,14 +6,13 @@ import dev.plex.command.annotation.CommandParameters;
|
|||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "lockup", description = "Lockup a player on the server", usage = "/<command> <player>")
|
@CommandParameters(name = "lockup", description = "Lockup a player on the server", usage = "/<command> <player>")
|
||||||
@CommandPermissions(permission = "plex.lockup")
|
@CommandPermissions(permission = "plex.lockup")
|
||||||
public class LockupCMD extends PlexCommand
|
public class LockupCMD extends PlexCommand
|
||||||
|
@ -4,7 +4,8 @@ import dev.plex.command.PlexCommand;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -13,9 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.masterbuilderworld", source = RequiredCommandSource.IN_GAME)
|
@CommandPermissions(permission = "plex.masterbuilderworld", source = RequiredCommandSource.IN_GAME)
|
||||||
@CommandParameters(name = "masterbuilderworld", aliases = "mbw", description = "Teleport to the Master Builder world")
|
@CommandParameters(name = "masterbuilderworld", aliases = "mbw", description = "Teleport to the Master Builder world")
|
||||||
public class MasterbuilderworldCMD extends PlexCommand
|
public class MasterbuilderworldCMD extends PlexCommand
|
||||||
|
@ -5,6 +5,9 @@ import dev.plex.command.annotation.CommandParameters;
|
|||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
@ -14,10 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "moblimit", usage = "/<command> [on | off | setmax <limit>]", aliases = "entitylimit", description = "Manages the mob limit per chunk.")
|
@CommandParameters(name = "moblimit", usage = "/<command> [on | off | setmax <limit>]", aliases = "entitylimit", description = "Manages the mob limit per chunk.")
|
||||||
@CommandPermissions(permission = "plex.moblimit", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.moblimit", source = RequiredCommandSource.ANY)
|
||||||
public class MobLimitCMD extends PlexCommand
|
public class MobLimitCMD extends PlexCommand
|
||||||
|
@ -6,6 +6,10 @@ import dev.plex.command.annotation.CommandPermissions;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.text.WordUtils;
|
import org.apache.commons.lang3.text.WordUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -18,11 +22,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.mobpurge", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.mobpurge", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "mobpurge", description = "Purge all mobs.", usage = "/<command> [mob]", aliases = "mp")
|
@CommandParameters(name = "mobpurge", description = "Purge all mobs.", usage = "/<command> [mob]", aliases = "mp")
|
||||||
public class MobPurgeCMD extends PlexCommand
|
public class MobPurgeCMD extends PlexCommand
|
||||||
|
@ -9,16 +9,15 @@ import dev.plex.punishment.Punishment;
|
|||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "mute", description = "Mute a player on the server", usage = "/<command> <player>", aliases = "stfu")
|
@CommandParameters(name = "mute", description = "Mute a player on the server", usage = "/<command> <player>", aliases = "stfu")
|
||||||
@CommandPermissions(permission = "plex.mute")
|
@CommandPermissions(permission = "plex.mute")
|
||||||
public class MuteCMD extends PlexCommand
|
public class MuteCMD extends PlexCommand
|
||||||
|
@ -8,21 +8,19 @@ import dev.plex.player.PlexPlayer;
|
|||||||
import dev.plex.punishment.extra.Note;
|
import dev.plex.punishment.extra.Note;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
import net.kyori.adventure.text.Component;
|
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@CommandParameters(name = "notes", description = "Manage notes for a player", usage = "/<command> <player> <list | add <note> | remove <id> | clear>")
|
@CommandParameters(name = "notes", description = "Manage notes for a player", usage = "/<command> <player> <list | add <note> | remove <id> | clear>")
|
||||||
@CommandPermissions(permission = "plex.notes")
|
@CommandPermissions(permission = "plex.notes")
|
||||||
|
@ -10,6 +10,10 @@ import dev.plex.module.PlexModuleFile;
|
|||||||
import dev.plex.util.BuildInfo;
|
import dev.plex.util.BuildInfo;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -19,11 +23,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@CommandPermissions(source = RequiredCommandSource.ANY)
|
@CommandPermissions(source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "plex", usage = "/<command> [reload | redis | modules [reload]]", description = "Show information about Plex or reload it")
|
@CommandParameters(name = "plex", usage = "/<command> [reload | redis | modules [reload]]", description = "Show information about Plex or reload it")
|
||||||
public class PlexCMD extends PlexCommand
|
public class PlexCMD extends PlexCommand
|
||||||
|
@ -11,6 +11,7 @@ import dev.plex.menu.impl.PunishedPlayerMenu;
|
|||||||
import dev.plex.menu.impl.PunishmentMenu;
|
import dev.plex.menu.impl.PunishmentMenu;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
@ -19,8 +20,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "punishments", usage = "/<command> [player]", description = "Opens the Punishments GUI", aliases = "punishlist,punishes")
|
@CommandParameters(name = "punishments", usage = "/<command> [player]", description = "Opens the Punishments GUI", aliases = "punishlist,punishes")
|
||||||
@CommandPermissions(permission = "plex.punishments", source = RequiredCommandSource.IN_GAME)
|
@CommandPermissions(permission = "plex.punishments", source = RequiredCommandSource.IN_GAME)
|
||||||
public class PunishmentsCMD extends PlexCommand
|
public class PunishmentsCMD extends PlexCommand
|
||||||
|
@ -4,8 +4,9 @@ import dev.plex.command.PlexCommand;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -13,9 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.rawsay", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.rawsay", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "rawsay", usage = "/<command> <message>", description = "Displays a raw message to everyone")
|
@CommandParameters(name = "rawsay", usage = "/<command> <message>", description = "Displays a raw message to everyone")
|
||||||
public class RawSayCMD extends PlexCommand
|
public class RawSayCMD extends PlexCommand
|
||||||
|
@ -8,14 +8,13 @@ import dev.plex.command.annotation.CommandPermissions;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.removeloginmessage", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.removeloginmessage", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "removeloginmessage", usage = "/<command> [-o <player>]", description = "Remove your own (or someone else's) login message", aliases = "rlm,removeloginmsg")
|
@CommandParameters(name = "removeloginmessage", usage = "/<command> [-o <player>]", description = "Remove your own (or someone else's) login message", aliases = "rlm,removeloginmsg")
|
||||||
public class RemoveLoginMessageCMD extends PlexCommand
|
public class RemoveLoginMessageCMD extends PlexCommand
|
||||||
|
@ -5,6 +5,8 @@ import dev.plex.command.annotation.CommandParameters;
|
|||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -12,9 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.say", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.say", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "say", usage = "/<command> <message>", description = "Displays a message to everyone")
|
@CommandParameters(name = "say", usage = "/<command> <message>", description = "Displays a message to everyone")
|
||||||
public class SayCMD extends PlexCommand
|
public class SayCMD extends PlexCommand
|
||||||
|
@ -10,6 +10,7 @@ import dev.plex.command.source.RequiredCommandSource;
|
|||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -18,8 +19,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.setloginmessage", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.setloginmessage", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "setloginmessage", usage = "/<command> [-o <player>] <message>", description = "Sets your (or someone else's) login message", aliases = "slm,setloginmsg")
|
@CommandParameters(name = "setloginmessage", usage = "/<command> [-o <player>] <message>", description = "Sets your (or someone else's) login message", aliases = "slm,setloginmsg")
|
||||||
public class SetLoginMessageCMD extends PlexCommand
|
public class SetLoginMessageCMD extends PlexCommand
|
||||||
|
@ -9,8 +9,11 @@ import dev.plex.punishment.Punishment;
|
|||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
|
||||||
import net.kyori.adventure.title.Title;
|
import net.kyori.adventure.title.Title;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -22,11 +25,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.smite", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.smite", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "smite", usage = "/<command> <player> [reason] [-ci | -q]", description = "Someone being a little bitch? Smite them down...")
|
@CommandParameters(name = "smite", usage = "/<command> <player> [reason] [-ci | -q]", description = "Someone being a little bitch? Smite them down...")
|
||||||
public class SmiteCMD extends PlexCommand
|
public class SmiteCMD extends PlexCommand
|
||||||
|
@ -7,8 +7,8 @@ import dev.plex.command.annotation.CommandPermissions;
|
|||||||
import dev.plex.command.exception.CommandFailException;
|
import dev.plex.command.exception.CommandFailException;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.event.GameModeUpdateEvent;
|
import dev.plex.event.GameModeUpdateEvent;
|
||||||
|
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -17,8 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.gamemode.spectator", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.gamemode.spectator", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "spectator", aliases = "gmsp,egmsp,spec", description = "Set your own or another player's gamemode to spectator mode")
|
@CommandParameters(name = "spectator", aliases = "gmsp,egmsp,spec", description = "Set your own or another player's gamemode to spectator mode")
|
||||||
public class SpectatorCMD extends PlexCommand
|
public class SpectatorCMD extends PlexCommand
|
||||||
|
@ -7,8 +7,8 @@ import dev.plex.command.annotation.CommandPermissions;
|
|||||||
import dev.plex.command.exception.CommandFailException;
|
import dev.plex.command.exception.CommandFailException;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.event.GameModeUpdateEvent;
|
import dev.plex.event.GameModeUpdateEvent;
|
||||||
|
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -17,8 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.gamemode.survival", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.gamemode.survival", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "survival", aliases = "gms,egms,esurvival,survivalmode,esurvivalmode", description = "Set your own or another player's gamemode to survival mode")
|
@CommandParameters(name = "survival", aliases = "gms,egms,esurvival,survivalmode,esurvivalmode", description = "Set your own or another player's gamemode to survival mode")
|
||||||
public class SurvivalCMD extends PlexCommand
|
public class SurvivalCMD extends PlexCommand
|
||||||
|
@ -7,7 +7,9 @@ import dev.plex.command.annotation.CommandPermissions;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||||
@ -18,10 +20,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.tag", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.tag", source = RequiredCommandSource.ANY)
|
||||||
@CommandParameters(name = "tag", aliases = "prefix", description = "Set or clear your prefix", usage = "/<command> <set <prefix> | clear <player>>")
|
@CommandParameters(name = "tag", aliases = "prefix", description = "Set or clear your prefix", usage = "/<command> <set <prefix> | clear <player>>")
|
||||||
public class TagCMD extends PlexCommand
|
public class TagCMD extends PlexCommand
|
||||||
|
@ -14,6 +14,8 @@ import dev.plex.util.BungeeUtil;
|
|||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -22,9 +24,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "tempban", usage = "/<command> <player> <time> [reason] [-rb]", description = "Temporarily ban a player")
|
@CommandParameters(name = "tempban", usage = "/<command> <player> <time> [reason] [-rb]", description = "Temporarily ban a player")
|
||||||
@CommandPermissions(permission = "plex.tempban", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.tempban", source = RequiredCommandSource.ANY)
|
||||||
|
|
||||||
|
@ -8,17 +8,16 @@ import dev.plex.player.PlexPlayer;
|
|||||||
import dev.plex.punishment.Punishment;
|
import dev.plex.punishment.Punishment;
|
||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.TimeUtils; // Import your TimeUtils
|
import dev.plex.util.TimeUtils;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "tempmute", description = "Temporarily mute a player on the server",
|
@CommandParameters(name = "tempmute", description = "Temporarily mute a player on the server",
|
||||||
usage = "/<command> <player> <time> [reason]", aliases = "tmute")
|
usage = "/<command> <player> <time> [reason]", aliases = "tmute")
|
||||||
@CommandPermissions(permission = "plex.tempmute")
|
@CommandPermissions(permission = "plex.tempmute")
|
||||||
|
@ -7,6 +7,7 @@ import dev.plex.command.annotation.CommandPermissions;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.menu.impl.ToggleMenu;
|
import dev.plex.menu.impl.ToggleMenu;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -14,8 +15,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "toggle", description = "Allows toggling various server aspects through a GUI", aliases = "toggles")
|
@CommandParameters(name = "toggle", description = "Allows toggling various server aspects through a GUI", aliases = "toggles")
|
||||||
@CommandPermissions(permission = "plex.toggle", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.toggle", source = RequiredCommandSource.ANY)
|
||||||
public class ToggleCMD extends PlexCommand
|
public class ToggleCMD extends PlexCommand
|
||||||
|
@ -10,14 +10,13 @@ import dev.plex.command.exception.PlayerNotFoundException;
|
|||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandParameters(name = "unban", usage = "/<command> <player>", description = "Unbans a player, offline or online")
|
@CommandParameters(name = "unban", usage = "/<command> <player>", description = "Unbans a player, offline or online")
|
||||||
@CommandPermissions(permission = "plex.ban", source = RequiredCommandSource.ANY)
|
@CommandPermissions(permission = "plex.ban", source = RequiredCommandSource.ANY)
|
||||||
|
|
||||||
|
@ -10,14 +10,13 @@ import dev.plex.command.exception.PlayerNotFoundException;
|
|||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.unfreeze")
|
@CommandPermissions(permission = "plex.unfreeze")
|
||||||
@CommandParameters(name = "unfreeze", description = "Unfreeze a player", usage = "/<command> <player>")
|
@CommandParameters(name = "unfreeze", description = "Unfreeze a player", usage = "/<command> <player>")
|
||||||
public class UnfreezeCMD extends PlexCommand
|
public class UnfreezeCMD extends PlexCommand
|
||||||
|
@ -10,14 +10,13 @@ import dev.plex.command.exception.PlayerNotFoundException;
|
|||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.unmute")
|
@CommandPermissions(permission = "plex.unmute")
|
||||||
@CommandParameters(name = "unmute", description = "Unmute a player", usage = "/<command> <player>")
|
@CommandParameters(name = "unmute", description = "Unmute a player", usage = "/<command> <player>")
|
||||||
public class UnmuteCMD extends PlexCommand
|
public class UnmuteCMD extends PlexCommand
|
||||||
|
@ -4,6 +4,9 @@ import com.google.common.collect.ImmutableList;
|
|||||||
import dev.plex.command.PlexCommand;
|
import dev.plex.command.PlexCommand;
|
||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.JoinConfiguration;
|
import net.kyori.adventure.text.JoinConfiguration;
|
||||||
import net.kyori.adventure.text.TextComponent;
|
import net.kyori.adventure.text.TextComponent;
|
||||||
@ -14,10 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Collections;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.whohas")
|
@CommandPermissions(permission = "plex.whohas")
|
||||||
@CommandParameters(name = "whohas", description = "Returns a list of players with a specific item in their inventory.", usage = "/<command> <material>", aliases = "wh")
|
@CommandParameters(name = "whohas", description = "Returns a list of players with a specific item in their inventory.", usage = "/<command> <material>", aliases = "wh")
|
||||||
public class WhoHasCMD extends PlexCommand
|
public class WhoHasCMD extends PlexCommand
|
||||||
|
@ -6,6 +6,9 @@ import dev.plex.command.PlexCommand;
|
|||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
import dev.plex.command.source.RequiredCommandSource;
|
import dev.plex.command.source.RequiredCommandSource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -14,10 +17,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
@CommandPermissions(permission = "plex.world", source = RequiredCommandSource.IN_GAME)
|
@CommandPermissions(permission = "plex.world", source = RequiredCommandSource.IN_GAME)
|
||||||
@CommandParameters(name = "world", description = "Teleport to a world.", usage = "/<command> <world>")
|
@CommandParameters(name = "world", description = "Teleport to a world.", usage = "/<command> <world>")
|
||||||
public class WorldCMD extends PlexCommand
|
public class WorldCMD extends PlexCommand
|
||||||
|
@ -2,11 +2,10 @@ package dev.plex.config;
|
|||||||
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a custom Config object
|
* Creates a custom Config object
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package dev.plex.config;
|
package dev.plex.config;
|
||||||
|
|
||||||
import dev.plex.module.PlexModule;
|
import dev.plex.module.PlexModule;
|
||||||
import org.bukkit.configuration.InvalidConfigurationException;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
import org.bukkit.configuration.InvalidConfigurationException;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a custom Config object
|
* Creates a custom Config object
|
||||||
|
@ -1,21 +1,10 @@
|
|||||||
package dev.plex.hook;
|
package dev.plex.hook;
|
||||||
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.player.PlexPlayer;
|
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
|
||||||
import net.coreprotect.CoreProtect;
|
import net.coreprotect.CoreProtect;
|
||||||
import net.coreprotect.CoreProtectAPI;
|
import net.coreprotect.CoreProtectAPI;
|
||||||
import net.kyori.adventure.text.Component;
|
|
||||||
import net.milkbowl.vault.chat.Chat;
|
|
||||||
import net.milkbowl.vault.permission.Permission;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class CoreProtectHook
|
public class CoreProtectHook
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,7 @@ import dev.plex.player.PlexPlayer;
|
|||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
|
import java.util.UUID;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.milkbowl.vault.chat.Chat;
|
import net.milkbowl.vault.chat.Chat;
|
||||||
import net.milkbowl.vault.permission.Permission;
|
import net.milkbowl.vault.permission.Permission;
|
||||||
@ -11,8 +12,6 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class VaultHook
|
public class VaultHook
|
||||||
{
|
{
|
||||||
private static Chat CHAT;
|
private static Chat CHAT;
|
||||||
|
@ -2,6 +2,9 @@ package dev.plex.listener.impl;
|
|||||||
|
|
||||||
import dev.plex.listener.PlexListener;
|
import dev.plex.listener.PlexListener;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@ -11,10 +14,6 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class BlockListener extends PlexListener
|
public class BlockListener extends PlexListener
|
||||||
{
|
{
|
||||||
private static final List<Material> blockedBlocks = new ArrayList<>();
|
private static final List<Material> blockedBlocks = new ArrayList<>();
|
||||||
|
@ -2,6 +2,7 @@ package dev.plex.menu;
|
|||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
|
import java.util.Map;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
@ -11,13 +12,6 @@ import org.bukkit.inventory.Inventory;
|
|||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Taah
|
|
||||||
* @since 6:49 AM [02-09-2023]
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Accessors(fluent = true)
|
@Accessors(fluent = true)
|
||||||
public abstract class AbstractMenu
|
public abstract class AbstractMenu
|
||||||
|
@ -3,16 +3,11 @@ package dev.plex.menu.impl;
|
|||||||
import dev.plex.menu.AbstractMenu;
|
import dev.plex.menu.AbstractMenu;
|
||||||
import dev.plex.menu.pagination.PageableMenu;
|
import dev.plex.menu.pagination.PageableMenu;
|
||||||
import dev.plex.util.item.ItemBuilder;
|
import dev.plex.util.item.ItemBuilder;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Taah
|
|
||||||
* @since 8:44 AM [02-09-2023]
|
|
||||||
*/
|
|
||||||
public class MaterialMenu extends PageableMenu<Material>
|
public class MaterialMenu extends PageableMenu<Material>
|
||||||
{
|
{
|
||||||
public MaterialMenu()
|
public MaterialMenu()
|
||||||
|
@ -7,11 +7,10 @@ import dev.plex.player.PlexPlayer;
|
|||||||
import dev.plex.punishment.Punishment;
|
import dev.plex.punishment.Punishment;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
import dev.plex.util.item.ItemBuilder;
|
import dev.plex.util.item.ItemBuilder;
|
||||||
|
import java.util.List;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class PunishedPlayerMenu extends PageableMenu<Punishment>
|
public class PunishedPlayerMenu extends PageableMenu<Punishment>
|
||||||
{
|
{
|
||||||
private final PlexPlayer punishedPlayer;
|
private final PlexPlayer punishedPlayer;
|
||||||
|
@ -6,6 +6,7 @@ import dev.plex.menu.pagination.PageableMenu;
|
|||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.item.ItemBuilder;
|
import dev.plex.util.item.ItemBuilder;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -15,12 +16,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.SkullMeta;
|
import org.bukkit.inventory.meta.SkullMeta;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Taah
|
|
||||||
* @since 9:27 AM [02-09-2023]
|
|
||||||
*/
|
|
||||||
public class PunishmentMenu extends PageableMenu<Player>
|
public class PunishmentMenu extends PageableMenu<Player>
|
||||||
{
|
{
|
||||||
public PunishmentMenu()
|
public PunishmentMenu()
|
||||||
|
@ -3,6 +3,7 @@ package dev.plex.menu.impl;
|
|||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.menu.AbstractMenu;
|
import dev.plex.menu.AbstractMenu;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import java.util.List;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
@ -11,8 +12,6 @@ import org.bukkit.inventory.ItemFlag;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ToggleMenu extends AbstractMenu
|
public class ToggleMenu extends AbstractMenu
|
||||||
{
|
{
|
||||||
private final Plex plugin;
|
private final Plex plugin;
|
||||||
@ -93,6 +92,10 @@ public class ToggleMenu extends AbstractMenu
|
|||||||
@Override
|
@Override
|
||||||
public boolean onClick(InventoryView view, Inventory inventory, Player player, ItemStack clicked)
|
public boolean onClick(InventoryView view, Inventory inventory, Player player, ItemStack clicked)
|
||||||
{
|
{
|
||||||
|
if (!player.hasPermission("plex.toggle"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (clicked.getType() == Material.TNT)
|
if (clicked.getType() == Material.TNT)
|
||||||
{
|
{
|
||||||
plugin.toggles.set("explosions", !plugin.toggles.getBoolean("explosions"));
|
plugin.toggles.set("explosions", !plugin.toggles.getBoolean("explosions"));
|
||||||
|
@ -6,6 +6,8 @@ import dev.plex.util.PlexUtils;
|
|||||||
import dev.plex.util.function.ConditionalQuadConsumer;
|
import dev.plex.util.function.ConditionalQuadConsumer;
|
||||||
import dev.plex.util.item.ItemBuilder;
|
import dev.plex.util.item.ItemBuilder;
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@ -19,14 +21,6 @@ import org.bukkit.inventory.Inventory;
|
|||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Taah
|
|
||||||
* @since 8:04 AM [02-09-2023]
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Accessors(fluent = true)
|
@Accessors(fluent = true)
|
||||||
|
@ -7,7 +7,6 @@ import dev.plex.util.PlexUtils;
|
|||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -4,10 +4,6 @@ import com.google.common.collect.Lists;
|
|||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.module.exception.ModuleLoadException;
|
import dev.plex.module.exception.ModuleLoadException;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import lombok.Getter;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
@ -18,6 +14,9 @@ import java.net.URLClassLoader;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public class ModuleManager
|
public class ModuleManager
|
||||||
|
@ -5,14 +5,6 @@ import dev.plex.Plex;
|
|||||||
import dev.plex.command.PlexCommand;
|
import dev.plex.command.PlexCommand;
|
||||||
import dev.plex.listener.PlexListener;
|
import dev.plex.listener.PlexListener;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import lombok.AccessLevel;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -21,6 +13,13 @@ import java.net.URLConnection;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter(AccessLevel.MODULE)
|
@Setter(AccessLevel.MODULE)
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
package dev.plex.module;
|
package dev.plex.module;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class PlexModuleFile
|
public class PlexModuleFile
|
||||||
|
@ -11,19 +11,17 @@ import dev.plex.storage.annotation.PrimaryKey;
|
|||||||
import dev.plex.storage.annotation.SQLTable;
|
import dev.plex.storage.annotation.SQLTable;
|
||||||
import dev.plex.storage.annotation.VarcharLimit;
|
import dev.plex.storage.annotation.VarcharLimit;
|
||||||
import dev.plex.util.adapter.ZonedDateTimeAdapter;
|
import dev.plex.util.adapter.ZonedDateTimeAdapter;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.permissions.PermissionAttachment;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@SQLTable("players")
|
@SQLTable("players")
|
||||||
|
@ -3,7 +3,6 @@ package dev.plex.punishment;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.reflect.TypeToken;
|
import com.google.common.reflect.TypeToken;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.PlexBase;
|
import dev.plex.PlexBase;
|
||||||
import dev.plex.cache.DataUtils;
|
import dev.plex.cache.DataUtils;
|
||||||
@ -21,11 +20,6 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
import dev.plex.util.adapter.ZonedDateTimeAdapter;
|
|
||||||
import it.unimi.dsi.fastutil.Pair;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
|
@ -6,7 +6,6 @@ import dev.plex.Plex;
|
|||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.storage.StorageType;
|
import dev.plex.storage.StorageType;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
@ -4,7 +4,6 @@ import com.google.common.collect.Lists;
|
|||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import dev.plex.punishment.extra.Note;
|
import dev.plex.punishment.extra.Note;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
@ -6,7 +6,6 @@ import dev.plex.punishment.Punishment;
|
|||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.TimeUtils;
|
import dev.plex.util.TimeUtils;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package dev.plex.util;
|
package dev.plex.util;
|
||||||
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
public class BuildInfo
|
public class BuildInfo
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package dev.plex.util;
|
package dev.plex.util;
|
||||||
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
|
import java.util.Locale;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.bukkit.GameRule;
|
import org.bukkit.GameRule;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public class GameRuleUtil
|
public class GameRuleUtil
|
||||||
{
|
{
|
||||||
public static <T> void commitGlobalGameRules(World world)
|
public static <T> void commitGlobalGameRules(World world)
|
||||||
|
@ -7,23 +7,6 @@ import dev.plex.PlexBase;
|
|||||||
import dev.plex.listener.impl.ChatListener;
|
import dev.plex.listener.impl.ChatListener;
|
||||||
import dev.plex.storage.StorageType;
|
import dev.plex.storage.StorageType;
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
import net.kyori.adventure.text.Component;
|
|
||||||
import net.kyori.adventure.text.TextComponent;
|
|
||||||
import net.kyori.adventure.text.format.TextDecoration;
|
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
|
||||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
|
||||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Chunk;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Particle;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.PluginCommandYamlParser;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.time.Month;
|
import java.time.Month;
|
||||||
@ -35,6 +18,20 @@ import java.util.Stack;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.kyori.adventure.text.TextComponent;
|
||||||
|
import net.kyori.adventure.text.format.TextDecoration;
|
||||||
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
|
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||||
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||||
|
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Particle;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.PluginCommandYamlParser;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
public class PlexUtils implements PlexBase
|
public class PlexUtils implements PlexBase
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
package dev.plex.util;
|
package dev.plex.util;
|
||||||
|
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
|
||||||
|
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
|
|
||||||
public class RandomUtil
|
public class RandomUtil
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,6 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import com.google.common.reflect.ClassPath;
|
import com.google.common.reflect.ClassPath;
|
||||||
import com.google.common.reflect.TypeToken;
|
import com.google.common.reflect.TypeToken;
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.ParameterizedType;
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package dev.plex.util;
|
package dev.plex.util;
|
||||||
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
@ -12,6 +10,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
|
|
||||||
public class TimeUtils
|
public class TimeUtils
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,16 @@ import com.google.gson.Gson;
|
|||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.JsonSyntaxException;
|
import com.google.gson.JsonSyntaxException;
|
||||||
import dev.plex.PlexBase;
|
import dev.plex.PlexBase;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
@ -18,17 +28,6 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
|
||||||
|
|
||||||
public class UpdateChecker implements PlexBase
|
public class UpdateChecker implements PlexBase
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
package dev.plex.util.adapter;
|
package dev.plex.util.adapter;
|
||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
import com.google.gson.JsonPrimitive;
|
||||||
|
import com.google.gson.JsonSerializationContext;
|
||||||
|
import com.google.gson.JsonSerializer;
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
package dev.plex.util.function;
|
package dev.plex.util.function;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Taah
|
|
||||||
* @since 8:40 AM [02-09-2023]
|
|
||||||
*/
|
|
||||||
public interface ConditionalQuadConsumer<K, V, S, T>
|
public interface ConditionalQuadConsumer<K, V, S, T>
|
||||||
{
|
{
|
||||||
boolean accept(K k, V v, S s, T t);
|
boolean accept(K k, V v, S s, T t);
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
package dev.plex.util.function;
|
package dev.plex.util.function;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Taah
|
|
||||||
* @since 8:40 AM [02-09-2023]
|
|
||||||
*/
|
|
||||||
public interface QuadConsumer<K, V, S, T>
|
public interface QuadConsumer<K, V, S, T>
|
||||||
{
|
{
|
||||||
void accept(K k, V v, S s, T t);
|
void accept(K k, V v, S s, T t);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.plex.util.item;
|
package dev.plex.util.item;
|
||||||
|
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
|
import java.util.Arrays;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -13,8 +14,6 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
import org.bukkit.inventory.meta.SkullMeta;
|
import org.bukkit.inventory.meta.SkullMeta;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
public class ItemBuilder
|
public class ItemBuilder
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.plex.util.minimessage;
|
package dev.plex.util.minimessage;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import java.util.List;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.Context;
|
import net.kyori.adventure.text.minimessage.Context;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
@ -11,8 +12,6 @@ import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class SafeMiniMessage
|
public class SafeMiniMessage
|
||||||
{
|
{
|
||||||
public static final MiniMessage MINI_MESSAGE = MiniMessage.builder().tags(new SafeMiniMessageTagResolver()).build();
|
public static final MiniMessage MINI_MESSAGE = MiniMessage.builder().tags(new SafeMiniMessageTagResolver()).build();
|
||||||
|
@ -7,6 +7,7 @@ import dev.plex.hook.VaultHook;
|
|||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.PlexUtils;
|
import dev.plex.util.PlexUtils;
|
||||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||||
|
import java.util.UUID;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -14,10 +15,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import redis.clients.jedis.JedisPubSub;
|
import redis.clients.jedis.JedisPubSub;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import static dev.plex.PlexBase.plugin;
|
|
||||||
import static dev.plex.util.PlexUtils.messageComponent;
|
import static dev.plex.util.PlexUtils.messageComponent;
|
||||||
|
|
||||||
public class MessageUtil
|
public class MessageUtil
|
||||||
|
@ -4,18 +4,25 @@ import com.google.common.collect.ImmutableList;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import dev.plex.punishment.PunishmentType;
|
import dev.plex.punishment.PunishmentType;
|
||||||
import dev.plex.storage.annotation.*;
|
import dev.plex.storage.annotation.MapObjectList;
|
||||||
|
import dev.plex.storage.annotation.NoLimit;
|
||||||
|
import dev.plex.storage.annotation.PrimaryKey;
|
||||||
|
import dev.plex.storage.annotation.SQLTable;
|
||||||
|
import dev.plex.storage.annotation.VarcharLimit;
|
||||||
import dev.plex.util.PlexLog;
|
import dev.plex.util.PlexLog;
|
||||||
import dev.plex.util.ReflectionsUtil;
|
import dev.plex.util.ReflectionsUtil;
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Taah
|
* @author Taah
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
package dev.plex.util.sql;
|
package dev.plex.util.sql;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.Map;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Taah
|
* @author Taah
|
||||||
* @since 5:30 AM [26-08-2023]
|
* @since 5:30 AM [26-08-2023]
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package dev.plex.world;
|
package dev.plex.world;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.generator.BlockPopulator;
|
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.generator.BlockPopulator;
|
||||||
|
|
||||||
public class BlockMapChunkGenerator extends FlatChunkGenerator
|
public class BlockMapChunkGenerator extends FlatChunkGenerator
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package dev.plex.world;
|
package dev.plex.world;
|
||||||
|
|
||||||
import dev.plex.Plex;
|
import dev.plex.Plex;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.generator.BlockPopulator;
|
import org.bukkit.generator.BlockPopulator;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
|
|
||||||
public class ConfigurationChunkGenerator extends BlockMapChunkGenerator
|
public class ConfigurationChunkGenerator extends BlockMapChunkGenerator
|
||||||
{
|
{
|
||||||
private static final Plex plugin = Plex.get();
|
private static final Plex plugin = Plex.get();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user