mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 01:02:19 +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
@@ -1,8 +1,12 @@
|
||||
package noppes.npcs.controllers;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.scripted.entity.ScriptPlayer;
|
||||
import noppes.npcs.scripted.event.FactionEvent;
|
||||
|
||||
public class FactionOptions {
|
||||
|
||||
@@ -55,7 +59,9 @@ public class FactionOptions {
|
||||
Faction faction = FactionController.getInstance().get(factionId);
|
||||
if(faction == null)
|
||||
return;
|
||||
|
||||
|
||||
EventHooks.onFactionPoints(new FactionEvent.FactionPoints(new ScriptPlayer((EntityPlayerMP) player), faction, decrease, points));
|
||||
|
||||
if(!faction.hideFaction){
|
||||
String message = decrease?"faction.decreasepoints":"faction.increasepoints";
|
||||
player.addChatMessage(new ChatComponentTranslation(message, faction.name, points));
|
||||
|
||||
Reference in new issue
Block a user