-
Notifications
You must be signed in to change notification settings - Fork 5
/
CraftizenDataSource.java
43 lines (25 loc) · 1.14 KB
/
CraftizenDataSource.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import java.util.HashSet;
import java.util.ArrayList;
import java.util.HashMap;
public abstract class CraftizenDataSource {
protected static Object dbLock = new Object();
protected static Object craftizenLock = new Object();
protected static Object questLock = new Object();
abstract HashSet<Craftizen> loadCraftizens();
abstract void saveCraftizen(Craftizen c);
abstract void addCraftizenDialog(String npcid, String dialogid, String dialog);
void deleteCraftizen(Craftizen c) {
deleteCraftizen(c.getId());
}
abstract void deleteCraftizen(String id);
abstract ArrayList<String> getQuestList();
abstract QuestInfo loadQuestInfo(String id);
abstract ArrayList<QuestInfo> getAvailableQuests(Craftizen c, Player p);
abstract HashMap<QuestInfo,String> getActiveQuests(Player p);
abstract void saveActiveQuest(Player player, Quest quest);
abstract void saveQuestProgress(Player player, Quest quest, String progress);
abstract void dropActiveQuest(Player player, Quest quest);
abstract void saveCompletedQuest(Player player, Quest quest);
abstract void saveQuest(QuestInfo quest);
abstract void deleteQuest(String questid);
}