mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-25 03:55:35 +01:00
Begun mcMMO requirement support
This commit is contained in:
parent
112fc7bc3d
commit
2f73f6f6cc
BIN
lib/Vault.jar
Executable file → Normal file
BIN
lib/Vault.jar
Executable file → Normal file
Binary file not shown.
8
pom.xml
8
pom.xml
@ -26,10 +26,6 @@
|
||||
<id>denizens-repo</id>
|
||||
<url>http://repo.citizensnpcs.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
|
||||
@ -52,7 +48,9 @@
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>Vault</artifactId>
|
||||
<version>1.2.22-SNAPSHOT</version>
|
||||
<version>1.2.27</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/Vault.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package me.blackvein.quests;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@ -34,6 +35,8 @@ public class Quest {
|
||||
List<String> neededQuests = new LinkedList<String>();
|
||||
List<String> blockQuests = new LinkedList<String>();
|
||||
List<String> permissionReqs = new LinkedList<String>();
|
||||
List<String> mcMMOSkillReqs = new LinkedList<String>();
|
||||
List<Integer> mcMMOAmountReqs = new LinkedList<Integer>();
|
||||
public String failRequirements = null;
|
||||
//
|
||||
//Rewards
|
||||
@ -174,6 +177,15 @@ public class Quest {
|
||||
|
||||
}
|
||||
|
||||
for(String s : mcMMOSkillReqs) {
|
||||
|
||||
final SkillType st = Quests.getMcMMOSkill(s);
|
||||
final int lvl = mcMMOAmountReqs.get(mcMMOSkillReqs.indexOf(s));
|
||||
if(UserManager.getPlayer(player).getProfile().getSkillLevel(st) < lvl)
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
if (quester.questPoints < questPointsReq) {
|
||||
return false;
|
||||
}
|
||||
@ -454,6 +466,14 @@ public class Quest {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (other.mcMMOSkillReqs.equals(mcMMOSkillReqs) == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (other.mcMMOAmountReqs.equals(mcMMOAmountReqs) == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (other.questPoints != questPoints) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user