Transfer ops for player online. Not going to risk it though.

This commit is contained in:
Rsl1122 2018-02-12 14:46:17 +02:00
parent 78b4abc0a3
commit cb1290340a
3 changed files with 13 additions and 0 deletions

View File

@ -31,6 +31,8 @@ public interface TransferOperations {
void storeConfigSettings(String encodedSettingString) throws DBException;
void playerOnline(UUID playerUUID) throws DBException;
// Get
Map<UUID, String> getEncodedPlayerHtml() throws DBException;

View File

@ -122,4 +122,13 @@ public class SQLTransferOps extends SQLOps implements TransferOperations {
throw SQLErrorUtil.getExceptionFor(e);
}
}
@Override
public void playerOnline(UUID playerUUID) throws DBException {
try {
transferTable.storePlayerOnlineOnThisServer(playerUUID);
} catch (SQLException e) {
throw SQLErrorUtil.getExceptionFor(e);
}
}
}

View File

@ -10,6 +10,7 @@ import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
import utilities.RandomData;
import utilities.Teardown;
import utilities.mocks.SystemMockUtil;
import utilities.mocks.objects.MockUtils;
@ -30,6 +31,7 @@ public class FormatUtilsTest {
public static void setUpClass() throws Exception {
SystemMockUtil.setUp(temporaryFolder.getRoot())
.enableConfigSystem();
Teardown.resetSettingsTempValues();
}
@Test