This commit is contained in:
Blackvein 2012-11-06 15:26:02 -08:00
parent 13a88b7022
commit 5803acdba9
3 changed files with 11 additions and 7 deletions

View File

@ -26,7 +26,6 @@ import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerFishEvent.State; import org.bukkit.event.player.PlayerFishEvent.State;
import org.bukkit.event.player.*; import org.bukkit.event.player.*;
import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;

View File

@ -444,6 +444,7 @@ public class Quester {
for (Entry e : currentStage.itemsToCraft.entrySet()) { for (Entry e : currentStage.itemsToCraft.entrySet()) {
System.out.println("Entry.");
for (Entry e2 : itemsCrafted.entrySet()) { for (Entry e2 : itemsCrafted.entrySet()) {
if (e.getKey().equals(e2.getKey())) { if (e.getKey().equals(e2.getKey())) {

View File

@ -25,7 +25,9 @@ import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.*; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
@ -152,11 +154,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
public void run() { public void run() {
loadQuests(); loadQuests();
log.log(Level.INFO, "[Quests] " + quests.size() + " Quest(s) loaded."); log.log(Level.INFO, "[Quests] " + quests.size() + " Quest(s) loaded.");
questers = getOnlineQuesters();
} }
}, 5L); }, 5L);
questers = getOnlineQuesters();
} }
@Override @Override
@ -1292,12 +1293,15 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
Quester quester = new Quester(this); Quester quester = new Quester(this);
quester.name = p.getName(); quester.name = p.getName();
if (new File(getDataFolder(), "data/" + quester.name + ".yml").exists()) { if (quester.loadData() == false) {
quester.loadData(); System.out.println("Saving data.");
} else {
quester.saveData(); quester.saveData();
} else {
System.out.println("Loaded data.");
} }
qs.put(p.getName(), quester); qs.put(p.getName(), quester);
System.out.println("Quester: " + quester.name);
System.out.println("Current Quest: " + quester.currentQuest.name);
} }