Prevent Name value in info classes from being null

This commit is contained in:
AlexTheCoder 2016-12-22 23:15:26 -05:00 committed by cnr
parent 0a69562579
commit ac8d8aa69c
3 changed files with 16 additions and 0 deletions

View File

@ -36,6 +36,10 @@ public class CommunityJoinRequestInfo
public void update(String name)
{
if (name == null)
{
return;
}
Name = name;
buildIcon();
}

View File

@ -182,6 +182,10 @@ public class CommunityManager extends MiniDbClientPlugin<CommunityMemberData>
{
return;
}
if (name == null)
{
return;
}
_loadedCommunities.values().stream().filter(community -> community.getMembers().containsKey(uuid) && !community.getMembers().get(uuid).Name.equalsIgnoreCase(name)).forEach(community ->
{
community.getMembers().get(uuid).updateName(name);
@ -196,6 +200,10 @@ public class CommunityManager extends MiniDbClientPlugin<CommunityMemberData>
{
return;
}
if (name == null)
{
return;
}
_loadedCommunities.values().stream().filter(community -> community.getJoinRequests().containsKey(uuid) && !community.getJoinRequests().get(uuid).Name.equalsIgnoreCase(name)).forEach(community ->
{
community.getJoinRequests().get(uuid).update(name);

View File

@ -62,6 +62,10 @@ public class CommunityMemberInfo
public void updateName(String name)
{
if (name == null)
{
return;
}
Name = name;
buildIcons();
}