More javadocs 😇

This commit is contained in:
Lennart ten Wolde 2014-11-13 08:36:28 +01:00
parent 5ccbf9fbbb
commit b6eeaf8cb9
5 changed files with 130 additions and 0 deletions

View file

@ -0,0 +1,7 @@
package com.lenis0012.bukkit.marriage2;
public enum Gender {
MALE,
FEMALE,
UNKNOWN;
}

View file

@ -0,0 +1,47 @@
package com.lenis0012.bukkit.marriage2;
import java.util.UUID;
import org.bukkit.Location;
public interface MData {
UUID getPlayer1Id();
UUID getPllayer2Id();
/**
* Get the home of the married people.
*
* @return Marriage home.
*/
Location getHome();
/**
* Set the home of the married people.
*
* @return Marriage home.
*/
Location setHome();
/**
* Check if the married players have a home set.
*
* @return Whether or not a home is set for the married players.
*/
boolean isHomeSet();
/**
* Check if PVP is enabled between the married players.
*
* @return Whether or not pvp is enabled between the married players.
*/
boolean isPVPEnabled();
/**
* Set if pvp is enabled between the married players.
*
* @param pvpEnabled Whether or not pvp is enabled between the married players.
*/
void setPVPEnabled(boolean pvpEnabled);
}

View file

@ -0,0 +1,58 @@
package com.lenis0012.bukkit.marriage2;
import java.util.UUID;
import javax.annotation.Nullable;
public interface MPlayer {
/**
* Get unique User Id of the player.
*
* @return Player's unique user id.
*/
UUID getUniqueId();
/**
* Get the player's gender.
*
* @return Player's gender.
*/
Gender getGender();
/**
* Set the player's gender.
*
* @param gender Player's gender.
*/
void setGender(Gender gender);
/**
* Get current marriage of the player.
*
* @return Player's marriage, NULL if not married.
*/
@Nullable
MData getMarriage();
/**
* Check if the player is married.
*
* @return True if married, false otherwise.
*/
boolean isMarried();
/**
* Check if the player is in marry-chat mode.
*
* @return True if in chat-mode, false otherwise.
*/
boolean isInChat();
/**
* Set if the player is in marry chat-mode.
*
* @param inChat Whether or not the player is in marry chat-mode.
*/
void setInChat(boolean inChat);
}

View file

@ -1,5 +1,6 @@
package com.lenis0012.bukkit.marriage2;
import java.util.UUID;
import java.util.logging.Logger;
import org.bukkit.event.Listener;
@ -18,6 +19,14 @@ public interface Marriage {
*/
public BConfig getBukkitConfig(String file);
/**
* Return a {@link com.lenis0012.bukkit.marriage2.MPlayer} instance of a player.
*
* @param uuid Unique user id of the wanted player.
* @return {@link com.lenis0012.bukkit.marriage2.MPlayer} of the wanted player.
*/
public MPlayer getMPlayer(UUID uuid);
/**
* Register a {@link org.bukkit.event.Listener} to this plugin.
*

View file

@ -1,5 +1,8 @@
package com.lenis0012.bukkit.marriage2.internal;
import java.util.UUID;
import com.lenis0012.bukkit.marriage2.MPlayer;
import com.lenis0012.bukkit.marriage2.commands.CommandTest;
import com.lenis0012.bukkit.marriage2.lang.Message;
@ -18,4 +21,10 @@ public class MarriageCore extends MarriageBase {
public void loadMessages() {
Message.reloadAll(this);
}
@Override
public MPlayer getMPlayer(UUID uuid) {
//TODO: Everything...
return null;
}
}