-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: temporary player data is now stored for more perma use
- Loading branch information
Showing
13 changed files
with
146 additions
and
40 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
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
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
95 changes: 95 additions & 0 deletions
95
...c/main/java/com/sekwah/advancedportals/core/repository/impl/PlayerDataRepositoryImpl.java
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,95 @@ | ||
package com.sekwah.advancedportals.core.repository.impl; | ||
|
||
import com.google.inject.Inject; | ||
import com.sekwah.advancedportals.core.connector.containers.PlayerContainer; | ||
import com.sekwah.advancedportals.core.destination.Destination; | ||
import com.sekwah.advancedportals.core.repository.ConfigRepository; | ||
import com.sekwah.advancedportals.core.repository.IPlayerDataRepository; | ||
import com.sekwah.advancedportals.core.serializeddata.BlockLocation; | ||
import com.sekwah.advancedportals.core.serializeddata.DataStorage; | ||
import com.sekwah.advancedportals.core.serializeddata.PlayerLocation; | ||
import com.sekwah.advancedportals.core.serializeddata.PlayerData; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
public class PlayerDataRepositoryImpl implements IPlayerDataRepository { | ||
|
||
private final String fileLocation = "playerData/"; | ||
|
||
@Inject | ||
private ConfigRepository configRepository; | ||
|
||
@Inject | ||
DataStorage dataStorage; | ||
|
||
@Override | ||
public boolean save(String name, PlayerData playerData) { | ||
return dataStorage.storeJson(playerData, fileLocation + name + ".json"); | ||
} | ||
|
||
@Override | ||
public boolean containsKey(String name) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean delete(String name) { | ||
return dataStorage.deleteFile(fileLocation + name + ".json"); | ||
} | ||
|
||
@Override | ||
public PlayerData get(String name) { | ||
return dataStorage.loadJson(PlayerData.class, fileLocation + name + ".json"); | ||
} | ||
|
||
@Override | ||
public List<String> getAllNames() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public List<PlayerData> getAll() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void addSelectedPortal(UUID selectedPlayer, String portal) { | ||
|
||
} | ||
|
||
@Override | ||
public void removeSelectedPortal(UUID uuid) { | ||
|
||
} | ||
|
||
@Override | ||
public void addSelectedPosition(UUID uuid, boolean isPos1, BlockLocation portalLocation) { | ||
|
||
} | ||
|
||
@Override | ||
public void removeSelectedPosition(UUID uuid, boolean isPos1) { | ||
|
||
} | ||
|
||
@Override | ||
public void removeAllSelectedHand(UUID uuid) { | ||
|
||
} | ||
|
||
@Override | ||
public void activateCooldown(PlayerContainer player) { | ||
|
||
} | ||
|
||
@Override | ||
public void playerLeave(PlayerContainer player) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean inPortalRegion(PlayerLocation loc) { | ||
return false; | ||
} | ||
} |
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
Oops, something went wrong.