Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0826518
Add support for custom guis. Add OpenGui action
TheZexquex Feb 22, 2023
6724af9
Forgot some things in prev. commit :^)
TheZexquex Feb 22, 2023
095dbe6
Merge branch 'AlessioGr:main' into feature/customguis
TheZexquex Feb 22, 2023
54e2074
Rebase custom gui feature on InvUi + add support for more NotQuests d…
TheZexquex Mar 18, 2023
496f4e1
Fix merge conflics
TheZexquex Mar 18, 2023
27c5204
Add missing files for gui feature because somehow they were ignored?
TheZexquex Mar 18, 2023
4030c66
Merge main into feature/customguis
TheZexquex Jun 5, 2023
f8b268b
Update InvUi, replace usages of old gui system with new one (/nq + np…
TheZexquex Jun 6, 2023
81e8398
Move gui default files to plugin
TheZexquex Jun 11, 2023
4d8dacd
Add new default gui files
TheZexquex Jun 12, 2023
8e9a72e
Update main-base.yml gui file
TheZexquex Jun 12, 2023
ae45860
Add new gui specialicon type (CATEGORY_PLAYER_AVAILABLE_QUEST)
TheZexquex Jun 12, 2023
bb373d6
Some small enhancements
TheZexquex Jul 17, 2023
af02a11
Merge branch 'main' into feature/customguis
TheZexquex Jul 17, 2023
d4ab492
Remove code syntax error (how did this get there?)
TheZexquex Jul 17, 2023
07ae46d
Update invui + fix some gui preconfig mistakes
TheZexquex Jul 17, 2023
0651245
Update InvUi, UClans + bum runServer version to 1.20.2
TheZexquex Oct 23, 2023
f17aa89
Merge branch 'main' into feature/customguis
TheZexquex Oct 18, 2024
2df6e80
chore: update for 1.21 and make it compile (need to find a better sol…
TheZexquex Oct 19, 2024
196ebfd
chore: add translations and fix some small mistakes in the default gu…
TheZexquex Oct 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions paper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -155,30 +155,36 @@ repositories {
}
}

maven("https://repo.xenondevs.xyz/releases")
maven("https://nexus.betonquest.org/repository/betonquest/")
maven("https://maven.citizensnpcs.co/repo")
maven("https://repo.magmaguy.com/releases")
//mavenLocal()

}

