-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #520 from Shynixn/development
Merge changes to master --release
- Loading branch information
Showing
80 changed files
with
2,397 additions
and
3,500 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# These are supported funding model platforms | ||
patreon: Shynixn |
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 was deleted.
Oops, something went wrong.
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
136 changes: 136 additions & 0 deletions
136
src/main/java/com/github/shynixn/blockball/contract/BlockBallGame.kt
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,136 @@ | ||
package com.github.shynixn.blockball.contract | ||
|
||
import com.github.shynixn.blockball.entity.Arena | ||
import com.github.shynixn.blockball.entity.GameStorage | ||
import com.github.shynixn.blockball.enumeration.GameState | ||
import com.github.shynixn.blockball.enumeration.JoinResult | ||
import com.github.shynixn.blockball.enumeration.LeaveResult | ||
import com.github.shynixn.blockball.enumeration.Team | ||
import org.bukkit.entity.Player | ||
|
||
interface BlockBallGame { | ||
/** | ||
* Player who was the last one to hit the ball. | ||
*/ | ||
var lastHitPlayer: Player? | ||
|
||
/** | ||
* Gets the arena. | ||
*/ | ||
val arena: Arena | ||
|
||
/** | ||
* RedScore. | ||
*/ | ||
var redScore: Int | ||
|
||
/** | ||
* Blue Score. | ||
*/ | ||
var blueScore: Int | ||
|
||
/** | ||
* Marks the game for being closed and will automatically | ||
* switch to close state once the resources are cleard. | ||
*/ | ||
var closing: Boolean | ||
|
||
/** | ||
* Ingame scoreboard. | ||
*/ | ||
var scoreboard: Any? | ||
|
||
/** | ||
* Ingame bossbar. | ||
*/ | ||
var bossBar: Any? | ||
|
||
/** | ||
* Ingame holograms. | ||
*/ | ||
val holograms: MutableList<HologramProxy> | ||
|
||
/** | ||
* All players which are already fix in team red. | ||
*/ | ||
val redTeam: List<Player> | ||
|
||
/** | ||
* All players which are already fix in team blue. | ||
*/ | ||
val blueTeam: List<Player> | ||
|
||
/** | ||
* Is the game closed. | ||
*/ | ||
var closed: Boolean | ||
|
||
/** | ||
* Status. | ||
*/ | ||
var status: GameState | ||
|
||
/** | ||
* Ball. | ||
*/ | ||
var ball: Ball? | ||
|
||
/** | ||
* The last interacted entity with the ball. Can also be a non player. | ||
*/ | ||
var lastInteractedEntity: Any? | ||
|
||
/** | ||
* Contains players which are in cooldown by doublejump. | ||
*/ | ||
val doubleJumpCoolDownPlayers: MutableMap<Player, Int> | ||
|
||
/** | ||
* Storage. | ||
*/ | ||
val ingamePlayersStorage: MutableMap<Player, GameStorage> | ||
|
||
/** | ||
* Ball bumper counter | ||
*/ | ||
var ballBumperCounter: Int | ||
|
||
/** | ||
* Lets the given [player] leave join. Optional can the prefered | ||
* [team] be specified but the team can still change because of arena settings. | ||
* Does nothing if the player is already in a Game. | ||
*/ | ||
fun join(player: Player, team: Team? = null): JoinResult | ||
|
||
/** | ||
* Leaves the given player. | ||
*/ | ||
fun leave(player: Player): LeaveResult | ||
|
||
/** | ||
* Tick handle. | ||
*/ | ||
fun handle(ticks: Int) | ||
|
||
/** | ||
* Lets the given [player] in the given [game] respawn at the specified spawnpoint. | ||
*/ | ||
fun respawn(player: Player) | ||
|
||
/** | ||
* Applies death points. | ||
*/ | ||
fun applyDeathPoints(player: Player) | ||
|
||
/** | ||
* Notifies that the ball is inside of the goal of the given team. | ||
* This team has to be the default goal of the team. Mirroring | ||
* is handled inside of the method. | ||
*/ | ||
fun notifyBallInGoal(team: Team) | ||
|
||
/** | ||
* Closes the given game and all underlying resources. | ||
*/ | ||
fun close() | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/github/shynixn/blockball/contract/BlockBallHubGame.kt
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,4 @@ | ||
package com.github.shynixn.blockball.contract | ||
|
||
interface BlockBallHubGame : BlockBallGame { | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/com/github/shynixn/blockball/contract/BlockBallMiniGame.kt
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,31 @@ | ||
package com.github.shynixn.blockball.contract | ||
|
||
import org.bukkit.entity.Player | ||
|
||
interface BlockBallMiniGame : BlockBallGame { | ||
/** | ||
* Actual game coutndown. | ||
*/ | ||
var gameCountdown: Int | ||
|
||
/** | ||
* List of players which are spectating the game. | ||
*/ | ||
val spectatorPlayers: List<Player> | ||
|
||
/** | ||
* Index of the current match time. | ||
*/ | ||
var matchTimeIndex: Int | ||
|
||
/** | ||
* Actives the next match time. Closes the match if no match time is available. | ||
*/ | ||
fun switchToNextMatchTime() | ||
|
||
/** | ||
* Lets the given [player] leave spectate the given [game]. | ||
* Does nothing if the player is already spectating a Game. | ||
*/ | ||
fun spectate(player: Player) | ||
} |
15 changes: 0 additions & 15 deletions
15
src/main/java/com/github/shynixn/blockball/contract/DependencyBossBarApiService.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.