Plex v1.2

This commit is contained in:
Telesphoreo 2022-08-25 20:28:13 -05:00
parent 2e077c40d2
commit 22199be335
No known key found for this signature in database
GPG Key ID: B5CDDEBA526C0130
11 changed files with 17 additions and 27 deletions

View File

@ -1,5 +1,5 @@
For those who are wanting to contribute, we fully encourage doing so. There are a few rules we require following when
contributing however.
contributing.
## Steps
@ -17,7 +17,8 @@ contributing however.
- Keep in mind that it **must** be formatted correctly. If you are using IntelliJ, there is a `codeStyle.xml` file that
tells IntelliJ how to format your code. Check this link for information on how to use the
file: https://www.jetbrains.com/help/idea/configuring-code-style.html#import-export-schemes
- If you are not using IntelliJ, that is fine. We use Allman style so please format your code accordingly.
- If you are not using IntelliJ, that is fine. We use the Plexus Code Style (which is almost the same as Allman) so
please format your code accordingly.
6. Push your changes to your new branch and make a PR based off of that branch.

View File

@ -5,7 +5,7 @@ plugins {
}
group = "dev.plex"
version = "1.2-SNAPSHOT"
version = "1.2"
description = "Plex"
subprojects {

View File

@ -9,20 +9,20 @@ dependencies {
library "commons-io:commons-io:2.11.0"
library "dev.morphia.morphia:morphia-core:2.2.7"
library "redis.clients:jedis:4.2.3"
library "org.mariadb.jdbc:mariadb-java-client:3.0.5"
library "org.mariadb.jdbc:mariadb-java-client:3.0.6"
library "com.zaxxer:HikariCP:5.0.1"
library "org.apache.httpcomponents:httpclient:4.5.13"
library "org.apache.httpcomponents.client5:httpclient5:5.2-beta1"
library "org.apache.commons:commons-lang3:3.12.0"
library "org.apache.maven.resolver:maven-resolver-api:1.8.0"
library "org.apache.maven.resolver:maven-resolver-impl:1.8.0"
library "org.apache.maven.resolver:maven-resolver-connector-basic:1.8.0"
library "org.apache.maven.resolver:maven-resolver-transport-http:1.8.0"
library "org.apache.maven.resolver:maven-resolver-api:1.8.2"
library "org.apache.maven.resolver:maven-resolver-impl:1.8.2"
library "org.apache.maven.resolver:maven-resolver-connector-basic:1.8.2"
library "org.apache.maven.resolver:maven-resolver-transport-http:1.8.2"
library "org.apache.maven:maven-resolver-provider:3.8.5"
library "org.eclipse.jetty:jetty-server:11.0.11"
library "org.eclipse.jetty:jetty-servlet:11.0.11"
library "org.eclipse.jetty:jetty-proxy:11.0.11"
library "com.google.code.gson:gson:2.9.0"
compileOnly "io.papermc.paper:paper-api:1.19.1-R0.1-SNAPSHOT"
compileOnly "io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT"
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
exclude group: "org.bukkit", module: "bukkit"
}

View File

@ -37,7 +37,6 @@ import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import redis.clients.jedis.Jedis;
@Getter
@Setter

View File

@ -10,17 +10,15 @@ import dev.plex.rank.enums.Rank;
import dev.plex.util.PlexUtils;
import dev.plex.util.minimessage.SafeMiniMessage;
import dev.plex.util.redis.MessageUtil;
import java.util.UUID;
import net.kyori.adventure.text.Component;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.UUID;
@CommandPermissions(level = Rank.ADMIN, permission = "plex.adminchat", source = RequiredCommandSource.ANY)
@CommandParameters(name = "adminchat", description = "Talk privately with other admins", usage = "/<command> <message>", aliases = "o,ac,sc,staffchat")
public class AdminChatCMD extends PlexCommand

View File

@ -8,7 +8,6 @@ import dev.plex.util.minimessage.SafeMiniMessage;
import dev.plex.util.redis.MessageUtil;
import io.papermc.paper.chat.ChatRenderer;
import io.papermc.paper.event.player.AsyncChatEvent;
import java.util.UUID;
import java.util.function.Supplier;
import net.kyori.adventure.audience.Audience;

View File

@ -15,7 +15,6 @@ import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -12,7 +12,6 @@ import java.util.List;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
@ -166,7 +165,7 @@ public class PunishedPlayerMenu extends AbstractMenu
PlexPlayer punishedPlayer = DataUtils.getPlayer(player.getUniqueId()) == null ? null : Plex.get().getPlayerCache().getPlexPlayer(player.getUniqueId());
if (punishedPlayer == null)
{
event.getWhoClicked().sendMessage(ChatColor.RED + "This player does not exist. Try doing /punishments <player> instead.");
event.getWhoClicked().sendMessage(Component.text("This player does not exist. Try doing /punishments <player> instead.").color(NamedTextColor.RED));
event.getWhoClicked().closeInventory();
return;
}

View File

@ -6,8 +6,9 @@ import dev.plex.player.PlexPlayer;
import dev.plex.util.PlexUtils;
import dev.plex.util.menu.AbstractMenu;
import java.util.List;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
@ -149,7 +150,7 @@ public class PunishmentMenu extends AbstractMenu
PlexPlayer punishedPlayer = DataUtils.getPlayer(player.getUniqueId());
if (punishedPlayer == null)
{
event.getWhoClicked().sendMessage(ChatColor.RED + "This player does not exist. Try doing /punishments <player> instead.");
event.getWhoClicked().sendMessage(Component.text("This player does not exist. Try doing /punishments <player> instead.").color(NamedTextColor.RED));
event.getWhoClicked().closeInventory();
return;
}

View File

@ -8,7 +8,6 @@ import dev.plex.listener.impl.ChatListener;
import dev.plex.player.PlexPlayer;
import dev.plex.rank.enums.Rank;
import dev.plex.storage.StorageType;
import java.sql.Connection;
import java.sql.SQLException;
import java.time.Month;
@ -18,7 +17,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.minimessage.MiniMessage;
@ -28,7 +26,6 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommandYamlParser;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;

View File

@ -6,17 +6,14 @@ import dev.plex.Plex;
import dev.plex.util.PlexLog;
import dev.plex.util.PlexUtils;
import dev.plex.util.minimessage.SafeMiniMessage;
import java.util.UUID;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.json.JSONException;
import org.json.JSONObject;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPubSub;
import java.util.UUID;
import static dev.plex.util.PlexUtils.messageComponent;
public class MessageUtil {