Skip to content

Commit

Permalink
#526 Fixed inventory handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shynixn committed Jul 20, 2024
1 parent c1abd22 commit e38e018
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/github/shynixn/blockball/entity/TeamMeta.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ class TeamMeta(
"%blockball_lang_teamSignLine4%",
)

@JsonProperty("armor")
var armor: Array<String?> = arrayOfNulls(4)

@JsonProperty("inventory")
var inventory: Array<String?> = arrayOfNulls(36)

var scoreMessageFadeIn: Int = 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,10 @@ class JoinCommandExecutor @Inject constructor(
.equals(args[0], true)
) {
var team: Team? = null
if (args[1].equals(
g.arena.meta.redTeamMeta.displayName.translateChatColors().stripChatColors(),
true
)
) {
// TODO: Work around will be removed with the command rework
if (args[1].equals("team red", true) || args[1].equals("red", true)) {
team = Team.RED
} else if (args[1].equals(
g.arena.meta.blueTeamMeta.displayName.translateChatColors().stripChatColors(),
true
)
) {
} else if (args[1].equals("team blue", true) || args[1].equals("blue", true)) {
team = Team.BLUE
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class TeamSettingsPage @Inject constructor() :
}.toTypedArray()
} else if (command == MenuCommand.TEAM_INVENTORY) {
val teamMeta = getTeamMeta(cache)
teamMeta.armor = player.inventory.contents.clone().map { e ->
teamMeta.inventory = player.inventory.contents.clone().map { e ->
val yamlConfiguration = YamlConfiguration()
yamlConfiguration.set("item", e)
yamlConfiguration.saveToString()
Expand Down

0 comments on commit e38e018

Please sign in to comment.