Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.BanEntry Interface Reference

Public Member Functions

String getTarget ()
 
Date getCreated ()
 
void setCreated (Date created)
 
String getSource ()
 
void setSource (String source)
 
Date getExpiration ()
 
void setExpiration (Date expiration)
 
String getReason ()
 
void setReason (String reason)
 
void save ()
 

Detailed Description

A single entry from a ban list. This may represent either a player ban or an IP ban.

Ban entries include the following properties:

Property Description
Target Name / IP Address The target name or IP address
Creation Date The creation date of the ban
Source The source of the ban, such as a player, console, plugin, etc
Expiration Date The expiration date of the ban
Reason The reason for the ban

Unsaved information is not automatically written to the implementation's ban list, instead, the save() method must be called to write the changes to the ban list. If this ban entry has expired (such as from an unban) and is no longer found in the list, the save() call will re-add it to the list, therefore banning the victim specified.

Likewise, changes to the associated BanList or other entries may or may not be reflected in this entry.

Definition at line 41 of file BanEntry.java.

Member Function Documentation

Date org.bukkit.BanEntry.getCreated ( )

Gets the date this ban entry was created.

Returns
the creation date
Date org.bukkit.BanEntry.getExpiration ( )

Gets the date this ban expires on, or null for no defined end date.

Returns
the expiration date
String org.bukkit.BanEntry.getReason ( )

Gets the reason for this ban.

Returns
the ban reason, or null if not set
String org.bukkit.BanEntry.getSource ( )

Gets the source of this ban.

Note: A source is considered any String, although this is generally a player name.

Returns
the source of the ban
String org.bukkit.BanEntry.getTarget ( )

Gets the target involved. This may be in the form of an IP or a player name.

Returns
the target name or IP address
void org.bukkit.BanEntry.save ( )

Saves the ban entry, overwriting any previous data in the ban list.

Saving the ban entry of an unbanned player will cause the player to be banned once again.

void org.bukkit.BanEntry.setCreated ( Date  created)

Sets the date this ban entry was created.

Parameters
createdthe new created date, cannot be null
See also
save() saving changes
void org.bukkit.BanEntry.setExpiration ( Date  expiration)

Sets the date this ban expires on. Null values are considered "infinite" bans.

Parameters
expirationthe new expiration date, or null to indicate an eternity
See also
save() saving changes
void org.bukkit.BanEntry.setReason ( String  reason)

Sets the reason for this ban. Reasons must not be null.

Parameters
reasonthe new reason, null values assume the implementation default
See also
save() saving changes
void org.bukkit.BanEntry.setSource ( String  source)

Sets the source of this ban.

Note: A source is considered any String, although this is generally a player name.

Parameters
sourcethe new source where null values become empty strings
See also
save() saving changes

The documentation for this interface was generated from the following file: