mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-25 02:28:12 +01:00
Revert "Fix Custom Rewards"
This commit is contained in:
parent
4b9a908f48
commit
2895af35b9
Binary file not shown.
11
pom.xml
11
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<version>2.5.2</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
@ -74,15 +74,14 @@
|
||||
<dependency>
|
||||
<groupId>net.citizensnpcs</groupId>
|
||||
<artifactId>citizens</artifactId>
|
||||
<version>2.0.16-SNAPSHOT</version>
|
||||
<version>2.0.14-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.aufdemrand</groupId>
|
||||
<artifactId>denizen</artifactId>
|
||||
<version>0.9.7-SNAPSHOT</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/denizen-0.9.7-SNAPSHOT.jar</systemPath>
|
||||
<version>0.9.6-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
@ -127,7 +126,7 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>Quests-${project.version}</finalName>
|
||||
<finalName>Quests-${project.version}-b${env.BUILD_NUMBER}</finalName>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
|
@ -219,10 +219,9 @@ public abstract class CustomObjective implements Listener {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1884,8 +1884,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
}
|
||||
|
||||
if (q.customRewards.isEmpty() == false) {
|
||||
cc.setSessionData(CK.REW_CUSTOM, new LinkedList<String>(q.customRewards.keySet()));
|
||||
cc.setSessionData(CK.REW_CUSTOM_DATA, new LinkedList<Object>(q.customRewards.values()));
|
||||
cc.setSessionData(CK.REW_CUSTOM, q.customRewards);
|
||||
}
|
||||
//
|
||||
|
||||
|
@ -672,17 +672,6 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
count++;
|
||||
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.customObjectiveCounts.add(count);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -164,9 +164,7 @@ public class ItemUtil implements ColorUtil {
|
||||
public static String getDisplayString(ItemStack is) {
|
||||
|
||||
String text;
|
||||
if (is == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount();
|
||||
} else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: Quests
|
||||
main: me.blackvein.quests.Quests
|
||||
version: ${project.version}
|
||||
version: ${project.version}-b${env.BUILD_NUMBER}
|
||||
description: Player questing system
|
||||
website: http://dev.bukkit.org/server-mods/quests/
|
||||
dev-url: https://github.com/Blackvein/Quests/
|
||||
|
Loading…
Reference in New Issue
Block a user