From df18fad33f7992c1891d2be0de7b9c92c6468e1e Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Thu, 21 Apr 2011 15:27:18 +0100 Subject: [PATCH] Dammit, line endings! --- .../java/org/bukkit/BlockChangeDelegate.java | 84 +++--- .../event/player/PlayerBedEnterEvent.java | 100 +++---- .../event/player/PlayerBedLeaveEvent.java | 58 ++-- .../event/player/PlayerPreLoginEvent.java | 252 +++++++++--------- 4 files changed, 247 insertions(+), 247 deletions(-) diff --git a/src/main/java/org/bukkit/BlockChangeDelegate.java b/src/main/java/org/bukkit/BlockChangeDelegate.java index a60334c9..6dd99555 100644 --- a/src/main/java/org/bukkit/BlockChangeDelegate.java +++ b/src/main/java/org/bukkit/BlockChangeDelegate.java @@ -1,42 +1,42 @@ -package org.bukkit; - -/** - * A delegate for handling block changes. This serves as a direct interface - * between generation algorithms in the server implementation and utilizing - * code. - * - * @author sk89q - */ -public interface BlockChangeDelegate { - /** - * Set a block type at the specified coordinates. - * - * @param x - * @param y - * @param z - * @param typeId - * @return true if the block was set successfully - */ - public boolean setRawTypeId(int x, int y, int z, int typeId); - - /** - * Set a block type and data at the specified coordinates. - * - * @param x - * @param y - * @param z - * @param typeId - * @param data - * @return true if the block was set successfully - */ - public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); - - /** - * Get the block type at the location. - * @param x - * @param y - * @param z - * @return - */ - public int getTypeId(int x, int y, int z); -} +package org.bukkit; + +/** + * A delegate for handling block changes. This serves as a direct interface + * between generation algorithms in the server implementation and utilizing + * code. + * + * @author sk89q + */ +public interface BlockChangeDelegate { + /** + * Set a block type at the specified coordinates. + * + * @param x + * @param y + * @param z + * @param typeId + * @return true if the block was set successfully + */ + public boolean setRawTypeId(int x, int y, int z, int typeId); + + /** + * Set a block type and data at the specified coordinates. + * + * @param x + * @param y + * @param z + * @param typeId + * @param data + * @return true if the block was set successfully + */ + public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); + + /** + * Get the block type at the location. + * @param x + * @param y + * @param z + * @return + */ + public int getTypeId(int x, int y, int z); +} diff --git a/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java b/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java index 93beec63..696778e0 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java @@ -1,50 +1,50 @@ -package org.bukkit.event.player; - -import org.bukkit.block.Block; -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; - -/** - * This event is fired when the player is almost about to enter the bed. - * It can be cancelled. - * - * @author sk89q - */ -public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable { - - private boolean cancel = false; - private Block bed; - - public PlayerBedEnterEvent(Player who, Block bed) { - super(Type.PLAYER_BED_ENTER, who); - this.bed = bed; - } - - /** - * Gets the cancellation state of this event. - * - * @return true if this event is cancelled - */ - public boolean isCancelled() { - return cancel; - } - - /** - * Prevents the player from entering the bed. - * - * @param cancel true if you wish to cancel this event - */ - public void setCancelled(boolean cancel) { - this.cancel = cancel; - } - - /** - * Returns the bed block. - * - * @return - */ - public Block getBed() { - return bed; - } - -} +package org.bukkit.event.player; + +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; + +/** + * This event is fired when the player is almost about to enter the bed. + * It can be cancelled. + * + * @author sk89q + */ +public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable { + + private boolean cancel = false; + private Block bed; + + public PlayerBedEnterEvent(Player who, Block bed) { + super(Type.PLAYER_BED_ENTER, who); + this.bed = bed; + } + + /** + * Gets the cancellation state of this event. + * + * @return true if this event is cancelled + */ + public boolean isCancelled() { + return cancel; + } + + /** + * Prevents the player from entering the bed. + * + * @param cancel true if you wish to cancel this event + */ + public void setCancelled(boolean cancel) { + this.cancel = cancel; + } + + /** + * Returns the bed block. + * + * @return + */ + public Block getBed() { + return bed; + } + +} diff --git a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java index 22793345..c0343c27 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java @@ -1,29 +1,29 @@ -package org.bukkit.event.player; - -import org.bukkit.block.Block; -import org.bukkit.entity.Player; - -/** - * This event is fired when the player is leaving a bed. - * - * @author sk89q - */ -public class PlayerBedLeaveEvent extends PlayerEvent { - - private Block bed; - - public PlayerBedLeaveEvent(Player who, Block bed) { - super(Type.PLAYER_BED_LEAVE, who); - this.bed = bed; - } - - /** - * Returns the bed block. - * - * @return - */ - public Block getBed() { - return bed; - } - -} +package org.bukkit.event.player; + +import org.bukkit.block.Block; +import org.bukkit.entity.Player; + +/** + * This event is fired when the player is leaving a bed. + * + * @author sk89q + */ +public class PlayerBedLeaveEvent extends PlayerEvent { + + private Block bed; + + public PlayerBedLeaveEvent(Player who, Block bed) { + super(Type.PLAYER_BED_LEAVE, who); + this.bed = bed; + } + + /** + * Returns the bed block. + * + * @return + */ + public Block getBed() { + return bed; + } + +} diff --git a/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java index a76d96a2..ffa52ab5 100644 --- a/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java @@ -1,126 +1,126 @@ - -package org.bukkit.event.player; - -import java.net.InetAddress; -import org.bukkit.event.Event; - -/** - * Stores details for players attempting to log in - */ -public class PlayerPreLoginEvent extends Event { - private Result result; - private String message; - private String name; - private InetAddress ipAddress; - - public PlayerPreLoginEvent(String name, InetAddress ipAddress) { - super(Type.PLAYER_PRELOGIN); - this.result = Result.ALLOWED; - this.message = ""; - this.name = name; - this.ipAddress = ipAddress; - } - - /** - * Gets the current result of the login, as an enum - * - * @return Current Result of the login - */ - public Result getResult() { - return result; - } - - /** - * Sets the new result of the login, as an enum - * - * @param result New result to set - */ - public void setResult(final Result result) { - this.result = result; - } - - /** - * Gets the current kick message that will be used if getResult() != Result.ALLOWED - * - * @return Current kick message - */ - public String getKickMessage() { - return message; - } - - /** - * Sets the kick message to display if getResult() != Result.ALLOWED - * - * @param message New kick message - */ - public void setKickMessage(final String message) { - this.message = message; - } - - /** - * Allows the player to log in - */ - public void allow() { - result = Result.ALLOWED; - message = ""; - } - - /** - * Disallows the player from logging in, with the given reason - * - * @param result New result for disallowing the player - * @param message Kick message to display to the user - */ - public void disallow(final Result result, final String message) { - this.result = result; - this.message = message; - } - - /** - * Gets the player name. - * - * @return - */ - public String getName() { - return name; - } - - /** - * Gets the player IP address. - * - * @return - */ - public InetAddress getAddress() { - return ipAddress; - } - - /** - * Basic kick reasons for communicating to plugins - */ - public enum Result { - /** - * The player is allowed to log in - */ - ALLOWED, - - /** - * The player is not allowed to log in, due to the server being full - */ - KICK_FULL, - - /** - * The player is not allowed to log in, due to them being banned - */ - KICK_BANNED, - - /** - * The player is not allowed to log in, due to them not being on the white list - */ - KICK_WHITELIST, - - /** - * The player is not allowed to log in, for reasons undefined - */ - KICK_OTHER - } -} + +package org.bukkit.event.player; + +import java.net.InetAddress; +import org.bukkit.event.Event; + +/** + * Stores details for players attempting to log in + */ +public class PlayerPreLoginEvent extends Event { + private Result result; + private String message; + private String name; + private InetAddress ipAddress; + + public PlayerPreLoginEvent(String name, InetAddress ipAddress) { + super(Type.PLAYER_PRELOGIN); + this.result = Result.ALLOWED; + this.message = ""; + this.name = name; + this.ipAddress = ipAddress; + } + + /** + * Gets the current result of the login, as an enum + * + * @return Current Result of the login + */ + public Result getResult() { + return result; + } + + /** + * Sets the new result of the login, as an enum + * + * @param result New result to set + */ + public void setResult(final Result result) { + this.result = result; + } + + /** + * Gets the current kick message that will be used if getResult() != Result.ALLOWED + * + * @return Current kick message + */ + public String getKickMessage() { + return message; + } + + /** + * Sets the kick message to display if getResult() != Result.ALLOWED + * + * @param message New kick message + */ + public void setKickMessage(final String message) { + this.message = message; + } + + /** + * Allows the player to log in + */ + public void allow() { + result = Result.ALLOWED; + message = ""; + } + + /** + * Disallows the player from logging in, with the given reason + * + * @param result New result for disallowing the player + * @param message Kick message to display to the user + */ + public void disallow(final Result result, final String message) { + this.result = result; + this.message = message; + } + + /** + * Gets the player name. + * + * @return + */ + public String getName() { + return name; + } + + /** + * Gets the player IP address. + * + * @return + */ + public InetAddress getAddress() { + return ipAddress; + } + + /** + * Basic kick reasons for communicating to plugins + */ + public enum Result { + /** + * The player is allowed to log in + */ + ALLOWED, + + /** + * The player is not allowed to log in, due to the server being full + */ + KICK_FULL, + + /** + * The player is not allowed to log in, due to them being banned + */ + KICK_BANNED, + + /** + * The player is not allowed to log in, due to them not being on the white list + */ + KICK_WHITELIST, + + /** + * The player is not allowed to log in, for reasons undefined + */ + KICK_OTHER + } +}