mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-27 12:46:09 +01:00
Add missing javadocs.
This commit is contained in:
parent
4d5278b079
commit
3298183fdf
@ -44,7 +44,7 @@ public class CmdKick extends FCommand {
|
|||||||
Faction toKickFaction = toKick.getFaction();
|
Faction toKickFaction = toKick.getFaction();
|
||||||
|
|
||||||
// The PlayerEntityCollection only holds online players, this was a specific issue that kept happening.
|
// The PlayerEntityCollection only holds online players, this was a specific issue that kept happening.
|
||||||
if(toKickFaction.getTag().equalsIgnoreCase(TL.WILDERNESS.toString())) {
|
if (toKickFaction.getTag().equalsIgnoreCase(TL.WILDERNESS.toString())) {
|
||||||
sender.sendMessage("Something went wrong with getting the offline player's faction.");
|
sender.sendMessage("Something went wrong with getting the offline player's faction.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,10 @@ package com.massivecraft.factions.event;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event called when an FPlayer joins a Faction.
|
||||||
|
*/
|
||||||
public class FPlayerJoinEvent extends FactionPlayerEvent implements Cancellable {
|
public class FPlayerJoinEvent extends FactionPlayerEvent implements Cancellable {
|
||||||
|
|
||||||
PlayerJoinReason reason;
|
PlayerJoinReason reason;
|
||||||
@ -20,6 +21,11 @@ public class FPlayerJoinEvent extends FactionPlayerEvent implements Cancellable
|
|||||||
reason = r;
|
reason = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the reason the player joined the faction.
|
||||||
|
*
|
||||||
|
* @return reason player joined the faction.
|
||||||
|
*/
|
||||||
public PlayerJoinReason getReason() {
|
public PlayerJoinReason getReason() {
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@ package com.massivecraft.factions.event;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
public class FPlayerLeaveEvent extends FactionPlayerEvent implements Cancellable {
|
public class FPlayerLeaveEvent extends FactionPlayerEvent implements Cancellable {
|
||||||
|
|
||||||
@ -20,6 +18,11 @@ public class FPlayerLeaveEvent extends FactionPlayerEvent implements Cancellable
|
|||||||
reason = r;
|
reason = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the reason the player left the faction.
|
||||||
|
*
|
||||||
|
* @return reason player left the faction.
|
||||||
|
*/
|
||||||
public PlayerLeaveReason getReason() {
|
public PlayerLeaveReason getReason() {
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
@ -34,7 +37,7 @@ public class FPlayerLeaveEvent extends FactionPlayerEvent implements Cancellable
|
|||||||
if (reason == PlayerLeaveReason.DISBAND || reason == PlayerLeaveReason.RESET) {
|
if (reason == PlayerLeaveReason.DISBAND || reason == PlayerLeaveReason.RESET) {
|
||||||
cancelled = false; // Don't let them cancel factions disbanding.
|
cancelled = false; // Don't let them cancel factions disbanding.
|
||||||
} else {
|
} else {
|
||||||
cancelled = c;
|
cancelled = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,8 +8,11 @@ import org.bukkit.event.Cancellable;
|
|||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event called when a Faction is created.
|
||||||
|
*/
|
||||||
public class FactionCreateEvent extends Event implements Cancellable {
|
public class FactionCreateEvent extends Event implements Cancellable {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
private String factionTag;
|
private String factionTag;
|
||||||
|
@ -2,13 +2,13 @@ package com.massivecraft.factions.event;
|
|||||||
|
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.FPlayers;
|
import com.massivecraft.factions.FPlayers;
|
||||||
import com.massivecraft.factions.Faction;
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event called when a faction is disbanded.
|
||||||
|
*/
|
||||||
public class FactionDisbandEvent extends FactionEvent implements Cancellable {
|
public class FactionDisbandEvent extends FactionEvent implements Cancellable {
|
||||||
|
|
||||||
private boolean cancelled = false;
|
private boolean cancelled = false;
|
||||||
|
@ -4,6 +4,9 @@ import com.massivecraft.factions.Faction;
|
|||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an event involving a Faction.
|
||||||
|
*/
|
||||||
public class FactionEvent extends Event {
|
public class FactionEvent extends Event {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
@ -13,13 +16,19 @@ public class FactionEvent extends Event {
|
|||||||
this.faction = faction;
|
this.faction = faction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Faction involved in the event.
|
||||||
|
*
|
||||||
|
* @return faction involved in the event.
|
||||||
|
*/
|
||||||
public Faction getFaction() {
|
public Faction getFaction() {
|
||||||
return this.getFaction();
|
return this.faction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
public static HandlerList getHandlerList() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,9 @@ package com.massivecraft.factions.event;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an event involving a Faction and a FPlayer.
|
||||||
|
*/
|
||||||
public class FactionPlayerEvent extends FactionEvent {
|
public class FactionPlayerEvent extends FactionEvent {
|
||||||
|
|
||||||
private final FPlayer fPlayer;
|
private final FPlayer fPlayer;
|
||||||
|
@ -5,7 +5,9 @@ import com.massivecraft.factions.struct.Relation;
|
|||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event called when a Faction relation is called.
|
||||||
|
*/
|
||||||
public class FactionRelationEvent extends Event {
|
public class FactionRelationEvent extends Event {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
package com.massivecraft.factions.event;
|
package com.massivecraft.factions.event;
|
||||||
|
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
public class FactionRenameEvent extends FactionPlayerEvent implements Cancellable {
|
public class FactionRenameEvent extends FactionPlayerEvent implements Cancellable {
|
||||||
|
|
||||||
@ -17,16 +14,35 @@ public class FactionRenameEvent extends FactionPlayerEvent implements Cancellabl
|
|||||||
tag = newTag;
|
tag = newTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the player involved in the event.
|
||||||
|
*
|
||||||
|
* @return Player involved in the event.
|
||||||
|
*
|
||||||
|
* @deprecated use getfPlayer().getPlayer() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return getfPlayer().getPlayer();
|
return getfPlayer().getPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the faction tag before it was renamed.
|
||||||
|
*
|
||||||
|
* @return old faction tag.
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getTag() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getOldFactionTag() {
|
public String getOldFactionTag() {
|
||||||
return getFaction().getTag();
|
return getFaction().getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the new faction tag.
|
||||||
|
*
|
||||||
|
* @return new faction tag as String.
|
||||||
|
*/
|
||||||
public String getFactionTag() {
|
public String getFactionTag() {
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,10 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event called when an FPlayer claims land for a Faction.
|
||||||
|
*/
|
||||||
public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||||
|
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
@ -19,20 +20,46 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
|||||||
location = loc;
|
location = loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the FLocation involved in this event.
|
||||||
|
*
|
||||||
|
* @return the FLocation (also a chunk) involved in this event.
|
||||||
|
*/
|
||||||
public FLocation getLocation() {
|
public FLocation getLocation() {
|
||||||
return this.location;
|
return this.location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the id of the faction.
|
||||||
|
*
|
||||||
|
* @return id of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getId() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionId() {
|
public String getFactionId() {
|
||||||
return getFaction().getId();
|
return getFaction().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the tag of the faction.
|
||||||
|
*
|
||||||
|
* @return tag of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getTag() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionTag() {
|
public String getFactionTag() {
|
||||||
return getFaction().getTag();
|
return getFaction().getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Player involved in this event.
|
||||||
|
*
|
||||||
|
* @return player from FPlayer.
|
||||||
|
*
|
||||||
|
* @deprecated use getfPlayer().getPlayer() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return getfPlayer().getPlayer();
|
return getfPlayer().getPlayer();
|
||||||
|
@ -3,8 +3,6 @@ package com.massivecraft.factions.event;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
public class LandUnclaimAllEvent extends FactionPlayerEvent {
|
public class LandUnclaimAllEvent extends FactionPlayerEvent {
|
||||||
|
|
||||||
@ -12,16 +10,37 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent {
|
|||||||
super(f, p);
|
super(f, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the id of the faction.
|
||||||
|
*
|
||||||
|
* @return id of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getId() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionId() {
|
public String getFactionId() {
|
||||||
return getFaction().getId();
|
return getFaction().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the tag of the faction.
|
||||||
|
*
|
||||||
|
* @return tag of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getTag() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionTag() {
|
public String getFactionTag() {
|
||||||
return getFaction().getTag();
|
return getFaction().getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Player involved in the event.
|
||||||
|
*
|
||||||
|
* @return Player from FPlayer.
|
||||||
|
*
|
||||||
|
* @deprecated use getfPlayer().getPlayer() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return getfPlayer().getPlayer();
|
return getfPlayer().getPlayer();
|
||||||
|
@ -5,9 +5,10 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event called when an FPlayer unclaims land for a Faction.
|
||||||
|
*/
|
||||||
public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable {
|
public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||||
|
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
@ -23,16 +24,37 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
|
|||||||
return this.location;
|
return this.location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the id of the faction.
|
||||||
|
*
|
||||||
|
* @return id of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getId() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionId() {
|
public String getFactionId() {
|
||||||
return getFaction().getId();
|
return getFaction().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the tag of the faction.
|
||||||
|
*
|
||||||
|
* @return tag of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getTag() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionTag() {
|
public String getFactionTag() {
|
||||||
return getFaction().getTag();
|
return getFaction().getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Player involved in the event.
|
||||||
|
*
|
||||||
|
* @return Player from FPlayer.
|
||||||
|
*
|
||||||
|
* @deprecated use getfPlayer().getPlayer() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return getfPlayer().getPlayer();
|
return getfPlayer().getPlayer();
|
||||||
|
@ -4,9 +4,10 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event called when a player loses power.
|
||||||
|
*/
|
||||||
public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||||
|
|
||||||
private boolean cancelled = false;
|
private boolean cancelled = false;
|
||||||
@ -16,25 +17,56 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
|||||||
super(f, p);
|
super(f, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the id of the faction.
|
||||||
|
*
|
||||||
|
* @return id of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getId() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionId() {
|
public String getFactionId() {
|
||||||
return getFaction().getId();
|
return getFaction().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the tag of the faction.
|
||||||
|
*
|
||||||
|
* @return tag of faction as String
|
||||||
|
*
|
||||||
|
* @deprecated use getFaction().getTag() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getFactionTag() {
|
public String getFactionTag() {
|
||||||
return getFaction().getTag();
|
return getFaction().getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Player involved in the event.
|
||||||
|
*
|
||||||
|
* @return Player from FPlayer.
|
||||||
|
*
|
||||||
|
* @deprecated use getfPlayer().getPlayer() instead.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return getfPlayer().getPlayer();
|
return getfPlayer().getPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the power loss message.
|
||||||
|
*
|
||||||
|
* @return power loss message as String.
|
||||||
|
*/
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the power loss message.
|
||||||
|
*
|
||||||
|
* @param message
|
||||||
|
*/
|
||||||
public void setMessage(String message) {
|
public void setMessage(String message) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ import org.bukkit.potion.PotionEffect;
|
|||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.projectiles.ProjectileSource;
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user