mirror of
https://github.com/plexusorg/BukkitTelnet.git
synced 2024-12-04 17:42:08 +00:00
Format and remove publishing
This commit is contained in:
parent
ea62ebcf8f
commit
0a0a070d7f
40
build.gradle
40
build.gradle
@ -62,43 +62,3 @@ shadowJar {
|
|||||||
archiveVersion.set("")
|
archiveVersion.set("")
|
||||||
archiveClassifier.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")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
jdk:
|
|
||||||
- openjdk17
|
|
@ -1,10 +1,6 @@
|
|||||||
package dev.plex;
|
package dev.plex;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public interface PermissionHandler
|
public interface PermissionHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
boolean hasPermission(String username, String permission);
|
boolean hasPermission(String username, String permission);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ public class BukkitTelnet extends JavaPlugin
|
|||||||
public Permission permissions;
|
public Permission permissions;
|
||||||
|
|
||||||
public PermissionHandler handler;
|
public PermissionHandler handler;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoad()
|
public void onLoad()
|
||||||
{
|
{
|
||||||
@ -66,7 +67,8 @@ public class BukkitTelnet extends JavaPlugin
|
|||||||
TelnetLogger.info(plugin.getName() + " disabled");
|
TelnetLogger.info(plugin.getName() + " disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean setupPermissions() {
|
private boolean setupPermissions()
|
||||||
|
{
|
||||||
if (!getServer().getPluginManager().isPluginEnabled("Vault"))
|
if (!getServer().getPluginManager().isPluginEnabled("Vault"))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package me.totalfreedom.bukkittelnet;
|
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.TelnetRequestDataTagsEvent;
|
||||||
import me.totalfreedom.bukkittelnet.api.TelnetRequestUsageEvent;
|
import me.totalfreedom.bukkittelnet.api.TelnetRequestUsageEvent;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@ -15,10 +18,6 @@ import org.bukkit.scheduler.BukkitTask;
|
|||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class PlayerEventListener implements Listener
|
public class PlayerEventListener implements Listener
|
||||||
{
|
{
|
||||||
private final BukkitTelnet plugin;
|
private final BukkitTelnet plugin;
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package me.totalfreedom.bukkittelnet;
|
package me.totalfreedom.bukkittelnet;
|
||||||
|
|
||||||
import me.totalfreedom.bukkittelnet.session.ClientSession;
|
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
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
|
public class SocketListener extends Thread
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package me.totalfreedom.bukkittelnet;
|
package me.totalfreedom.bukkittelnet;
|
||||||
|
|
||||||
import me.totalfreedom.bukkittelnet.thirdparty.YamlConfig;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import me.totalfreedom.bukkittelnet.thirdparty.YamlConfig;
|
||||||
|
|
||||||
public class TelnetConfigLoader
|
public class TelnetConfigLoader
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
package me.totalfreedom.bukkittelnet;
|
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.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -15,6 +7,13 @@ import java.util.Collections;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
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
|
public class TelnetLogAppender extends AbstractAppender
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
package me.totalfreedom.bukkittelnet;
|
package me.totalfreedom.bukkittelnet;
|
||||||
|
|
||||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||||
|
|
||||||
public final class TelnetLogger
|
public final class TelnetLogger
|
||||||
{
|
{
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
package me.totalfreedom.bukkittelnet;
|
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.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.List;
|
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
|
public class TelnetServer implements Server
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package me.totalfreedom.bukkittelnet.api;
|
package me.totalfreedom.bukkittelnet.api;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import me.totalfreedom.bukkittelnet.SocketListener;
|
import me.totalfreedom.bukkittelnet.SocketListener;
|
||||||
import me.totalfreedom.bukkittelnet.TelnetConfigLoader.TelnetConfig;
|
import me.totalfreedom.bukkittelnet.TelnetConfigLoader.TelnetConfig;
|
||||||
import me.totalfreedom.bukkittelnet.session.ClientSession;
|
import me.totalfreedom.bukkittelnet.session.ClientSession;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface Server
|
public interface Server
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package me.totalfreedom.bukkittelnet.api;
|
|||||||
|
|
||||||
import me.totalfreedom.bukkittelnet.session.SessionCommandSender;
|
import me.totalfreedom.bukkittelnet.session.SessionCommandSender;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
package me.totalfreedom.bukkittelnet.api;
|
package me.totalfreedom.bukkittelnet.api;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class TelnetRequestDataTagsEvent extends Event
|
public class TelnetRequestDataTagsEvent extends Event
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2,6 +2,16 @@ package me.totalfreedom.bukkittelnet.session;
|
|||||||
|
|
||||||
//import dev.plex.SimulatedPlayer;
|
//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.TelnetLogger;
|
||||||
import me.totalfreedom.bukkittelnet.TelnetServer;
|
import me.totalfreedom.bukkittelnet.TelnetServer;
|
||||||
import me.totalfreedom.bukkittelnet.Util;
|
import me.totalfreedom.bukkittelnet.Util;
|
||||||
@ -12,13 +22,6 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
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
|
public final class ClientSession extends Thread
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@ package me.totalfreedom.bukkittelnet.session;
|
|||||||
|
|
||||||
//import dev.plex.SimulatedPlayer;
|
//import dev.plex.SimulatedPlayer;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import me.totalfreedom.bukkittelnet.BukkitTelnet;
|
import me.totalfreedom.bukkittelnet.BukkitTelnet;
|
||||||
@ -16,9 +18,6 @@ import org.bukkit.plugin.Plugin;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class SessionCommandSender implements CommandSender
|
public class SessionCommandSender implements CommandSender
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
package me.totalfreedom.bukkittelnet.thirdparty;
|
package me.totalfreedom.bukkittelnet.thirdparty;
|
||||||
|
|
||||||
import org.bukkit.plugin.Plugin;
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.*;
|
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.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.channels.Channels;
|
import java.nio.channels.Channels;
|
||||||
import java.nio.channels.ReadableByteChannel;
|
import java.nio.channels.ReadableByteChannel;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents all File-related utilities.
|
* Represents all File-related utilities.
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
package me.totalfreedom.bukkittelnet.thirdparty;
|
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.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
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.
|
* Represents a definable YAML configuration.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# BukkitTelnet v4.6.1 Configuration File
|
# BukkitTelnet v4.8 Configuration File
|
||||||
|
|
||||||
# Address to listen on, leave blank for all
|
# Address to listen on, leave blank for all
|
||||||
address: ''
|
address: ''
|
||||||
|
Loading…
Reference in New Issue
Block a user