Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void menu(CommandAudience viewer, Player sender) {
}
}

@Command("create [type]")
@Command("create <type>")
@Permission(CommunityPermissions.PARTY)
public void create(
CommandAudience viewer,
Expand All @@ -61,7 +61,7 @@ public void create(
}
}

@Command("preset [name]")
@Command("preset <name>")
@Permission(CommunityPermissions.PARTY)
public void createPreset(
CommandAudience viewer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ public boolean create(CommandAudience viewer, Player sender, MapPartyType type,
case REGULAR:
this.party = new RegularPoolParty(sender, getEventConfig());
break;
case null:
default:
return false;
// Catch unknown party type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public void addSubHost(Player player) {

public boolean removeSubHost(String name) {
Entry<UUID, String> cachedEntry = nameCache.entrySet().stream()
.filter(e -> e.getValue().equalsIgnoreCase(name))
.filter(e ->
e.getKey().toString().equalsIgnoreCase(name) || e.getValue().equalsIgnoreCase(name))
.findAny()
.orElse(null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void init(Player player, InventoryContents contents) {

@Override
public Predicate<Player> relevantPlayerFilter() {
return player -> player.hasPermission(CommunityPermissions.STAFF);
return player -> player.hasPermission(CommunityPermissions.PARTY);
}

@Override
Expand Down
Loading