Skip to content

Commit 5d03a59

Browse files
Update open methods to return nullable String (#797)
1 parent f96ce28 commit 5d03a59

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • inventory-framework-platform-minestom/src/main/kotlin/me/devnatan/inventoryframework

inventory-framework-platform-minestom/src/main/kotlin/me/devnatan/inventoryframework/ViewFrame.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ViewFrame private constructor(
3030
fun open(
3131
viewClass: Class<out View>,
3232
player: Player,
33-
): String = open(viewClass, player, null)
33+
): String? = open(viewClass, player, null)
3434

3535
/**
3636
* Opens a view to a player with initial data.
@@ -44,7 +44,7 @@ class ViewFrame private constructor(
4444
viewClass: Class<out View>,
4545
player: Player,
4646
initialData: Any?,
47-
): String = open(viewClass, listOf(player), initialData)
47+
): String? = open(viewClass, listOf(player), initialData)
4848

4949
/**
5050
* Opens a view to more than one player.
@@ -62,7 +62,7 @@ class ViewFrame private constructor(
6262
fun open(
6363
viewClass: Class<out View>,
6464
players: Collection<Player>,
65-
): String = open(viewClass, players, null)
65+
): String? = open(viewClass, players, null)
6666

6767
/**
6868
* Opens a view to more than one player with initial data.
@@ -82,7 +82,7 @@ class ViewFrame private constructor(
8282
viewClass: Class<out View>,
8383
players: Collection<Player>,
8484
initialData: Any?,
85-
): String = internalOpen(viewClass, players.associateBy { it.uuid.toString() }, initialData)
85+
): String? = internalOpen(viewClass, players.associateBy { it.uuid.toString() }, initialData)
8686

8787
/**
8888
* Opens an already active context to a player.

0 commit comments

Comments
 (0)