mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-03 06:57:58 +01:00
Quests - V2.8.6-03 - Added InvalidStageException javadoc - By GregZ_
* Incremented dev version in pom.xml. * Added javadoc comments to the InvalidStageException class. * Added a package-info file for the me.blackvein.quests.exceptions package.
This commit is contained in:
parent
051ad5cfe4
commit
b8a53610ab
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>2.8.6-02</version>
|
||||
<version>2.8.6-03</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -2,28 +2,66 @@ package me.blackvein.quests.exceptions;
|
||||
|
||||
import me.blackvein.quests.Quest;
|
||||
|
||||
/**
|
||||
* This is the InvalidStageException class, this exception is used to indicate
|
||||
* that the new stage of a quest does not exist. This is currently used in the
|
||||
* Quest class when advancing to the next stage or manually setting the stage.
|
||||
*
|
||||
* @author Zino
|
||||
* @author Blackvein
|
||||
* @since 1.7.1-SNAPSHOT
|
||||
* @version 3
|
||||
* @see Quest#nextStage(me.blackvein.quests.Quester)
|
||||
* @see Quest#setStage(me.blackvein.quests.Quester, int)
|
||||
*/
|
||||
public class InvalidStageException extends Exception {
|
||||
|
||||
/**
|
||||
* The version id to use when serialising and deserialising this class.
|
||||
*/
|
||||
private static final long serialVersionUID = 1778748295752972651L;
|
||||
|
||||
|
||||
/**
|
||||
* The Quest instance that an invalid stage was set within.
|
||||
*/
|
||||
private final Quest quest;
|
||||
|
||||
/**
|
||||
* The invalid stage number that was attempted to be set.
|
||||
*/
|
||||
private final int stage;
|
||||
|
||||
/**
|
||||
* Create a new instance of the InvalidStageException class with the given
|
||||
* holding Quest and invalid stage number.
|
||||
*
|
||||
* @param quest
|
||||
* The quest that an invalid stage id was set within.
|
||||
* @param stage
|
||||
* The invalid stage id that was set.
|
||||
*/
|
||||
public InvalidStageException(Quest quest, int stage) {
|
||||
this.quest = quest;
|
||||
this.stage = stage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the quest instance associated with this exception.
|
||||
*
|
||||
* @return The quest that an invalid stage id was set within.
|
||||
*/
|
||||
public Quest getQuest() {
|
||||
return quest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the invalid stage id that was attempted to be set within the quest
|
||||
* class.
|
||||
*
|
||||
* @return The invalid stage id that was set.
|
||||
*/
|
||||
public int getStage() {
|
||||
return stage;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1778748295752972651L;
|
||||
|
||||
@Override
|
||||
public void printStackTrace() {
|
||||
super.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Contains all the custom classes extending exception that are used within the
|
||||
* Quests plugin.
|
||||
*/
|
||||
package me.blackvein.quests.exceptions;
|
Loading…
Reference in New Issue
Block a user