mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-15 23:05:18 +01:00
Fix build
This commit is contained in:
parent
92493e826c
commit
d89f8e0e66
8
pom.xml
8
pom.xml
@ -865,6 +865,14 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Required to mock the LuckPerms API-->
|
||||
<dependency>
|
||||
<groupId>org.checkerframework</groupId>
|
||||
<artifactId>checker-qual</artifactId>
|
||||
<version>2.5.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JDBC drivers for datasource integration tests -->
|
||||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
|
@ -57,7 +57,7 @@ class DistributedFilesPersistenceHandler implements LimboPersistenceHandler {
|
||||
|
||||
@Override
|
||||
public LimboPlayer getLimboPlayer(Player player) {
|
||||
String uuid = PlayerUtils.getUuidOrName(player);
|
||||
String uuid = player.getUniqueId().toString();
|
||||
File file = getPlayerSegmentFile(uuid);
|
||||
Map<String, LimboPlayer> entries = readLimboPlayers(file);
|
||||
return entries == null ? null : entries.get(uuid);
|
||||
@ -65,7 +65,7 @@ class DistributedFilesPersistenceHandler implements LimboPersistenceHandler {
|
||||
|
||||
@Override
|
||||
public void saveLimboPlayer(Player player, LimboPlayer limbo) {
|
||||
String uuid = PlayerUtils.getUuidOrName(player);
|
||||
String uuid = player.getUniqueId().toString();
|
||||
File file = getPlayerSegmentFile(uuid);
|
||||
|
||||
Map<String, LimboPlayer> entries = null;
|
||||
@ -79,17 +79,17 @@ class DistributedFilesPersistenceHandler implements LimboPersistenceHandler {
|
||||
entries = new HashMap<>();
|
||||
}
|
||||
|
||||
entries.put(PlayerUtils.getUuidOrName(player), limbo);
|
||||
entries.put(uuid, limbo);
|
||||
saveEntries(entries, file);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeLimboPlayer(Player player) {
|
||||
String uuid = PlayerUtils.getUuidOrName(player);
|
||||
String uuid = player.getUniqueId().toString();
|
||||
File file = getPlayerSegmentFile(uuid);
|
||||
if (file.exists()) {
|
||||
Map<String, LimboPlayer> entries = readLimboPlayers(file);
|
||||
if (entries != null && entries.remove(PlayerUtils.getUuidOrName(player)) != null) {
|
||||
if (entries != null && entries.remove(uuid) != null) {
|
||||
saveEntries(entries, file);
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class IndividualFilesPersistenceHandler implements LimboPersistenceHandler {
|
||||
|
||||
@Override
|
||||
public LimboPlayer getLimboPlayer(Player player) {
|
||||
String id = PlayerUtils.getUuidOrName(player);
|
||||
String id = player.getUniqueId().toString();
|
||||
File file = new File(cacheDir, id + File.separator + "data.json");
|
||||
if (!file.exists()) {
|
||||
return null;
|
||||
@ -56,7 +56,7 @@ class IndividualFilesPersistenceHandler implements LimboPersistenceHandler {
|
||||
|
||||
@Override
|
||||
public void saveLimboPlayer(Player player, LimboPlayer limboPlayer) {
|
||||
String id = PlayerUtils.getUuidOrName(player);
|
||||
String id = player.getUniqueId().toString();
|
||||
try {
|
||||
File file = new File(cacheDir, id + File.separator + "data.json");
|
||||
Files.createParentDirs(file);
|
||||
@ -75,7 +75,7 @@ class IndividualFilesPersistenceHandler implements LimboPersistenceHandler {
|
||||
*/
|
||||
@Override
|
||||
public void removeLimboPlayer(Player player) {
|
||||
String id = PlayerUtils.getUuidOrName(player);
|
||||
String id = player.getUniqueId().toString();
|
||||
File file = new File(cacheDir, id);
|
||||
if (file.exists()) {
|
||||
FileUtils.purgeDirectory(file);
|
||||
|
Loading…
Reference in New Issue
Block a user