mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-25 12:15:59 +01:00
Unstable commit (unfinished)
This commit is contained in:
parent
35244379a5
commit
d1c7a169e6
@ -73,16 +73,22 @@ public class PlayerListener implements Listener {
|
||||
quester.currentStage = q.stages.getFirst();
|
||||
quester.addEmpties();
|
||||
quester.isTalking = false;
|
||||
if(q.moneyReq > 0){
|
||||
if (q.moneyReq > 0) {
|
||||
Quests.economy.withdrawPlayer(quester.name, q.moneyReq);
|
||||
}
|
||||
player.sendMessage(ChatColor.GREEN + "Quest accepted: " + q.name);
|
||||
player.sendMessage("");
|
||||
player.sendMessage(ChatColor.GOLD + "---(Objectives)---");
|
||||
for(String s : quester.getObjectives()){
|
||||
player.sendMessage(s);
|
||||
|
||||
for(int i : q.itemIds){
|
||||
if (q.removeItems.get(q.itemIds.indexOf(i)) == true)
|
||||
Quests.removeItem(player.getInventory(), Material.getMaterial(i), q.itemAmounts.get(q.itemIds.indexOf(i)));
|
||||
}
|
||||
|
||||
player.sendMessage(ChatColor.GREEN + "Quest accepted: " + q.name);
|
||||
player.sendMessage("");
|
||||
player.sendMessage(ChatColor.GOLD + "---(Objectives)---");
|
||||
for (String s : quester.getObjectives()) {
|
||||
player.sendMessage(s);
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
player.sendMessage(q.failRequirements);
|
||||
|
@ -578,8 +578,9 @@ public class Quests extends JavaPlugin {
|
||||
}
|
||||
|
||||
for(int i : quest.itemIds){
|
||||
if (quest.removeItems.get(quest.itemIds.indexOf(i)) == true)
|
||||
if (quest.removeItems.get(quest.itemIds.indexOf(i)) == true){
|
||||
removeItem(((Player) sender).getInventory(), Material.getMaterial(i), quest.itemAmounts.get(quest.itemIds.indexOf(i)));
|
||||
}
|
||||
}
|
||||
|
||||
sender.sendMessage(ChatColor.GREEN + "Quest accepted: " + quest.name);
|
||||
|
Loading…
Reference in New Issue
Block a user