This commit is contained in:
Telesphoreo 2022-04-17 00:27:04 -05:00
parent 299aeae38e
commit df02ad6771
12 changed files with 16 additions and 14 deletions

View File

@ -1,6 +1,6 @@
package dev.plex;
public class PlexBase
public interface PlexBase
{
protected final static Plex plugin = Plex.get();
Plex plugin = Plex.get();
}

View File

@ -25,7 +25,7 @@ import java.util.stream.Collectors;
* @see Admin
*/
public class AdminList extends PlexBase
public class AdminList implements PlexBase
{
/**
* Key / Value storage, where the key is the unique ID of the admin

View File

@ -10,7 +10,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Set;
public class CommandHandler extends PlexBase
public class CommandHandler implements PlexBase
{
public CommandHandler()
{

View File

@ -10,7 +10,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Set;
public class ListenerHandler extends PlexBase
public class ListenerHandler implements PlexBase
{
public ListenerHandler()
{

View File

@ -3,7 +3,7 @@ package dev.plex.listener;
import dev.plex.PlexBase;
import org.bukkit.event.Listener;
public abstract class PlexListener extends PlexBase implements Listener
public abstract class PlexListener implements Listener, PlexBase
{
public PlexListener()
{

View File

@ -26,7 +26,7 @@ import org.apache.commons.io.FileUtils;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitRunnable;
public class PunishmentManager extends PlexBase
public class PunishmentManager implements PlexBase
{
@Getter
private final List<IndefiniteBan> indefiniteBans = Lists.newArrayList();

View File

@ -5,7 +5,7 @@ import lombok.Getter;
import lombok.Setter;
@Getter
public abstract class AbstractService extends PlexBase implements IService
public abstract class AbstractService implements IService, PlexBase
{
private boolean asynchronous;
private boolean repeating;

View File

@ -9,7 +9,7 @@ import dev.plex.PlexBase;
import dev.plex.player.PlexPlayer;
import dev.plex.util.PlexLog;
public class MongoConnection extends PlexBase
public class MongoConnection implements PlexBase
{
// USE MORPHIA API FOR MONGO <3

View File

@ -5,7 +5,7 @@ import dev.plex.util.PlexLog;
import java.util.function.Consumer;
import redis.clients.jedis.Jedis;
public class RedisConnection extends PlexBase
public class RedisConnection implements PlexBase
{
private Jedis jedis;

View File

@ -10,7 +10,7 @@ import java.sql.SQLException;
import lombok.Getter;
@Getter
public class SQLConnection extends PlexBase
public class SQLConnection implements PlexBase
{
private HikariDataSource dataSource;

View File

@ -60,7 +60,7 @@ import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
public class PlexUtils extends PlexBase
public class PlexUtils implements PlexBase
{
private static final Random RANDOM;
private static final List<String> regxList = new ArrayList<>()
@ -446,7 +446,9 @@ public class PlexUtils extends PlexBase
public static void broadcastToAdmins(Component component)
{
Bukkit.getOnlinePlayers().stream().filter(pl -> PlayerCache.getPlexPlayer(pl.getUniqueId()).isAdminActive()).forEach(pl ->
Bukkit.broadcast(component));
{
pl.sendMessage(component);
});
}
public static Object simpleGET(String url)

View File

@ -27,7 +27,7 @@ import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.json.JSONObject;
public class UpdateChecker extends PlexBase
public class UpdateChecker implements PlexBase
{
/*
* -4 = Never checked for updates