Remove Galaxy dependency
Switched back to paper since we don't use any features from Galaxy that aren't already in paper
This commit is contained in:
parent
45eceaf4a6
commit
9e437079e4
|
|
@ -3,9 +3,10 @@ plugins {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.alttd:Galaxy-API:1.21-R0.1-SNAPSHOT") {
|
||||
// compileOnly("com.alttd:Galaxy-API:1.21-R0.1-SNAPSHOT") {
|
||||
// exclude("net.kyori")
|
||||
}
|
||||
// }
|
||||
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
|
||||
compileOnly("org.spongepowered:configurate-yaml:4.1.2") // Configurate
|
||||
compileOnly("net.luckperms:api:5.3") // Luckperms
|
||||
}
|
||||
|
|
@ -24,4 +25,4 @@ publishing {
|
|||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ plugins {
|
|||
|
||||
dependencies {
|
||||
implementation(project(":api")) // API
|
||||
compileOnly("com.alttd:Galaxy-API:1.21-R0.1-SNAPSHOT") // Galaxy
|
||||
// compileOnly("com.alttd:Galaxy-API:1.21-R0.1-SNAPSHOT") // Galaxy
|
||||
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
|
||||
compileOnly("com.gitlab.ruany:LiteBansAPI:0.3.5") // move to proxy
|
||||
compileOnly("org.apache.commons:commons-lang3:3.12.0") // needs an alternative, already removed from upstream api and will be removed in server
|
||||
compileOnly("net.luckperms:api:5.3") // Luckperms
|
||||
|
|
@ -21,4 +22,4 @@ tasks {
|
|||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class ChatPlugin extends JavaPlugin {
|
|||
chatAPI = new ChatImplementation();
|
||||
chatHandler = new ChatHandler();
|
||||
DatabaseConnection.initialize();
|
||||
serverConfig = new ServerConfig(Bukkit.getServerName());
|
||||
serverConfig = new ServerConfig(Bukkit.getServer().getName());
|
||||
ChatLogHandler chatLogHandler = ChatLogHandler.getInstance(true);
|
||||
registerListener(new PlayerListener(serverConfig), new ChatListener(chatLogHandler), new BookListener(), new ShutdownListener(chatLogHandler, this));
|
||||
if(serverConfig.GLOBALCHAT) {
|
||||
|
|
@ -119,7 +119,7 @@ public class ChatPlugin extends JavaPlugin {
|
|||
public void ReloadConfig() {
|
||||
chatAPI.ReloadConfig();
|
||||
chatAPI.ReloadChatFilters();
|
||||
serverConfig = new ServerConfig(Bukkit.getServerName());
|
||||
serverConfig = new ServerConfig(Bukkit.getServer().getName());
|
||||
Bukkit.broadcast(Utility.parseMiniMessage("Reloaded ChatPlugin Config."), "command.chat.reloadchat");
|
||||
ALogger.info("Reloaded ChatPlugin config.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class ChatChannel extends BukkitCommand {
|
|||
}
|
||||
|
||||
if(args.length == 0 && player.hasPermission(channel.getPermission())) {
|
||||
player.sendMiniMessage(Config.CUSTOM_CHANNEL_TOGGLED, TagResolver.resolver(
|
||||
player.sendRichMessage(Config.CUSTOM_CHANNEL_TOGGLED, TagResolver.resolver(
|
||||
Placeholder.unparsed("channel", channel.getChannelName()),
|
||||
Placeholder.component("status", toggleableForCustomChannel.toggle(player.getUniqueId())
|
||||
? Config.TOGGLED_ON : Config.TOGGLED_OFF)));
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class PartyChat extends Toggleable implements CommandExecutor {
|
|||
}
|
||||
|
||||
if(args.length == 0) {
|
||||
player.sendMiniMessage(Config.PARTY_TOGGLED, Placeholder.component("status",
|
||||
player.sendRichMessage(Config.PARTY_TOGGLED, Placeholder.component("status",
|
||||
toggle(player.getUniqueId()) ? Config.TOGGLED_ON : Config.TOGGLED_OFF));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public class ChatHandler {
|
|||
Placeholder.component("sender", senderName),
|
||||
Placeholder.component("prefix", prefix),
|
||||
Placeholder.component("message", parseMessageContent(player, message)),
|
||||
Placeholder.parsed("server", Bukkit.getServerName())
|
||||
Placeholder.parsed("server", Bukkit.getServer().getName())
|
||||
);
|
||||
|
||||
Component component = Utility.parseMiniMessage(Config.GCFORMAT, placeholders);
|
||||
|
|
@ -165,7 +165,7 @@ public class ChatHandler {
|
|||
TagResolver placeholders = TagResolver.resolver(
|
||||
Placeholder.component("sender", senderName),
|
||||
Placeholder.component("message", parseMessageContent(player, message)),
|
||||
Placeholder.parsed("server", Bukkit.getServerName()),
|
||||
Placeholder.parsed("server", Bukkit.getServer().getName()),
|
||||
Placeholder.parsed("channel", channel.getChannelName())
|
||||
);
|
||||
Component component = Utility.parseMiniMessage(channel.getFormat(), placeholders);
|
||||
|
|
@ -238,7 +238,9 @@ public class ChatHandler {
|
|||
}
|
||||
|
||||
private void sendChatChannelMessage(CustomChannel chatChannel, UUID uuid, Component component) {
|
||||
if (!chatChannel.getServers().contains(Bukkit.getServerName())) return;
|
||||
if (!chatChannel.getServers().contains(Bukkit.getServer().getName())) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = Bukkit.getPlayer(uuid);
|
||||
if (player == null) {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public class ChatListener implements Listener {
|
|||
GalaxyUtility.sendBlockedNotification("Language", player,
|
||||
modifiableString.component(),
|
||||
"");
|
||||
chatLogHandler.addChatLog(uuid, player.getServer().getServerName(), PlainTextComponentSerializer.plainText().serialize(input), true);
|
||||
chatLogHandler.addChatLog(uuid, player.getServer().getName(), PlainTextComponentSerializer.plainText().serialize(input), true);
|
||||
return; // the message was blocked
|
||||
}
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ public class ChatListener implements Listener {
|
|||
for (Player pingPlayer : playersToPing) {
|
||||
pingPlayer.playSound(pingPlayer.getLocation(), Sound.BLOCK_NOTE_BLOCK_BASS, 1, 1);
|
||||
}
|
||||
chatLogHandler.addChatLog(uuid, player.getServer().getServerName(), modifiableString.string(), false);
|
||||
chatLogHandler.addChatLog(uuid, player.getServer().getName(), modifiableString.string(), false);
|
||||
ALogger.info(PlainTextComponentSerializer.plainText().serialize(input));
|
||||
}
|
||||
|
||||
|
|
@ -219,4 +219,4 @@ public class ChatListener implements Listener {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ public class PluginMessage implements PluginMessageListener {
|
|||
ALogger.warn("Received ChatChannel message for non existent channel.");
|
||||
return;
|
||||
}
|
||||
if (!chatChannel.getServers().contains(Bukkit.getServerName())) {
|
||||
if (!chatChannel.getServers().contains(Bukkit.getServer().getName())) {
|
||||
ALogger.warn("Received ChatChannel message for the wrong server.");
|
||||
return;
|
||||
}
|
||||
|
|
@ -228,4 +228,4 @@ public class PluginMessage implements PluginMessageListener {
|
|||
return target.hasPermission("chat.ignorebypass");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,24 +149,24 @@ public class NickUtilities
|
|||
|
||||
public static boolean validNick(Player sender, OfflinePlayer target, String nickName) {
|
||||
if (!noBlockedCodes(nickName)) {
|
||||
sender.sendMiniMessage(Config.NICK_BLOCKED_COLOR_CODES, null);
|
||||
sender.sendRichMessage(Config.NICK_BLOCKED_COLOR_CODES);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Utility.checkNickBrightEnough(nickName)) {
|
||||
sender.sendMiniMessage("<red>At least one color must be brighter than 30 for each color</red>", null);
|
||||
sender.sendRichMessage("<red>At least one color must be brighter than 30 for each color</red>");
|
||||
return false;
|
||||
}
|
||||
|
||||
String cleanNick = NickUtilities.removeAllColors(nickName);
|
||||
|
||||
if (cleanNick.length() < 3 || cleanNick.length() > 16) {
|
||||
sender.sendMiniMessage(Config.NICK_INVALID_LENGTH, null);
|
||||
sender.sendRichMessage(Config.NICK_INVALID_LENGTH);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!cleanNick.matches("[a-zA-Z0-9_]*") || nickName.length() > 192) { //192 is if someone puts {#xxxxxx<>} in front of every letter
|
||||
sender.sendMiniMessage(Config.NICK_INVALID_CHARACTERS, null);
|
||||
sender.sendRichMessage(Config.NICK_INVALID_CHARACTERS);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ public class NickUtilities
|
|||
if (uniqueId.equals(uuid)){
|
||||
ChatPlugin.getInstance().getLogger().info(uuid + " " + uniqueId);
|
||||
}
|
||||
sender.sendMiniMessage(Config.NICK_TAKEN, null);
|
||||
sender.sendRichMessage(Config.NICK_TAKEN);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class Nicknames implements CommandExecutor, TabCompleter {
|
|||
Placeholder.component("nickname", chatUser.getDisplayName()),
|
||||
Placeholder.parsed("currentnickname", chatUser.getNickNameString())
|
||||
);
|
||||
player.sendMiniMessage(Config.NICK_CURRENT, placeholders);
|
||||
player.sendRichMessage(Config.NICK_CURRENT, placeholders);
|
||||
}
|
||||
break;
|
||||
case "help":
|
||||
|
|
|
|||
|
|
@ -4,11 +4,14 @@ include(":api")
|
|||
include(":galaxy")
|
||||
include(":velocity")
|
||||
|
||||
val nexusUser = providers.gradleProperty("alttdSnapshotUsername").get()
|
||||
val nexusPass = providers.gradleProperty("alttdSnapshotPassword").get()
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
// mavenLocal()
|
||||
mavenCentral()
|
||||
maven("https://repo.destro.xyz/snapshots") // Altitude - Galaxy
|
||||
// maven("https://repo.destro.xyz/snapshots") // Altitude - Galaxy
|
||||
maven("https://oss.sonatype.org/content/groups/public/") // Adventure
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots/") // Minimessage
|
||||
maven("https://nexus.velocitypowered.com/repository/") // Velocity
|
||||
|
|
@ -16,6 +19,14 @@ dependencyResolutionManagement {
|
|||
maven("https://repo.spongepowered.org/maven") // Configurate
|
||||
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // Papi
|
||||
maven("https://jitpack.io")
|
||||
maven {
|
||||
name = "nexus"
|
||||
url = uri("https://repo.alttd.com/repository/alttd-snapshot/")
|
||||
credentials {
|
||||
username = nexusUser
|
||||
password = nexusPass
|
||||
}
|
||||
}
|
||||
}
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ dependencies {
|
|||
implementation("org.spongepowered", "configurate-yaml", "4.1.2")
|
||||
compileOnly("net.kyori:adventure-text-minimessage:4.10.1")
|
||||
compileOnly("com.gitlab.ruany:LiteBansAPI:0.3.5")
|
||||
compileOnly("com.alttd.proxydiscordlink:ProxyDiscordLink:1.0.0-BETA-SNAPSHOT")
|
||||
compileOnly("com.alttd.proxydiscordlink:ProxyDiscordLink:1.0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
|
@ -30,4 +30,4 @@ tasks {
|
|||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user