mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 01:24:09 +00:00
54 lines
1.4 KiB
Java
54 lines
1.4 KiB
Java
package noppes.npcs.scripted.event;
|
|
|
|
import cpw.mods.fml.common.eventhandler.Cancelable;
|
|
import noppes.npcs.api.entity.IPlayer;
|
|
import noppes.npcs.api.event.IFactionEvent;
|
|
import noppes.npcs.api.handler.data.IFaction;
|
|
import noppes.npcs.constants.EnumScriptType;
|
|
|
|
public class FactionEvent extends CustomNPCsEvent implements IFactionEvent {
|
|
public final IFaction faction;
|
|
public final IPlayer player;
|
|
|
|
public FactionEvent(IPlayer player, IFaction faction){
|
|
this.faction = faction;
|
|
this.player = player;
|
|
}
|
|
|
|
public IPlayer getPlayer() {
|
|
return player;
|
|
}
|
|
|
|
public IFaction getFaction() {
|
|
return faction;
|
|
}
|
|
|
|
public String getHookName() {
|
|
return EnumScriptType.FACTION_EVENT.function;
|
|
}
|
|
|
|
@Cancelable
|
|
public static class FactionPoints extends FactionEvent implements IFactionEvent.FactionPoints {
|
|
public boolean decrease;
|
|
public int points;
|
|
|
|
public FactionPoints(IPlayer player, IFaction faction, boolean decrease, int points) {
|
|
super(player, faction);
|
|
this.decrease = decrease;
|
|
this.points = points;
|
|
}
|
|
|
|
public String getHookName() {
|
|
return EnumScriptType.FACTION_POINTS.function;
|
|
}
|
|
|
|
public boolean decreased() {
|
|
return decrease;
|
|
}
|
|
|
|
public int getPoints() {
|
|
return points;
|
|
}
|
|
}
|
|
}
|