Skip to content

Commit

Permalink
fix sidebar issue (#654)
Browse files Browse the repository at this point in the history
* fix disable sidebar option not working properly

* fix #648 sidebar team issue
  • Loading branch information
andrei1058 authored Feb 5, 2023
1 parent cfe402c commit 06bfb65
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bedwars-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,43 +232,43 @@
<dependency>
<groupId>com.andrei1058.spigot.sidebar</groupId>
<artifactId>sidebar-base</artifactId>
<version>22.12</version>
<version>23.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.andrei1058.spigot.sidebar</groupId>
<artifactId>sidebar-eight</artifactId>
<version>22.12</version>
<version>23.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.andrei1058.spigot.sidebar</groupId>
<artifactId>sidebar-twelve</artifactId>
<version>22.12</version>
<version>23.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.andrei1058.spigot.sidebar</groupId>
<artifactId>sidebar-sixteen</artifactId>
<version>22.12</version>
<version>23.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.andrei1058.spigot.sidebar</groupId>
<artifactId>sidebar-seventeen</artifactId>
<version>22.12</version>
<version>23.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.andrei1058.spigot.sidebar</groupId>
<artifactId>sidebar-eighteen</artifactId>
<version>22.12</version>
<version>23.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.andrei1058.spigot.sidebar</groupId>
<artifactId>sidebar-nineteen</artifactId>
<version>22.12</version>
<version>23.2</version>
<scope>compile</scope>
</dependency>
<!-- End of Sidebar LIB-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ public void giveSidebar(@NotNull Player player, @Nullable IArena arena, boolean
}
}

// if sidebar was null but still disabled for lobbies
if (!config.getBoolean(ConfigPath.SB_CONFIG_SIDEBAR_USE_LOBBY_SIDEBAR) && null == arena) {
return;
}
// if sidebar was null but still disabled in game
if (!config.getBoolean(ConfigPath.SB_CONFIG_SIDEBAR_USE_GAME_SIDEBAR) && null != arena) {
return;
}

// set sidebar lines based on game state or lobby
List<String> lines = null;
List<String> title;
Expand Down

0 comments on commit 06bfb65

Please sign in to comment.