-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed most of the bugs that occurred last time in the testing session.
Need to still do 2 things: 1. Make fake manager NPC's 2. Make sure the manager side of things isn't buggy.
- Loading branch information
Showing
12 changed files
with
151 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package net.dohaw.ironcraft; | ||
|
||
/** | ||
* The different reasons the game has stopped. | ||
*/ | ||
public enum Reason { | ||
|
||
/** | ||
* The player has ran out of time to complete the game (You currently only get 7 minutes). | ||
*/ | ||
OUT_OF_TIME, | ||
|
||
/** | ||
* The player has completed the game. | ||
*/ | ||
GAME_COMPLETE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,41 @@ | ||
package net.dohaw.ironcraft.event; | ||
|
||
import net.dohaw.ironcraft.PlayerData; | ||
import net.dohaw.ironcraft.Reason; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
/** | ||
* The event that fires when the game ends. | ||
* The event that is fired when the game has stopped. This doesn't always mean that the game was completed successfully. | ||
* @see CompleteGameEvent | ||
*/ | ||
public class EndGameEvent extends Event { | ||
|
||
private static final HandlerList HANDLERS_LIST = new HandlerList(); | ||
|
||
private PlayerData playerData; | ||
private Reason reason; | ||
|
||
public EndGameEvent(PlayerData playerData) { | ||
public EndGameEvent(Reason reason, PlayerData playerData){ | ||
this.reason = reason; | ||
this.playerData = playerData; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return HANDLERS_LIST; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return HANDLERS_LIST; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return HANDLERS_LIST; | ||
public Reason getReason() { | ||
return reason; | ||
} | ||
|
||
public PlayerData getPlayerData() { | ||
return playerData; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.