-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix papi placeholders when using world or placeholder requirements
- Loading branch information
Showing
4 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package sh.okx.rankup; | ||
|
||
|
||
import be.seeseemelk.mockbukkit.entity.PlayerMock; | ||
import org.bukkit.Location; | ||
import org.junit.jupiter.api.Test; | ||
import sh.okx.rankup.placeholders.RankupExpansion; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class WorldRequirementTest extends RankupTest { | ||
|
||
public WorldRequirementTest() { | ||
super("world"); | ||
} | ||
|
||
@Test | ||
public void testStatusComplete() { | ||
PlayerMock player = server.addPlayer(); | ||
groupProvider.addGroup(player.getUniqueId(), "a"); | ||
|
||
RankupExpansion expansion = plugin.getPlaceholders().getExpansion(); | ||
assertEquals("0", expansion.placeholder(player, "requirement_world_percent_done")); | ||
|
||
player.teleport(new Location(server.getWorld("the_nether"), 0, 0, 0)); | ||
|
||
assertEquals("100", expansion.placeholder(player, "requirement_world_percent_done")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
a: | ||
rank: 'a' | ||
next: 'b' | ||
requirements: | ||
- 'world the_nether' |