mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 01:45:07 +00:00
Added quest start, complete, and turnin events, and a faction points event to scripted player events.
This commit is contained in:
1 parent
8919a182c5
commit
b024f800ae
9 files changed
+152
-20
No files matched your search
@@ -4,6 +4,7 @@ import java.util.Vector;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.Server;
|
||||
import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.constants.EnumQuestRepeat;
|
||||
@@ -30,6 +31,10 @@ public class PlayerQuestController {
|
||||
public static void addActiveQuest(Quest quest, EntityPlayer player) {
|
||||
PlayerQuestData data = PlayerDataController.instance.getPlayerData(player).questData;
|
||||
if(canQuestBeAccepted(quest, player)){
|
||||
if (EventHooks.onQuestStarted(player, quest)) {
|
||||
return;
|
||||
}
|
||||
|
||||
data.activeQuests.put(quest.id,new QuestData(quest));
|
||||
Server.sendData((EntityPlayerMP)player, EnumPacketClient.MESSAGE, "quest.newquest", quest.title);
|
||||
Server.sendData((EntityPlayerMP)player, EnumPacketClient.CHAT, "quest.newquest", ": ", quest.title);
|
||||
|
||||
Reference in new issue
Block a user