Revert "Fix Custom Rewards"

This commit is contained in:
FlyingPikachu 2015-11-18 11:11:46 -05:00
parent 4b9a908f48
commit 2895af35b9
7 changed files with 22 additions and 25 deletions

Binary file not shown.

11
pom.xml
View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId> <artifactId>quests</artifactId>
<version>2.5.3</version> <version>2.5.2</version>
<name>quests</name> <name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url> <url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging> <packaging>jar</packaging>
@ -74,15 +74,14 @@
<dependency> <dependency>
<groupId>net.citizensnpcs</groupId> <groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId> <artifactId>citizens</artifactId>
<version>2.0.16-SNAPSHOT</version> <version>2.0.14-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.aufdemrand</groupId> <groupId>net.aufdemrand</groupId>
<artifactId>denizen</artifactId> <artifactId>denizen</artifactId>
<version>0.9.7-SNAPSHOT</version> <version>0.9.6-SNAPSHOT</version>
<scope>system</scope> <scope>provided</scope>
<systemPath>${project.basedir}/lib/denizen-0.9.7-SNAPSHOT.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.milkbowl.vault</groupId> <groupId>net.milkbowl.vault</groupId>
@ -127,7 +126,7 @@
</dependencies> </dependencies>
<build> <build>
<finalName>Quests-${project.version}</finalName> <finalName>Quests-${project.version}-b${env.BUILD_NUMBER}</finalName>
<resources> <resources>
<resource> <resource>

View File

@ -219,10 +219,9 @@ public abstract class CustomObjective implements Listener {
return false; return false;
} }
return true;
} }
return false; return true;
} }
} }

View File

@ -1884,8 +1884,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
} }
if (q.customRewards.isEmpty() == false) { if (q.customRewards.isEmpty() == false) {
cc.setSessionData(CK.REW_CUSTOM, new LinkedList<String>(q.customRewards.keySet())); cc.setSessionData(CK.REW_CUSTOM, q.customRewards);
cc.setSessionData(CK.REW_CUSTOM_DATA, new LinkedList<Object>(q.customRewards.values()));
} }
// //

View File

@ -672,17 +672,6 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
count++; count++;
getLogger().info("Loaded Module: " + name + " by " + author); getLogger().info("Loaded Module: " + name + " by " + author);
try {
getServer().getPluginManager().registerEvents(objective, this);
getLogger().info("Registered events for custom objective \"" + name + "\"");
} catch (Exception ex) {
getLogger().warning("Failed to register events for custom objective \"" + name + "\". Does the objective class listen for events?");
if (debug) {
getLogger().warning("Error log:");
ex.printStackTrace();
}
}
} }
} }
@ -4214,6 +4203,19 @@ try{
oStage.customObjectives.add(found); oStage.customObjectives.add(found);
oStage.customObjectiveCounts.add(count); oStage.customObjectiveCounts.add(count);
oStage.customObjectiveData.add(data); oStage.customObjectiveData.add(data);
try {
getServer().getPluginManager().registerEvents(found, this);
} catch (Exception e) {
getLogger().warning("Failed to register events for custom objective \"" + name + "\" in Stage " + s2 + " of Quest \"" + quest.name + "\". Does the objective class listen for events?");
if (debug) {
getLogger().warning("Error log:");
e.printStackTrace();
}
}
} }
} }

View File

@ -164,9 +164,7 @@ public class ItemUtil implements ColorUtil {
public static String getDisplayString(ItemStack is) { public static String getDisplayString(ItemStack is) {
String text; String text;
if (is == null) {
return null;
}
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) { if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount(); text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount();
} else { } else {

View File

@ -1,6 +1,6 @@
name: Quests name: Quests
main: me.blackvein.quests.Quests main: me.blackvein.quests.Quests
version: ${project.version} version: ${project.version}-b${env.BUILD_NUMBER}
description: Player questing system description: Player questing system
website: http://dev.bukkit.org/server-mods/quests/ website: http://dev.bukkit.org/server-mods/quests/
dev-url: https://github.com/Blackvein/Quests/ dev-url: https://github.com/Blackvein/Quests/