Dammit, line endings!

This commit is contained in:
Dinnerbone 2011-04-21 15:27:18 +01:00
parent 8cd170a819
commit df18fad33f
4 changed files with 247 additions and 247 deletions

View File

@ -1,42 +1,42 @@
package org.bukkit; package org.bukkit;
/** /**
* A delegate for handling block changes. This serves as a direct interface * A delegate for handling block changes. This serves as a direct interface
* between generation algorithms in the server implementation and utilizing * between generation algorithms in the server implementation and utilizing
* code. * code.
* *
* @author sk89q * @author sk89q
*/ */
public interface BlockChangeDelegate { public interface BlockChangeDelegate {
/** /**
* Set a block type at the specified coordinates. * Set a block type at the specified coordinates.
* *
* @param x * @param x
* @param y * @param y
* @param z * @param z
* @param typeId * @param typeId
* @return true if the block was set successfully * @return true if the block was set successfully
*/ */
public boolean setRawTypeId(int x, int y, int z, int typeId); public boolean setRawTypeId(int x, int y, int z, int typeId);
/** /**
* Set a block type and data at the specified coordinates. * Set a block type and data at the specified coordinates.
* *
* @param x * @param x
* @param y * @param y
* @param z * @param z
* @param typeId * @param typeId
* @param data * @param data
* @return true if the block was set successfully * @return true if the block was set successfully
*/ */
public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data);
/** /**
* Get the block type at the location. * Get the block type at the location.
* @param x * @param x
* @param y * @param y
* @param z * @param z
* @return * @return
*/ */
public int getTypeId(int x, int y, int z); public int getTypeId(int x, int y, int z);
} }

View File

@ -1,50 +1,50 @@
package org.bukkit.event.player; package org.bukkit.event.player;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
/** /**
* This event is fired when the player is almost about to enter the bed. * This event is fired when the player is almost about to enter the bed.
* It can be cancelled. * It can be cancelled.
* *
* @author sk89q * @author sk89q
*/ */
public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable { public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
private boolean cancel = false; private boolean cancel = false;
private Block bed; private Block bed;
public PlayerBedEnterEvent(Player who, Block bed) { public PlayerBedEnterEvent(Player who, Block bed) {
super(Type.PLAYER_BED_ENTER, who); super(Type.PLAYER_BED_ENTER, who);
this.bed = bed; this.bed = bed;
} }
/** /**
* Gets the cancellation state of this event. * Gets the cancellation state of this event.
* *
* @return true if this event is cancelled * @return true if this event is cancelled
*/ */
public boolean isCancelled() { public boolean isCancelled() {
return cancel; return cancel;
} }
/** /**
* Prevents the player from entering the bed. * Prevents the player from entering the bed.
* *
* @param cancel true if you wish to cancel this event * @param cancel true if you wish to cancel this event
*/ */
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
/** /**
* Returns the bed block. * Returns the bed block.
* *
* @return * @return
*/ */
public Block getBed() { public Block getBed() {
return bed; return bed;
} }
} }

View File

@ -1,29 +1,29 @@
package org.bukkit.event.player; package org.bukkit.event.player;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
/** /**
* This event is fired when the player is leaving a bed. * This event is fired when the player is leaving a bed.
* *
* @author sk89q * @author sk89q
*/ */
public class PlayerBedLeaveEvent extends PlayerEvent { public class PlayerBedLeaveEvent extends PlayerEvent {
private Block bed; private Block bed;
public PlayerBedLeaveEvent(Player who, Block bed) { public PlayerBedLeaveEvent(Player who, Block bed) {
super(Type.PLAYER_BED_LEAVE, who); super(Type.PLAYER_BED_LEAVE, who);
this.bed = bed; this.bed = bed;
} }
/** /**
* Returns the bed block. * Returns the bed block.
* *
* @return * @return
*/ */
public Block getBed() { public Block getBed() {
return bed; return bed;
} }
} }

View File

