-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Animate leaderboard snow layers on first render
- Loading branch information
Showing
4 changed files
with
173 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
37 changes: 37 additions & 0 deletions
37
src/main/kotlin/org/trackedout/citadel/commands/LeaderboardCommand.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,37 @@ | ||
package org.trackedout.citadel.commands | ||
|
||
import co.aikar.commands.BaseCommand | ||
import co.aikar.commands.annotation.CommandAlias | ||
import co.aikar.commands.annotation.CommandPermission | ||
import co.aikar.commands.annotation.Description | ||
import co.aikar.commands.annotation.Subcommand | ||
import org.bukkit.command.CommandSender | ||
import org.trackedout.citadel.Citadel | ||
import org.trackedout.citadel.FirstRun | ||
import org.trackedout.citadel.PageWatcher | ||
import org.trackedout.citadel.sendGreenMessage | ||
|
||
@CommandAlias("decked-out|do") | ||
class LeaderboardCommand( | ||
private val plugin: Citadel, | ||
) : BaseCommand() { | ||
@Subcommand("leaderboard clear") | ||
@CommandPermission("decked-out.leaderboard.admin") | ||
@Description("Clear and hide the leaderboard") | ||
fun clearAndHideLeaderboard(source: CommandSender) { | ||
FirstRun.showLeaderboard = false | ||
FirstRun.isFirstRun = true | ||
FirstRun.skip = 0 | ||
source.sendGreenMessage("Leaderboard cleared and hidden") | ||
} | ||
|
||
@Subcommand("leaderboard show") | ||
@CommandPermission("decked-out.leaderboard.admin") | ||
@Description("Show the leaderboard and optionally animate") | ||
fun showLeaderboard(source: CommandSender, animate: Boolean) { | ||
FirstRun.showLeaderboard = true | ||
FirstRun.isFirstRun = animate | ||
PageWatcher.page = 99 | ||
source.sendGreenMessage("Showing leaderboard ${if (animate) "with" else "without"} animation") | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
src/main/kotlin/org/trackedout/citadel/mongo/MongoPlayerStats.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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
package org.trackedout.citadel.mongo | ||
|
||
data class MongoPlayerStats ( | ||
data class MongoPlayerStats( | ||
val player: String, | ||
val stats: Stats | ||
val stats: Stats, | ||
) | ||
|
||
data class Stats ( | ||
data class Stats( | ||
val total: Int, | ||
val practice: RunStats, | ||
val competitive: RunStats, | ||
val tomesSubmitted: Int | ||
val tomesSubmitted: Int, | ||
) | ||
|
||
data class RunStats ( | ||
data class RunStats( | ||
val total: Int, | ||
val easy: Int, | ||
val medium: Int, | ||
val hard: Int, | ||
val deadly: Int, | ||
val deepFrost: Int, | ||
val wins: Int, | ||
val losses: Int | ||
val losses: Int, | ||
) |