Added quest start, complete, and turnin events, and a faction points event to scripted player events.

This commit is contained in:
luisc committed 2022-01-12 20:12:16 -06:00
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));