Format and remove publishing

This commit is contained in:
Telesphoreo 2022-05-16 21:54:39 -05:00
parent ea62ebcf8f
commit 0a0a070d7f
No known key found for this signature in database
GPG Key ID: 5ACFFC4682CF849B
20 changed files with 68 additions and 109 deletions

View File

@ -62,43 +62,3 @@ shadowJar {
archiveVersion.set("")
archiveClassifier.set("")
}
publishing {
def config = configurations.getByName("library")
publications {
maven(MavenPublication) {
groupId = 'me.totalfreedom'
artifactId = 'BukkitTelnet'
version = rootProject.version
pom.withXml {
def dependenciesNode = asNode().appendNode("dependencies")
config.getAllDependencies().each { dependency ->
dependenciesNode.appendNode("dependency").with {
it.appendNode("groupId", dependency.group)
it.appendNode("artifactId", dependency.name)
it.appendNode("version", dependency.version)
it.appendNode("scope", "provided")
}
}
configurations.getByName("compileOnly").getAllDependencies().each { dependency ->
dependenciesNode.appendNode("dependency").with {
it.appendNode("groupId", dependency.group)
it.appendNode("artifactId", dependency.name)
it.appendNode("version", dependency.version)
it.appendNode("scope", "provided")
}
}
artifacts = [shadowJar]
}
}
}
repositories {
maven {
url = uri("https://nexus.telesphoreo.me/repository/totalfreedom/")
credentials {
username = System.getenv("plexUser")
password = System.getenv("plexPassword")
}
}
}
}

View File

View File

@ -1,2 +0,0 @@
jdk:
- openjdk17

View File

@ -1,10 +1,6 @@
package dev.plex;
import java.util.UUID;
public interface PermissionHandler
{
boolean hasPermission(String username, String permission);
}

View File

@ -21,6 +21,7 @@ public class BukkitTelnet extends JavaPlugin
public Permission permissions;
public PermissionHandler handler;
@Override
public void onLoad()
{
@ -66,7 +67,8 @@ public class BukkitTelnet extends JavaPlugin
TelnetLogger.info(plugin.getName() + " disabled");
}
private boolean setupPermissions() {
private boolean setupPermissions()
{
if (!getServer().getPluginManager().isPluginEnabled("Vault"))
{
return false;

View File

@ -1,5 +1,8 @@
package me.totalfreedom.bukkittelnet;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.Map;
import me.totalfreedom.bukkittelnet.api.TelnetRequestDataTagsEvent;
import me.totalfreedom.bukkittelnet.api.TelnetRequestUsageEvent;
import org.apache.commons.lang.StringUtils;
@ -15,10 +18,6 @@ import org.bukkit.scheduler.BukkitTask;
import org.json.JSONArray;
import org.json.JSONObject;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.Map;
public class PlayerEventListener implements Listener
{
private final BukkitTelnet plugin;

View File

@ -1,14 +1,18 @@
package me.totalfreedom.bukkittelnet;
import me.totalfreedom.bukkittelnet.session.ClientSession;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import me.totalfreedom.bukkittelnet.session.ClientSession;
public class SocketListener extends Thread
{

View File

@ -1,11 +1,10 @@
package me.totalfreedom.bukkittelnet;
import me.totalfreedom.bukkittelnet.thirdparty.YamlConfig;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import me.totalfreedom.bukkittelnet.thirdparty.YamlConfig;
public class TelnetConfigLoader
{

View File

@ -1,13 +1,5 @@
package me.totalfreedom.bukkittelnet;
import me.totalfreedom.bukkittelnet.session.ClientSession;
import me.totalfreedom.bukkittelnet.session.FilterMode;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.appender.AbstractAppender;
import org.apache.logging.log4j.core.config.Property;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
@ -15,6 +7,13 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import me.totalfreedom.bukkittelnet.session.ClientSession;
import me.totalfreedom.bukkittelnet.session.FilterMode;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.appender.AbstractAppender;
import org.apache.logging.log4j.core.config.Property;
public class TelnetLogAppender extends AbstractAppender
{

View File

@ -1,8 +1,7 @@
package me.totalfreedom.bukkittelnet;
import org.apache.commons.lang.exception.ExceptionUtils;
import java.util.logging.Logger;
import org.apache.commons.lang.exception.ExceptionUtils;
public final class TelnetLogger
{

View File

@ -1,15 +1,14 @@
package me.totalfreedom.bukkittelnet;
import lombok.Getter;
import me.totalfreedom.bukkittelnet.TelnetConfigLoader.TelnetConfig;
import me.totalfreedom.bukkittelnet.api.Server;
import me.totalfreedom.bukkittelnet.session.ClientSession;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.UnknownHostException;
import java.util.List;
import lombok.Getter;
import me.totalfreedom.bukkittelnet.TelnetConfigLoader.TelnetConfig;
import me.totalfreedom.bukkittelnet.api.Server;
import me.totalfreedom.bukkittelnet.session.ClientSession;
public class TelnetServer implements Server
{

View File

@ -1,11 +1,10 @@
package me.totalfreedom.bukkittelnet.api;
import java.util.List;
import me.totalfreedom.bukkittelnet.SocketListener;
import me.totalfreedom.bukkittelnet.TelnetConfigLoader.TelnetConfig;
import me.totalfreedom.bukkittelnet.session.ClientSession;
import java.util.List;
public interface Server
{

View File

@ -2,7 +2,6 @@ package me.totalfreedom.bukkittelnet.api;
import me.totalfreedom.bukkittelnet.session.SessionCommandSender;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

View File

@ -1,13 +1,12 @@
package me.totalfreedom.bukkittelnet.api;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import java.util.HashMap;
import java.util.Map;
public class TelnetRequestDataTagsEvent extends Event
{

View File

@ -2,6 +2,16 @@ package me.totalfreedom.bukkittelnet.session;
//import dev.plex.SimulatedPlayer;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.net.SocketException;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import me.totalfreedom.bukkittelnet.TelnetLogger;
import me.totalfreedom.bukkittelnet.TelnetServer;
import me.totalfreedom.bukkittelnet.Util;
@ -12,13 +22,6 @@ import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.scheduler.BukkitRunnable;
import java.io.*;
import java.net.Socket;
import java.net.SocketException;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
public final class ClientSession extends Thread
{

View File

@ -2,6 +2,8 @@ package me.totalfreedom.bukkittelnet.session;
//import dev.plex.SimulatedPlayer;
import java.util.Set;
import java.util.UUID;
import lombok.Getter;
import lombok.Setter;
import me.totalfreedom.bukkittelnet.BukkitTelnet;
@ -16,9 +18,6 @@ import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Set;
import java.util.UUID;
@Getter
@Setter
public class SessionCommandSender implements CommandSender

View File

@ -1,12 +1,18 @@
package me.totalfreedom.bukkittelnet.thirdparty;
import org.bukkit.plugin.Plugin;
import java.io.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import org.bukkit.plugin.Plugin;
/**
* Represents all File-related utilities.

View File

@ -1,13 +1,12 @@
package me.totalfreedom.bukkittelnet.thirdparty;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.logging.log4j.core.util.IOUtils;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.Plugin;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.logging.log4j.core.util.IOUtils;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.Plugin;
/**
* Represents a definable YAML configuration.

View File

@ -1,4 +1,4 @@
# BukkitTelnet v4.6.1 Configuration File
# BukkitTelnet v4.8 Configuration File
# Address to listen on, leave blank for all
address: ''