Skip to content

Commit

Permalink
feat!: upgrade to Minecraft 1.21.0, update dependencies, remove unuse…
Browse files Browse the repository at this point in the history
…d dependencies
  • Loading branch information
AlessioGr committed Sep 30, 2024
1 parent 44d2ab3 commit ebe65d5
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 198 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Download: https://modrinth.com/plugin/notquests/versions

![Banner](https://user-images.githubusercontent.com/70709113/133943253-af271d49-441b-473e-8b95-6053fe5d09cb.png)

NotQuests is a flexible, Minecraft 1.17-1.20 Quest plugin, featuring a complete GUI for player interactions, open & trusted source code and flexibility.
NotQuests is a flexible, Minecraft 1.17-1.21 Quest plugin, featuring a complete GUI for player interactions, open & trusted source code and flexibility.
---

I created NotQuests for my own server, mc.notnot.pro and planned to keep it private. However, I don't have enough time to maintain it myself, so I just made it public.
Expand Down Expand Up @@ -119,7 +119,7 @@ Admin Commands - Quest Editing:


**Requirements to run this:**
- Paper 1.17.1 - 1.20.6
- Paper 1.17.1 - 1.21.1
- Java 17


Expand Down
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ import org.gradle.api.JavaVersion.*
plugins {
`java-library`
`maven-publish`
id("io.github.goooler.shadow") version "8.1.7"
id("io.papermc.paperweight.userdev") version "1.7.0"
id("com.gradleup.shadow") version "8.3.1"
id("io.papermc.paperweight.userdev") version "1.7.3"
id("xyz.jpenilla.run-paper") version "2.2.4" // Adds runServer and runMojangMappedServer tasks for testing
}

subprojects {
plugins.apply("java-library")
plugins.apply("maven-publish")
plugins.apply("io.github.goooler.shadow")
plugins.apply("com.gradleup.shadow")
}

group = "rocks.gravili.notquests"
version = "5.18.2"
version = "5.19.0"


repositories {
}

dependencies {
paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
}

java {
Expand Down Expand Up @@ -80,7 +80,7 @@ tasks {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.20.6")
minecraftVersion("1.21.1")
}
}

Expand Down
9 changes: 3 additions & 6 deletions paper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ repositories {

dependencies {
implementation(project(path= ":common", configuration= "shadow"))
paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
//compileOnly("io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT!!")
//implementation("de.themoep:inventorygui:1.5-SNAPSHOT")

Expand Down Expand Up @@ -249,11 +249,8 @@ dependencies {
implementation("com.github.Redempt:Crunch:2.0.3")


implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.0")
implementation("org.apache.httpcomponents:httpclient:4.5.14")

implementation("com.zaxxer:HikariCP:5.1.0")
implementation("com.zaxxer:HikariCP:6.0.0")

compileOnly("com.github.war-systems:UltimateJobs:0.3.6")

Expand Down Expand Up @@ -376,7 +373,7 @@ tasks {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.20.6")
minecraftVersion("1.21.1")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public class NotQuests extends NotQuestsMainAbstract<Component, CommandSender> {
private MessageManager messageManager;
private TagManager tagManager;
private ItemsManager itemsManager;
private WebManager webManager;

//Registering Managers
private ObjectiveManager objectiveManager;
Expand Down Expand Up @@ -270,7 +269,6 @@ public void onEnable() {

itemsManager = new ItemsManager(this);

webManager = new WebManager(this);

NotQuestsFullyLoadedEvent notQuestsFullyLoadedEvent = new NotQuestsFullyLoadedEvent(this);
if (Bukkit.isPrimaryThread()) {
Expand Down Expand Up @@ -534,9 +532,6 @@ public final ItemsManager getItemsManager(){
return itemsManager;
}

public final WebManager getWebManager(){
return webManager;
}

public final MiniMessage getMiniMessage(){
return messageManager.getMiniMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,44 +695,6 @@ public AdminCommands(final NotQuests main, PaperCommandManager<CommandSender> ma
context.getSender().sendMessage(main.parse(
"<main>This feature is still in development. The web editor does not work at all yet. Sorry! This command just acts as a placeholder. Consult the NotQuests documentation for a tutorial on how to use NotQuests."
));
if(true){
return;
}
context.getSender().sendMessage(main.parse(
"<main>Opening the web editor..."
));

String jsonResult = main.getWebManager().openEditor();

/*context.getSender().sendMessage(main.parse(
"<main>Result: " + jsonResult
));*/

String editorURL = "";

try {
JSONParser parser = new JSONParser();
Object resultObject = parser.parse(jsonResult);

if (resultObject instanceof JSONArray array) {
editorURL = "error";
}else if (resultObject instanceof JSONObject obj) {
editorURL = ""+(long)(obj.get("editor_id"));
}

} catch (Exception e) {
e.printStackTrace();
context.getSender().sendMessage(main.parse(
"<error>Failed to parse json!"
));
editorURL = "error";
}

editorURL = "https://editor.notquests.com/editor/" + editorURL;

context.getSender().sendMessage(main.parse(
"<success>Click following link to open the editor: \n<highlight><click:open_url:" + editorURL + "><hover:show_text:\"<highlight>Click to open the web editor\">" + editorURL
));
}));


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ public void updateAndReadGeneralConfig() {

main.getLogManager().info("Detected version: " + Bukkit.getBukkitVersion() + " <highlight>(Paper)");

if (!Bukkit.getBukkitVersion().contains("1.20")) {
if (!Bukkit.getBukkitVersion().contains("1.21")) {
if (!configuration.isPacketMagicUnsafeDisregardVersion()) {
configuration.setPacketMagic(false);
main.getLogManager().info("Packet magic has been disabled, because you are using an unsupported bukkit version...");
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class PacketManager implements Listener {
public PacketManager(final NotQuests main) {
this.main = main;
usePacketEvents = main.getConfiguration().usePacketEvents;
modern = Bukkit.getVersion().contains("1.20");
modern = Bukkit.getVersion().contains("1.21");
}

public final ReflectionPacketInjector getPacketInjector() {
Expand Down
8 changes: 4 additions & 4 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ repositories {
}

dependencies {
paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")

implementation(project(path= ":common", configuration= "shadow"))
implementation(project(path= ":paper", configuration= "shadow"))
Expand Down Expand Up @@ -193,7 +193,7 @@ tasks {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.20.6")
minecraftVersion("1.21.1")
}
}

Expand All @@ -217,9 +217,9 @@ bukkit {
name = "NotQuests"
version = rootProject.version.toString()
main = "rocks.gravili.notquests.Main"
apiVersion = "1.20"
apiVersion = "1.21"
authors = listOf("AlessioGr")
description = "Flexible, open, GUI Quest Plugin for Minecraft 1.20.6"
description = "Flexible, open, GUI Quest Plugin for Minecraft 1.21.1"
website = "https://www.notquests.com"
softDepend = listOf(
"ProtocolLib",
Expand Down

0 comments on commit ebe65d5

Please sign in to comment.