From 365930f067fd5aad3d6bf1e59b92f507a783edd9 Mon Sep 17 00:00:00 2001 From: Eufranio Date: Fri, 8 Sep 2017 10:09:37 -0300 Subject: [PATCH] Fixed plugin ID and error when running the plugin on API5 --- .idea/modules/PixelBuilt-Quests_main.iml | 26 +++++++++---------- .idea/modules/PixelBuilt-Quests_test.iml | 2 +- PixelBuilt-Quests.iml | 2 +- build.gradle | 2 +- .../pixelbuilt/pbquests/PixelBuiltQuests.java | 4 +-- .../pixelbuilt/pbquests/utils/Config.java | 3 ++- .../resources/assets/pbquests/PBQuests.conf | 4 +-- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.idea/modules/PixelBuilt-Quests_main.iml b/.idea/modules/PixelBuilt-Quests_main.iml index 45c3196..b143c8a 100644 --- a/.idea/modules/PixelBuilt-Quests_main.iml +++ b/.idea/modules/PixelBuilt-Quests_main.iml @@ -1,5 +1,5 @@ - + @@ -20,26 +20,26 @@ - - - - - - - + + + - - - - + + + - + + + + + + \ No newline at end of file diff --git a/.idea/modules/PixelBuilt-Quests_test.iml b/.idea/modules/PixelBuilt-Quests_test.iml index e6d9d16..e48de9a 100644 --- a/.idea/modules/PixelBuilt-Quests_test.iml +++ b/.idea/modules/PixelBuilt-Quests_test.iml @@ -1,5 +1,5 @@ - + diff --git a/PixelBuilt-Quests.iml b/PixelBuilt-Quests.iml index 008517a..9b75547 100644 --- a/PixelBuilt-Quests.iml +++ b/PixelBuilt-Quests.iml @@ -1,5 +1,5 @@ - + diff --git a/build.gradle b/build.gradle index c28dbf0..18e205e 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { } group = 'online.pixelbuilt.pbquests' -version = '1.0' +version = '1.2' description = 'Quests plugin made for the PixelBuilt server' mainClassName = 'online.pixelbuilt.pbquests.PixelBuiltQuests' compileJava.options.encoding = 'UTF-8' diff --git a/src/main/java/online/pixelbuilt/pbquests/PixelBuiltQuests.java b/src/main/java/online/pixelbuilt/pbquests/PixelBuiltQuests.java index efe4632..dc160b8 100644 --- a/src/main/java/online/pixelbuilt/pbquests/PixelBuiltQuests.java +++ b/src/main/java/online/pixelbuilt/pbquests/PixelBuiltQuests.java @@ -23,8 +23,8 @@ * Created by Frani on 05/09/2017. */ -@Plugin(name = "PixelBuilt Quests", - id = "pbquests", +@Plugin(name = "PixelBuiltQuests", + id = "pixelbuilt-quests", authors = { "Eufranio" }) public class PixelBuiltQuests { diff --git a/src/main/java/online/pixelbuilt/pbquests/utils/Config.java b/src/main/java/online/pixelbuilt/pbquests/utils/Config.java index 62ed605..1ffa712 100644 --- a/src/main/java/online/pixelbuilt/pbquests/utils/Config.java +++ b/src/main/java/online/pixelbuilt/pbquests/utils/Config.java @@ -12,6 +12,7 @@ import org.spongepowered.api.block.BlockType; import org.spongepowered.api.block.BlockTypes; import org.spongepowered.api.data.DataContainer; +import org.spongepowered.api.data.MemoryDataContainer; import org.spongepowered.api.data.persistence.DataFormats; import org.spongepowered.api.data.persistence.DataTranslators; import org.spongepowered.api.item.ItemType; @@ -61,7 +62,7 @@ public void load() { // Loading data if(!dataFile.toFile().exists()) { try (OutputStream os = Files.newOutputStream(dataFile)) { - DataFormats.NBT.writeTo(os, DataContainer.createNew()); + DataFormats.NBT.writeTo(os, new MemoryDataContainer()); } catch (IOException e) { e.printStackTrace(); } } diff --git a/src/main/resources/assets/pbquests/PBQuests.conf b/src/main/resources/assets/pbquests/PBQuests.conf index fef9386..5138306 100644 --- a/src/main/resources/assets/pbquests/PBQuests.conf +++ b/src/main/resources/assets/pbquests/PBQuests.conf @@ -10,8 +10,8 @@ triggers=[ ] quests { - default { - 1 { + default { // Quest line + 1 { // Quest ID requiredItem="minecraft:map" denyMovement: true progressRequired: 1