mirror of
https://github.com/TotalFreedomMC/TF-Marriage.git
synced 2024-12-31 20:42:18 +00:00
More javadocs 😇
This commit is contained in:
parent
5ccbf9fbbb
commit
b6eeaf8cb9
5 changed files with 130 additions and 0 deletions
7
src/main/java/com/lenis0012/bukkit/marriage2/Gender.java
Normal file
7
src/main/java/com/lenis0012/bukkit/marriage2/Gender.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package com.lenis0012.bukkit.marriage2;
|
||||
|
||||
public enum Gender {
|
||||
MALE,
|
||||
FEMALE,
|
||||
UNKNOWN;
|
||||
}
|
47
src/main/java/com/lenis0012/bukkit/marriage2/MData.java
Normal file
47
src/main/java/com/lenis0012/bukkit/marriage2/MData.java
Normal 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);
|
||||
}
|
58
src/main/java/com/lenis0012/bukkit/marriage2/MPlayer.java
Normal file
58
src/main/java/com/lenis0012/bukkit/marriage2/MPlayer.java
Normal 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);
|
||||
}
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue