diff --git a/build.gradle.kts b/build.gradle.kts index 9932858ef..b85ec3d7b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,7 @@ plugins { group = "rocks.gravili.notquests" -version = "5.8.1" +version = "5.8.2" repositories { diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 29bcaba9d..b348b5049 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -163,7 +163,9 @@ dependencies { //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("net.citizensnpcs:citizens-main:2.0.30-SNAPSHOT") + compileOnly(files("libs/citizens-2.0.30-8.jar")) + compileOnly("me.clip:placeholderapi:2.11.2") compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") diff --git a/paper/libs/citizens-2.0.30-8.jar b/paper/libs/citizens-2.0.30-8.jar new file mode 100644 index 000000000..50a4daff5 Binary files /dev/null and b/paper/libs/citizens-2.0.30-8.jar differ diff --git a/paper/src/main/java/rocks/gravili/notquests/paper/managers/DataManager.java b/paper/src/main/java/rocks/gravili/notquests/paper/managers/DataManager.java index 310ef490f..809efc64c 100644 --- a/paper/src/main/java/rocks/gravili/notquests/paper/managers/DataManager.java +++ b/paper/src/main/java/rocks/gravili/notquests/paper/managers/DataManager.java @@ -1522,7 +1522,10 @@ private void migrationAddProfileColumns(final Statement statement, final String try{ statement.executeUpdate(query); - }catch (Exception ignored){ + }catch (Exception e){ + if(main.getConfiguration().debug){ + e.printStackTrace(); + } } } @@ -1545,7 +1548,7 @@ private void migrateActiveObjectivesTable(final Statement statement) throws SQLE CREATE TABLE `ActiveObjectives` (`ObjectiveType` varchar(200), `QuestName` varchar(200), `PlayerUUID` varchar(200), `CurrentProgress` DOUBLE, `ObjectiveID` INT(255), `HasBeenCompleted` BOOLEAN, `ProgressNeeded` DOUBLE, `Profile` varchar(200)) """); statement.executeUpdate(""" - INSERT INTO ActiveObjectives (ObjectiveType,QuestName,PlayerUUID,CurrentProgress,ObjectiveID,HasBeenCompleted,ProgressNeeded,Profile) SELECT ObjectiveType,QuestName,PlayerUUID,CurrentProgress,ObjectiveID,HasBeenCompleted,ProgressNeeded FROM ActiveObjectivesOld + INSERT INTO ActiveObjectives (ObjectiveType,QuestName,PlayerUUID,CurrentProgress,ObjectiveID,HasBeenCompleted,ProgressNeeded,Profile) VALUES ((SELECT ObjectiveType FROM ActiveObjectivesOld), (SELECT QuestName FROM ActiveObjectivesOld), (SELECT PlayerUUID FROM ActiveObjectivesOld), (SELECT CurrentProgress FROM ActiveObjectivesOld), (SELECT ObjectiveID FROM ActiveObjectivesOld), (SELECT HasBeenCompleted FROM ActiveObjectivesOld), (SELECT ProgressNeeded FROM ActiveObjectivesOld), 'default') """); statement.executeUpdate(""" DROP TABLE ActiveObjectivesOld @@ -1562,7 +1565,7 @@ private void migrateQuestPlayerDataTable(final Statement statement) throws SQLEx CREATE TABLE `QuestPlayerData` (`PlayerUUID` varchar(200), `QuestPoints` BIGINT(255), `Profile` varchar(200)) """); statement.executeUpdate(""" - INSERT INTO QuestPlayerData (PlayerUUID,QuestPoints,Profile) SELECT PlayerUUID,QuestPoints,Profile FROM QuestPlayerDataOld + INSERT INTO QuestPlayerData (PlayerUUID,QuestPoints,Profile) VALUES( (SELECT PlayerUUID FROM QuestPlayerDataOld),(SELECT QuestPoints FROM QuestPlayerDataOld), (SELECT Profile FROM QuestPlayerDataOld) ) """); statement.executeUpdate(""" DROP TABLE QuestPlayerDataOld @@ -1611,12 +1614,12 @@ private void reloadDataInternal() { //Migrations - migrationAddProfileColumns(statement, "ALTER TABLE QuestPlayerData ADD COLUMN `Profile` VARCHAR NOT NULL DEFAULT 'default'"); - migrationAddProfileColumns(statement, "ALTER TABLE ActiveQuests ADD COLUMN `Profile` VARCHAR NOT NULL DEFAULT 'default'"); - migrationAddProfileColumns(statement, "ALTER TABLE CompletedQuests ADD COLUMN `Profile` VARCHAR NOT NULL DEFAULT 'default'"); - migrationAddProfileColumns(statement, "ALTER TABLE ActiveObjectives ADD COLUMN `Profile` VARCHAR NOT NULL DEFAULT 'default'"); - migrationAddProfileColumns(statement, "ALTER TABLE ActiveTriggers ADD COLUMN `Profile` VARCHAR NOT NULL DEFAULT 'default'"); - migrationAddProfileColumns(statement, "ALTER TABLE Tags ADD COLUMN `Profile` VARCHAR NOT NULL DEFAULT 'default'"); + migrationAddProfileColumns(statement, "ALTER TABLE QuestPlayerData ADD COLUMN `Profile` VARCHAR(200) NOT NULL DEFAULT 'default'"); + migrationAddProfileColumns(statement, "ALTER TABLE ActiveQuests ADD COLUMN `Profile` VARCHAR(200) NOT NULL DEFAULT 'default'"); + migrationAddProfileColumns(statement, "ALTER TABLE CompletedQuests ADD COLUMN `Profile` VARCHAR(200) NOT NULL DEFAULT 'default'"); + migrationAddProfileColumns(statement, "ALTER TABLE ActiveObjectives ADD COLUMN `Profile` VARCHAR(200) NOT NULL DEFAULT 'default'"); + migrationAddProfileColumns(statement, "ALTER TABLE ActiveTriggers ADD COLUMN `Profile` VARCHAR(200) NOT NULL DEFAULT 'default'"); + migrationAddProfileColumns(statement, "ALTER TABLE Tags ADD COLUMN `Profile` VARCHAR(200) NOT NULL DEFAULT 'default'"); if(hasToMigrateQuestPlayerDataTable){ migrateQuestPlayerDataTable(statement); diff --git a/spigot/build.gradle.kts b/spigot/build.gradle.kts index 5d34e8796..6d32ed0da 100644 --- a/spigot/build.gradle.kts +++ b/spigot/build.gradle.kts @@ -157,7 +157,8 @@ dependencies { //implementation(files("libs/InventoryGui.jar")) compileOnly("org.spigotmc:spigot-api:1.19.2-R0.1-SNAPSHOT") - compileOnly("net.citizensnpcs:citizens-main:2.0.30-SNAPSHOT") + //compileOnly("net.citizensnpcs:citizens-main:2.0.30-SNAPSHOT") + compileOnly(files("libs/citizens-2.0.30-8.jar")) compileOnly("me.clip:placeholderapi:2.11.2") compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") diff --git a/spigot/libs/citizens-2.0.30-8.jar b/spigot/libs/citizens-2.0.30-8.jar new file mode 100644 index 000000000..50a4daff5 Binary files /dev/null and b/spigot/libs/citizens-2.0.30-8.jar differ