mirror of
https://github.com/plexusorg/Module-BukkitTelnet.git
synced 2024-11-17 02:06:14 +00:00
Update dependencies
This commit is contained in:
parent
58322f8138
commit
1a31aac5ce
@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.plex"
|
group = "dev.plex"
|
||||||
version = "1.3"
|
version = "1.5"
|
||||||
description = "Module-BukkitTelnet"
|
description = "Module-BukkitTelnet"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -26,17 +26,17 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("org.projectlombok:lombok:1.18.28")
|
compileOnly("org.projectlombok:lombok:1.18.34")
|
||||||
annotationProcessor("org.projectlombok:lombok:1.18.28")
|
annotationProcessor("org.projectlombok:lombok:1.18.34")
|
||||||
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
|
||||||
compileOnly("dev.plex:server:1.3")
|
compileOnly("dev.plex:server:1.5-SNAPSHOT")
|
||||||
compileOnly("com.github.plexusorg:BukkitTelnet:6908ff201f") {
|
compileOnly("com.github.plexusorg:BukkitTelnet:6908ff201f") {
|
||||||
exclude("org.papermc.paper", "paper-api")
|
exclude("org.papermc.paper", "paper-api")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@ -61,7 +61,7 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.getByName<Jar>("jar") {
|
tasks.getByName<Jar>("jar") {
|
||||||
archiveBaseName.set("Plex-BukkitTelnet")
|
archiveBaseName.set("Module-BukkitTelnet")
|
||||||
archiveVersion.set("")
|
archiveVersion.set("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
12
gradlew
vendored
12
gradlew
vendored
@ -85,9 +85,6 @@ done
|
|||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|
||||||
@ -133,11 +130,14 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command;
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
@ -26,7 +26,7 @@ public class BukkitTelnetModule extends PlexModule
|
|||||||
@Override
|
@Override
|
||||||
public void enable()
|
public void enable()
|
||||||
{
|
{
|
||||||
if (getPlex().getSystem().equalsIgnoreCase("permissions") && !Bukkit.getPluginManager().isPluginEnabled("Vault"))
|
if (!Bukkit.getPluginManager().isPluginEnabled("Vault"))
|
||||||
{
|
{
|
||||||
failed = true;
|
failed = true;
|
||||||
PlexLog.error("Plex-BukkitTelnet requires the 'Vault' plugin as well as a Permissions plugin that hooks into 'Vault.' We recommend LuckPerms!");
|
PlexLog.error("Plex-BukkitTelnet requires the 'Vault' plugin as well as a Permissions plugin that hooks into 'Vault.' We recommend LuckPerms!");
|
||||||
@ -37,7 +37,7 @@ public class BukkitTelnetModule extends PlexModule
|
|||||||
if (!Bukkit.getPluginManager().isPluginEnabled("BukkitTelnet"))
|
if (!Bukkit.getPluginManager().isPluginEnabled("BukkitTelnet"))
|
||||||
{
|
{
|
||||||
failed = true;
|
failed = true;
|
||||||
PlexLog.warn("The Plex-BukkitTelnet module requires the BukkitTelnet plugin to work. I am automatically compiling BukkitTelnet plugin for you, however if something fails, please download it from: https://github.com/plexusorg/BukkitTelnet/releases");
|
PlexLog.warn("The BukkitTelnet module requires the BukkitTelnet plugin to work. I am automatically compiling BukkitTelnet plugin for you, however if something fails, please download it from: https://github.com/plexusorg/BukkitTelnet/releases");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PatchedTelnetCompiler.execute();
|
PatchedTelnetCompiler.execute();
|
||||||
@ -61,7 +61,7 @@ public class BukkitTelnetModule extends PlexModule
|
|||||||
}
|
}
|
||||||
catch (ClassNotFoundException | NoSuchMethodException ignored)
|
catch (ClassNotFoundException | NoSuchMethodException ignored)
|
||||||
{
|
{
|
||||||
PlexLog.warn("You are using an older version of BukkitTelnet that does not support Plex. I am automatically compiling a build that does work for you, however if something fails, please download a version that does from: https://ci.plex.us.org/job/Plex-BukkitTelnet");
|
PlexLog.warn("You are using an older version of BukkitTelnet that does not support Plex. I am automatically compiling a build that does work for you, however if something fails, please download a version that does from: https://ci.plex.us.org/job/Module-BukkitTelnet");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2,41 +2,22 @@ package dev.plex.listener;
|
|||||||
|
|
||||||
import dev.plex.cache.DataUtils;
|
import dev.plex.cache.DataUtils;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import dev.plex.rank.enums.Rank;
|
|
||||||
import dev.plex.util.PlexLog;
|
|
||||||
import me.totalfreedom.bukkittelnet.BukkitTelnet;
|
import me.totalfreedom.bukkittelnet.BukkitTelnet;
|
||||||
import me.totalfreedom.bukkittelnet.api.TelnetPreLoginEvent;
|
import me.totalfreedom.bukkittelnet.api.TelnetPreLoginEvent;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
||||||
public class BukkitTelnetListener extends PlexListener
|
public class BukkitTelnetListener extends PlexListener {
|
||||||
{
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPreLogin(TelnetPreLoginEvent event)
|
public void onPreLogin(TelnetPreLoginEvent event) {
|
||||||
{
|
|
||||||
final String ip = event.getIp();
|
final String ip = event.getIp();
|
||||||
final PlexPlayer player = DataUtils.getPlayerByIP(ip);
|
final PlexPlayer player = DataUtils.getPlayerByIP(ip);
|
||||||
if (player == null)
|
if (player == null) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (plugin.getSystem().equalsIgnoreCase("ranks"))
|
|
||||||
{
|
|
||||||
PlexLog.debug("Plex-BukkitTelnet using ranks check");
|
|
||||||
if (player.getRankFromString().isAtLeast(Rank.ADMIN))
|
|
||||||
{
|
|
||||||
event.setBypassPassword(true);
|
|
||||||
event.setName(player.getName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (plugin.getSystem().equalsIgnoreCase("permissions"))
|
|
||||||
{
|
|
||||||
PlexLog.debug("Plex-BukkitTelnet using permissions check");
|
|
||||||
if (BukkitTelnet.getPlugin().handler.hasPermission(player.getName(), "plex.telnet.autoconnect"))
|
|
||||||
{
|
|
||||||
event.setBypassPassword(true);
|
|
||||||
event.setName(player.getName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (BukkitTelnet.getPlugin().handler.hasPermission(player.getName(), "plex.telnet.autoconnect")) {
|
||||||
|
event.setBypassPassword(true);
|
||||||
|
event.setName(player.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: Module-BukkitTelnet
|
name: Module-BukkitTelnet
|
||||||
main: dev.plex.BukkitTelnetModule
|
main: dev.plex.BukkitTelnetModule
|
||||||
description: The Plex module for BukkitTelnet
|
description: The Plex module for BukkitTelnet
|
||||||
version: 1.3
|
version: 1.5
|
Loading…
Reference in New Issue
Block a user