Skip to content
This repository was archived by the owner on Feb 17, 2024. It is now read-only.

Conversation

@MrJeremyFisher
Copy link

Allows listing of invited players on a group and their ranks. Functions the same as /nllm.

@MrJeremyFisher MrJeremyFisher changed the title Add /nllim (Name Layer List Invite Members) Add /nllim (Name Layer List Invited Members) May 11, 2023
@Gjum
Copy link

Gjum commented May 11, 2023

Very cool. Thank you so much.

return member;
}
if (NameLayerPlugin.getBlackList().isBlacklisted(this, uuid)) {
return null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning null invariably leads to NPEs down the line. Instead, use java.util.Optional or the @Nullable/@NotNull annotations.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think I should change this for /nllm as well? The only reason I have it the way it is is to try and stay consistent with /nllm

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not introducting new pitfalls matters the most. It'd be ideal if the codebase was consistent in its patterns around null, but that's probably more suited to a dedicated PR.

# Conflicts:
#	paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/ListInvites.java
#	paper/src/main/java/vg/civcraft/mc/namelayer/group/Group.java

if (!sender.hasPermission("namelayer.admin")) {
if (!group.isMember(uuid)) {
sender.sendMessage(ChatColor.RED + "You're not on this group.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to use, however we do want to move to use Kyoris adventure components

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that's for future compatibility with 1.19+?

@Diet-Cola
Copy link

Diet-Cola commented May 12, 2023 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants