Add faction votes

This commit is contained in:
Magnus Ulf
2019-01-19 19:27:54 +01:00
parent 1157607397
commit 7171d43a2a
19 changed files with 573 additions and 6 deletions

View File

@@ -0,0 +1,40 @@
package com.massivecraft.factions.event;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.Vote;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
public class EventFactionsVoteAdd extends EventFactionsAbstractSender
{
// -------------------------------------------- //
// REQUIRED EVENT CODE
// -------------------------------------------- //
private static final HandlerList handlers = new HandlerList();
@Override public HandlerList getHandlers() { return handlers; }
public static HandlerList getHandlerList() { return handlers; }
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
private final Faction faction;
public Faction getFaction() { return this.faction; }
private Vote vote;
public Vote getVote() { return this.vote; }
public void setVote(Vote vote) { this.vote = vote; }
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public EventFactionsVoteAdd(CommandSender sender, Faction faction, Vote vote)
{
super(sender);
this.faction = faction;
this.vote = vote;
}
}

View File

@@ -0,0 +1,40 @@
package com.massivecraft.factions.event;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.Vote;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
public class EventFactionsVoteRemove extends EventFactionsAbstractSender
{
// -------------------------------------------- //
// REQUIRED EVENT CODE
// -------------------------------------------- //
private static final HandlerList handlers = new HandlerList();
@Override public HandlerList getHandlers() { return handlers; }
public static HandlerList getHandlerList() { return handlers; }
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
private final Faction faction;
public Faction getFaction() { return this.faction; }
private Vote vote;
public Vote getVote() { return this.vote; }
public void setVote(Vote vote) { this.vote = vote; }
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public EventFactionsVoteRemove(CommandSender sender, Faction faction, Vote vote)
{
super(sender);
this.faction = faction;
this.vote = vote;
}
}

View File

@@ -23,8 +23,8 @@ public class EventFactionsWarpRemove extends EventFactionsAbstractSender
public Faction getFaction() { return this.faction; }
private Warp warp;
public Warp getNewWarp() { return this.warp; }
public void setNewWarp(Warp warp) { this.warp = warp; }
public Warp getWarp() { return this.warp; }
public void setWarp(Warp warp) { this.warp = warp; }
// -------------------------------------------- //
// CONSTRUCT