mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 21:57:40 +00:00
API Changes:
-Implemented interfaces for all jobs & roles. ScriptPlayer: -Added getData() function, which returns player data objects. IPlayerData: New class that holds all player data for modification. -Holds dialog, bank, quest, transport, faction, item giver, and mail data. -Also holds companion data, with functions has/set/getCompanion, and a getCompanionID function to differentiate companions.
This commit is contained in:
1 parent
587f63396f
commit
63a1525ee2
66 files changed
+1418
-207
No files matched your search
@@ -44,6 +44,7 @@ import noppes.npcs.scripted.ScriptPixelmonPlayerData;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.gui.ScriptGui;
|
||||
import noppes.npcs.scripted.interfaces.IParticle;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerData;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.interfaces.IBlock;
|
||||
import noppes.npcs.scripted.interfaces.IContainer;
|
||||
@@ -557,7 +558,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
return player.isBlocking();
|
||||
}
|
||||
|
||||
private PlayerData getData() {
|
||||
public PlayerData getData() {
|
||||
if (this.data == null) {
|
||||
this.data = PlayerDataController.instance.getPlayerData(player);
|
||||
}
|
||||
@@ -566,7 +567,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
}
|
||||
|
||||
public IQuest[] getActiveQuests() {
|
||||
PlayerQuestData data = this.getData().questData;
|
||||
PlayerQuestData data = (PlayerQuestData) this.getData().getQuestData();
|
||||
List<IQuest> quests = new ArrayList();
|
||||
Iterator var3 = data.activeQuests.keySet().iterator();
|
||||
|
||||
|
||||
Reference in new issue
Block a user