dependencies {
implementation(project(path= ":common", configuration= "shadow"))
implementation(project(path = ":common", configuration = "shadow"))
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")

//compileOnly("net.citizensnpcs:citizens-main:2.0.30-SNAPSHOT")
compileOnly(files("libs/citizens-2.0.34-b3410.jar"))
compileOnly("net.citizensnpcs:citizens-main:2.0.30-SNAPSHOT") {
exclude(group = "*", module = "*")
}

compileOnly("me.clip:placeholderapi:2.11.5")
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")


compileOnly("io.lumine:Mythic-Dist:5.3.0-SNAPSHOT")
compileOnly("com.magmaguy:EliteMobs:9.1.9")
compileOnly(files("libs/EliteMobs-8.7.11.jar"))
compileOnly(files("libs/ProjectKorra-1.11.2.jar"))
compileOnly(files("libs/ProjectKorra-1.11.3.jar"))
//compileOnly(files("libs/UltimateJobs-0.2.0-SNAPSHOT.jar"))


compileOnly(files("libs/betonquest-2.0.1.jar"))
compileOnly(files("libs/BetonQuest.jar"));

compileOnly("com.sk89q.worldedit:worldedit-core:7.3.0-SNAPSHOT")
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.3.0-SNAPSHOT")
Expand All @@ -195,8 +201,6 @@ dependencies {
compileOnly("org.geysermc.floodgate:api:2.2.2-SNAPSHOT")




//Shaded


Expand All @@ -213,7 +217,11 @@ dependencies {
}
//Else it errors:
implementation("io.leangen.geantyref:geantyref:1.3.13")
//Interfaces

//Interfaces + InvUI

implementation("xyz.xenondevs.invui:invui:1.38")

implementation("org.incendo.interfaces:interfaces-core:1.0.0-SNAPSHOT")

implementation("org.incendo.interfaces:interfaces-paper:1.0.0-SNAPSHOT") {
Expand Down Expand Up @@ -243,7 +251,7 @@ dependencies {
compileOnly(files("libs/EcoBosses-v8.78.0.jar"))
compileOnly("com.willfp:eco:6.38.3")

compileOnly(files("libs/znpcs-4.6.jar"))
compileOnly(files("libs/znpcs-4.8.jar"))


implementation("com.github.Redempt:Crunch:2.0.3")
Expand All @@ -267,7 +275,7 @@ tasks {

shadowJar {

minimize()
//minimize()

//exclude('com.mojang:brigadier')

Expand All @@ -288,6 +296,7 @@ tasks {
//relocate('net.kyori.adventure.platform.bukkit', path.concat('.kyori.platform-bukkit'))
relocate("net.kyori.adventure.text.serializer.bungeecord", "$shadowPath.kyori.bungeecord")

relocate("xyz.xenondevs.invui", "$shadowPath.invui")

relocate("org.incendo.interfaces", "$shadowPath.interfaces")

Expand All @@ -305,6 +314,7 @@ tasks {
dependencies {
//include(dependency('org.apache.commons:')
include(dependency("commons-io:commons-io:"))
include(dependency("xyz.xenondevs.invui:"))

//include(dependency('io.papermc:paperlib')
//include(dependency("de.themoep:inventorygui:1.5-SNAPSHOT"))
Expand Down Expand Up @@ -351,8 +361,6 @@ tasks {
//}




/*shadowJar {
dependsOn(reobfJar)
}*/
Expand All @@ -366,9 +374,11 @@ tasks {
javadoc {
options.encoding = Charsets.UTF_8.name()
}

processResources {
filteringCharset = Charsets.UTF_8.name()
}

runServer {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
Expand Down
20 changes: 19 additions & 1 deletion paper/src/main/java/rocks/gravili/notquests/paper/NotQuests.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import rocks.gravili.notquests.paper.events.QuestEvents;
import rocks.gravili.notquests.paper.events.TriggerEvents;
import rocks.gravili.notquests.paper.events.notquests.NotQuestsFullyLoadedEvent;
import rocks.gravili.notquests.paper.gui.GuiService;
import rocks.gravili.notquests.paper.managers.*;
import rocks.gravili.notquests.paper.managers.integrations.IntegrationsManager;
import rocks.gravili.notquests.paper.managers.integrations.bstats.Metrics;
Expand Down Expand Up @@ -84,6 +85,7 @@ public class NotQuests extends NotQuestsMainAbstract<Component, CommandSender> {
private ItemsManager itemsManager;

//Registering Managers
private GuiService guiService;
private ObjectiveManager objectiveManager;
private ConditionsManager conditionsManager;
private ActionManager actionManager;
Expand Down Expand Up @@ -180,7 +182,7 @@ public void onEnable() {

updateManager = new UpdateManager(this);

guiManager = new GUIManager(this);
reloadGuis();

/*
* Tell the Data Manager: Hey, NPCs have not been loaded yet. If this is set to false, the plugin will
Expand Down Expand Up @@ -213,6 +215,8 @@ public void onEnable() {
actionManager = new ActionManager(this);
triggerManager = new TriggerManager(this);

guiManager = new GUIManager(this);

variablesManager.alreadyFullRegisteredVariables.addAll(variablesManager.getVariableIdentifiers());

commandManager.setupCommands();
Expand Down Expand Up @@ -282,6 +286,17 @@ public void onEnable() {

}


/**
* Loads all guis located in the gui folder
* Use this for refreshing guis after making changes in the gui files
*/
public void reloadGuis() {
guiService = new GuiService(this);
guiService.saveAllDefaultGuis();
guiService.loadAllGuis();
}

public void setupBStats() {
//bStats statistics
final int pluginId = 12824; // <- Plugin ID (on bstats)
Expand Down Expand Up @@ -564,4 +579,7 @@ public final NPCManager getNPCManager() {
return npcManager;
}

public GuiService getGuiService() {
return guiService;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@
import cloud.commandframework.bukkit.parsers.selector.SinglePlayerSelectorArgument;
import cloud.commandframework.meta.CommandMeta;
import cloud.commandframework.paper.PaperCommandManager;

import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

import com.gamingmesh.jobs.economy.PaymentData;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent;
Expand All @@ -49,6 +54,7 @@
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.spongepowered.configurate.ConfigurateException;
import rocks.gravili.notquests.paper.NotQuests;
import rocks.gravili.notquests.paper.commands.arguments.*;
import rocks.gravili.notquests.paper.commands.arguments.variables.BooleanVariableValueArgument;
Expand Down Expand Up @@ -618,13 +624,14 @@ public AdminCommands(final NotQuests main, PaperCommandManager<CommandSender> ma

main.getDataManager().loadGeneralConfig();
main.getLanguageManager().loadLanguageConfig(false);
main.reloadGuis();
if(main.getConversationManager() != null) {
main.getConversationManager().loadConversationsFromConfig();
}else{
context.getSender().sendMessage("<error> Loading conversations has been skipped: ConversationManager is null");
}
context.getSender().sendMessage(Component.empty());
context.getSender().sendMessage(main.parse("<success>NotQuests general.yml, language configuration and conversations have been re-loaded. <unimportant>If you want to reload more, please use the ServerUtils plugin (available on spigot) or restart the server. This reload command does not reload the quests file or the database."));
context.getSender().sendMessage(main.parse("<success>NotQuests general.yml, language configuration, guis and conversations have been re-loaded. <unimportant>If you want to reload more, please use the ServerUtils plugin (available on spigot) or restart the server. This reload command does not reload the quests file or the database."));
}));

manager.command(builder.literal("reload", "load")
Expand All @@ -645,6 +652,15 @@ public AdminCommands(final NotQuests main, PaperCommandManager<CommandSender> ma
context.getSender().sendMessage(main.parse("<success>Languages have been reloaded."));
}));

manager.command(builder.literal("reload", "load")
.literal("guis")
.meta(CommandMeta.DESCRIPTION, "Reload the guis from gui files.")
.handler((context) -> {
main.reloadGuis();
context.getSender().sendMessage(Component.empty());
context.getSender().sendMessage(main.parse("<success>Guis have been reloaded."));
}));

manager.command(builder.literal("reload", "load")
.literal("conversations")
.meta(CommandMeta.DESCRIPTION, "Reload the conversations from conversations files.")
Expand Down
Loading