Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Refrac committed Aug 5, 2024
1 parent d95019e commit cb478e6
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 144 deletions.
2 changes: 1 addition & 1 deletion SimpleStaffChat-Bungee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>me.refracdevelopment</groupId>
<artifactId>SimpleStaffChat</artifactId>
<version>4.3.4</version>
<version>4.3.5</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ public ConfigFile(String name) {
try {
configFile = YamlDocument.create(new File(SimpleStaffChat.getInstance().getDataFolder(), name),
getClass().getResourceAsStream("/" + name),
GeneralSettings.DEFAULT,
LoaderSettings.builder().setAutoUpdate(true).build(),
DumperSettings.DEFAULT,
UpdaterSettings.builder().setVersioning(new BasicVersioning("config-version"))
.build()
GeneralSettings.builder().setUseDefaults(false).build(),
LoaderSettings.builder().setAutoUpdate(false).build()
);

configFile.update();
Expand Down
52 changes: 22 additions & 30 deletions SimpleStaffChat-Spigot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>me.refracdevelopment</groupId>
<artifactId>SimpleStaffChat</artifactId>
<version>4.3.4</version>
<version>4.3.5</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -42,6 +42,14 @@
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.MF</exclude>
<!--> XSeries <-->
<exclude>com/cryptomorin/xseries/XEntity*</exclude>
<exclude>com/cryptomorin/xseries/NoteBlockMusic*</exclude>
<exclude>com/cryptomorin/xseries/XSkull*</exclude>
<exclude>com/cryptomorin/xseries/XPotion*</exclude>
<exclude>com/cryptomorin/xseries/XTag*</exclude>
<exclude>com/cryptomorin/xseries/XBiome*</exclude>
<exclude>com/cryptomorin/xseries/NMSExtras*</exclude>
</excludes>
</filter>
</filters>
Expand All @@ -60,16 +68,12 @@
<shadedPattern>me.refracdevelopment.libs.libby</shadedPattern>
</relocation>
<relocation>
<pattern>net.kyori.adventure.text.minimessage</pattern>
<shadedPattern>me.refracdevelopment.libs.minimessage</shadedPattern>
<pattern>com.tcoded.folialib</pattern>
<shadedPattern>me.refracdevelopment.libs.folialib</shadedPattern>
</relocation>
<relocation>
<pattern>space.arim.morepaperlib</pattern>
<shadedPattern>me.refracdevelopment.libs.morepaperlib</shadedPattern>
</relocation>
<relocation>
<pattern>io.papermc.lib</pattern>
<shadedPattern>me.refracdevelopment.libs.paperlib</shadedPattern>
<pattern>com.cryptomorin.xseries</pattern>
<shadedPattern>me.refracdevelopment.libs.xseries</shadedPattern>
</relocation>
</relocations>
</configuration>
Expand Down Expand Up @@ -109,16 +113,16 @@
<url>https://repo.alessiodp.com/releases/</url>
</repository>
<repository>
<id>arim-mvn-lgpl3</id>
<url>https://mvn-repo.arim.space/lesser-gpl3/</url>
<id>devmart-other</id>
<url>https://nexuslite.gcnt.net/repos/other/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.6-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -158,27 +162,15 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.3.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.17.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.papermc</groupId>
<artifactId>paperlib</artifactId>
<version>1.0.7</version>
<groupId>com.tcoded</groupId>
<artifactId>FoliaLib</artifactId>
<version>0.3.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>space.arim.morepaperlib</groupId>
<artifactId>morepaperlib</artifactId>
<version>0.4.3</version>
<groupId>com.github.cryptomorin</groupId>
<artifactId>XSeries</artifactId>
<version>11.2.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package me.refracdevelopment.simplestaffchat;

import com.cryptomorin.xseries.reflection.XReflection;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import io.papermc.lib.PaperLib;
import com.tcoded.folialib.FoliaLib;
import lombok.Getter;
import me.refracdevelopment.simplestaffchat.listeners.ChatListener;
import me.refracdevelopment.simplestaffchat.listeners.JoinListener;
Expand All @@ -15,7 +16,6 @@
import org.bstats.bukkit.Metrics;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import space.arim.morepaperlib.MorePaperLib;

import java.io.BufferedReader;
import java.io.InputStreamReader;
Expand All @@ -38,15 +38,20 @@ public final class SimpleStaffChat extends JavaPlugin {
private Commands commands;
private Discord discord;

private MorePaperLib paperLib;
private FoliaLib foliaLib;

@Override
public void onEnable() {
instance = this;

new Metrics(this, 12095);
foliaLib = new FoliaLib(this);

paperLib = new MorePaperLib(SimpleStaffChat.getInstance());
if (!XReflection.supports(18) || getFoliaLib().isSpigot()) {
getLogger().info("This version and or software (Spigot) is no longer supported.");
getLogger().info("Please update to at least Paper 1.18.x or above.");
getServer().getPluginManager().disablePlugin(this);
return;
}

loadFiles();

Expand All @@ -63,10 +68,9 @@ public void onEnable() {
loadModules();
loadHooks();

// Paper is recommended but not required
PaperLib.suggestPaper(this);
updateCheck();

paperLib.scheduling().asyncScheduler().run(this::updateCheck);
new Metrics(this, 12095);
}

private void loadFiles() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.refracdevelopment.simplestaffchat.command;

import me.refracdevelopment.simplestaffchat.SimpleStaffChat;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandMap;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -37,7 +38,7 @@ public Command(int argsLength, String usage, String name, String permission, Str
}

private void registerBukkitCommand(String[] aliases) {
CommandMap commandMap = SimpleStaffChat.getInstance().getPaperLib().commandRegistration().getServerCommandMap();
CommandMap commandMap = Bukkit.getCommandMap();

commandMap.register("simplestaffchat", this);
for (String alias : aliases) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ public ConfigFile(String name) {
try {
configFile = YamlDocument.create(new File(SimpleStaffChat.getInstance().getDataFolder(), name),
getClass().getResourceAsStream("/" + name),
GeneralSettings.DEFAULT,
LoaderSettings.builder().setAutoUpdate(true).build(),
DumperSettings.DEFAULT,
UpdaterSettings.builder().setVersioning(new BasicVersioning("config-version"))
.build()
GeneralSettings.builder().setUseDefaults(false).build(),
LoaderSettings.builder().setAutoUpdate(false).build()
);

configFile.update();
Expand Down
Loading

0 comments on commit cb478e6

Please sign in to comment.