@ -1,126 +1,126 @@
package org.bukkit.event.player; package org.bukkit.event.player;
import java.net.InetAddress; import java.net.InetAddress;
import org.bukkit.event.Event; import org.bukkit.event.Event;
/** /**
* Stores details for players attempting to log in * Stores details for players attempting to log in
*/ */
public class PlayerPreLoginEvent extends Event { public class PlayerPreLoginEvent extends Event {
private Result result; private Result result;
private String message; private String message;
private String name; private String name;
private InetAddress ipAddress; private InetAddress ipAddress;
public PlayerPreLoginEvent(String name, InetAddress ipAddress) { public PlayerPreLoginEvent(String name, InetAddress ipAddress) {
super(Type.PLAYER_PRELOGIN); super(Type.PLAYER_PRELOGIN);
this.result = Result.ALLOWED; this.result = Result.ALLOWED;
this.message = ""; this.message = "";
this.name = name; this.name = name;
this.ipAddress = ipAddress; this.ipAddress = ipAddress;
} }
/** /**
* Gets the current result of the login, as an enum * Gets the current result of the login, as an enum
* *
* @return Current Result of the login * @return Current Result of the login
*/ */
public Result getResult() { public Result getResult() {
return result; return result;
} }
/** /**
* Sets the new result of the login, as an enum * Sets the new result of the login, as an enum
* *
* @param result New result to set * @param result New result to set
*/ */
public void setResult(final Result result) { public void setResult(final Result result) {
this.result = result; this.result = result;
} }
/** /**
* Gets the current kick message that will be used if getResult() != Result.ALLOWED * Gets the current kick message that will be used if getResult() != Result.ALLOWED
* *
* @return Current kick message * @return Current kick message
*/ */
public String getKickMessage() { public String getKickMessage() {
return message; return message;
} }
/** /**
* Sets the kick message to display if getResult() != Result.ALLOWED * Sets the kick message to display if getResult() != Result.ALLOWED
* *
* @param message New kick message * @param message New kick message
*/ */
public void setKickMessage(final String message) { public void setKickMessage(final String message) {
this.message = message; this.message = message;
} }
/** /**
* Allows the player to log in * Allows the player to log in
*/ */
public void allow() { public void allow() {
result = Result.ALLOWED; result = Result.ALLOWED;
message = ""; message = "";
} }
/** /**
* Disallows the player from logging in, with the given reason * Disallows the player from logging in, with the given reason
* *
* @param result New result for disallowing the player * @param result New result for disallowing the player
* @param message Kick message to display to the user * @param message Kick message to display to the user
*/ */
public void disallow(final Result result, final String message) { public void disallow(final Result result, final String message) {
this.result = result; this.result = result;
this.message = message; this.message = message;
} }
/** /**
* Gets the player name. * Gets the player name.
* *
* @return * @return
*/ */
public String getName() { public String getName() {
return name; return name;
} }
/** /**
* Gets the player IP address. * Gets the player IP address.
* *
* @return * @return
*/ */
public InetAddress getAddress() { public InetAddress getAddress() {
return ipAddress; return ipAddress;
} }
/** /**
* Basic kick reasons for communicating to plugins * Basic kick reasons for communicating to plugins
*/ */
public enum Result { public enum Result {
/** /**
* The player is allowed to log in * The player is allowed to log in
*/ */
ALLOWED, ALLOWED,
/** /**
* The player is not allowed to log in, due to the server being full * The player is not allowed to log in, due to the server being full
*/ */
KICK_FULL, KICK_FULL,
/** /**
* The player is not allowed to log in, due to them being banned * The player is not allowed to log in, due to them being banned
*/ */
KICK_BANNED, KICK_BANNED,
/** /**
* The player is not allowed to log in, due to them not being on the white list * The player is not allowed to log in, due to them not being on the white list
*/ */
KICK_WHITELIST, KICK_WHITELIST,
/** /**
* The player is not allowed to log in, for reasons undefined * The player is not allowed to log in, for reasons undefined
*/ */
KICK_OTHER KICK_OTHER
} }
} }