Skip to content

Commit

Permalink
fix(tsl): reloadcfg denying OP players in singleplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoodie committed Oct 4, 2019
1 parent 4d78a83 commit 300fc1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.daemon=false

mod_id=twitchspawn
mod_group=net.programmer.igoodie
mod_version=1.3.8
mod_version=1.4.0

minecraft_version=1.14.4
forge_version=28.0.83
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public static int reloadModule(CommandContext<CommandSource> context) {
CommandSource source = context.getSource();
String sourceNickname = source.getName();

boolean isOp = Stream.of(TwitchSpawn.SERVER.getPlayerList().getOppedPlayerNames())
boolean isOp = TwitchSpawn.SERVER.isSinglePlayer()
|| Stream.of(TwitchSpawn.SERVER.getPlayerList().getOppedPlayerNames())
.anyMatch(oppedPlayerName -> oppedPlayerName.equalsIgnoreCase(sourceNickname));

// If is not OP or has no permission
Expand Down

0 comments on commit 300fc1e

Please sign in to comment.