Skip to content

Commit

Permalink
Release 3.2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioDP committed Aug 6, 2023
1 parent 843c1c7 commit 464528c
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>

<artifactId>parties-api</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions bukkit/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-bukkit</artifactId>
Expand Down Expand Up @@ -84,7 +84,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-common</artifactId>
<version>3.2.10</version>
<version>3.2.11</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion bukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>

<artifactId>parties-bukkit</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions bungeecord/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-bungeecord</artifactId>
Expand Down Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-common</artifactId>
<version>3.2.10</version>
<version>3.2.11</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion bungeecord/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>

<artifactId>parties-bungeecord</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions common/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-common</artifactId>
Expand Down Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-api</artifactId>
<version>3.2.10</version>
<version>3.2.11</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>

<artifactId>parties-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.alessiodp.core.common.ADPPlugin;
import com.alessiodp.core.common.configuration.Constants;
import com.alessiodp.core.common.utils.CommonUtils;
import lombok.RequiredArgsConstructor;
import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
Expand Down Expand Up @@ -29,15 +30,15 @@ public boolean register() {
public String getPlayerPrefix(UUID uuid) {
User user = api.getUserManager().getUser(uuid);
if (user != null) {
return user.getCachedData().getMetaData().getPrefix();
return CommonUtils.getOr(user.getCachedData().getMetaData().getPrefix(), "");
}
return "";
}

public String getPlayerSuffix(UUID uuid) {
User user = api.getUserManager().getUser(uuid);
if (user != null) {
return user.getCachedData().getMetaData().getSuffix();
return CommonUtils.getOr(user.getCachedData().getMetaData().getSuffix(), "");
}
return "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String convertRawPlaceholder(String placeholder, PartyPlayerImpl player,
ret = newPlaceholder.formatPlaceholder(player, party, placeholder, emptyPlaceholder);
}
// LuckPerms
if (ret != null && player != null) {
if (ret == null && player != null) {
ret = LuckPermsHandler.parsePlaceholders("%" + placeholder + "%", player);
}
return ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,24 +267,24 @@ else if (((int) args.getArgument(2)) == 2)
PartiesPlaceholder placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_name_1");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_NAME_NUMBER, placeholder);
assertEquals(party1.getName(), placeholder.formatPlaceholder(null, null, "list_parties_by_name_1"));
assertEquals(party1.getName(), placeholder.formatPlaceholder(player1, null, "list_parties_by_name_1"));

placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_name_2");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_NAME_NUMBER, placeholder);
assertEquals(party2.getName(), placeholder.formatPlaceholder(null, null, "list_parties_by_name_2"));
assertEquals(party2.getName(), placeholder.formatPlaceholder(player1, null, "list_parties_by_name_2"));

// No more parties
placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_name_4");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_NAME_NUMBER, placeholder);
assertEquals("", placeholder.formatPlaceholder(null, null, "list_parties_by_name_4"));
assertEquals("", placeholder.formatPlaceholder(player1, null, "list_parties_by_name_4"));

// Placeholder
placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_name_1_id");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_NAME_NUMBER_PLACEHOLDER, placeholder);
assertEquals(party1.getId().toString(), placeholder.formatPlaceholder(null, null, "list_parties_by_name_1_id"));
assertEquals(party1.getId().toString(), placeholder.formatPlaceholder(player1, null, "list_parties_by_name_1_id"));
}

@Test
Expand All @@ -302,24 +302,24 @@ else if (((int) args.getArgument(2)) == 2)
PartiesPlaceholder placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_online_members_1");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_ONLINE_MEMBERS_NUMBER, placeholder);
assertEquals(party3.getName(), placeholder.formatPlaceholder(null, null, "list_parties_by_online_members_1"));
assertEquals(party3.getName(), placeholder.formatPlaceholder(player1, null, "list_parties_by_online_members_1"));

placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_online_members_2");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_ONLINE_MEMBERS_NUMBER, placeholder);
assertEquals(party2.getName(), placeholder.formatPlaceholder(null, null, "list_parties_by_online_members_2"));
assertEquals(party2.getName(), placeholder.formatPlaceholder(player1, null, "list_parties_by_online_members_2"));

// No more parties
placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_online_members_4");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_ONLINE_MEMBERS_NUMBER, placeholder);
assertEquals("", placeholder.formatPlaceholder(null, null, "list_parties_by_online_members_4"));
assertEquals("", placeholder.formatPlaceholder(player1, null, "list_parties_by_online_members_4"));

// Placeholder
placeholder = PartiesPlaceholder.getPlaceholder("list_parties_by_online_members_1_id");

assertEquals(PartiesPlaceholder.LIST_PARTIES_BY_ONLINE_MEMBERS_NUMBER_PLACEHOLDER, placeholder);
assertEquals(party3.getId().toString(), placeholder.formatPlaceholder(null, null, "list_parties_by_online_members_1_id"));
assertEquals(party3.getId().toString(), placeholder.formatPlaceholder(player1, null, "list_parties_by_online_members_1_id"));
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion output/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>output</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion output/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.alessiodp.parties</groupId>
<artifactId>parties</artifactId>
<version>3.2.10</version>
<version>3.2.11</version>
<packaging>pom</packaging>

<name>Parties</name>
Expand Down
4 changes: 2 additions & 2 deletions velocity/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-velocity</artifactId>
Expand Down Expand Up @@ -75,7 +75,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-common</artifactId>
<version>3.2.10</version>
<version>3.2.11</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.10</version>
<version>3.2.11</version>
</parent>

<artifactId>parties-velocity</artifactId>
Expand Down

0 comments on commit 464528c

Please sign in to comment.