forked from sorceress/EasyAuth
Resolving merge conflicts
This commit is contained in:
parent
2f7d4d5568
commit
d198a67346
|
@ -20,6 +20,7 @@ import java.io.FileReader;
|
|||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
package org.samo_lego.simpleauth.storage;
|
||||
|
||||
import com.google.gson.*;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -121,8 +118,6 @@ public class PlayerCache {
|
|||
playerCache.lastIp = player.getIp();
|
||||
|
||||
playerCache.wasInPortal = player.getBlockState().getBlock().equals(Blocks.NETHER_PORTAL);
|
||||
playerCache.lastAir = player.getAir();
|
||||
playerCache.wasOnFire = player.isOnFire();
|
||||
|
||||
// Setting position cache
|
||||
playerCache.lastLocation.dimension = player.getServerWorld();
|
||||
|
@ -132,8 +127,6 @@ public class PlayerCache {
|
|||
}
|
||||
else {
|
||||
playerCache.wasInPortal = false;
|
||||
playerCache.lastAir = 300;
|
||||
playerCache.wasOnFire = false;
|
||||
}
|
||||
|
||||
return playerCache;
|
||||
|
|
|
@ -64,7 +64,7 @@ public class LevelDB {
|
|||
* @return true if operation was successful, otherwise false
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean registerUser(String uuid, String data) {
|
||||
public static boolean registerUser(String uuid, String data) {
|
||||
try {
|
||||
if(!isUserRegistered(uuid)) {
|
||||
levelDBStore.put(bytes("UUID:" + uuid), bytes("data:" + data));
|
||||
|
@ -112,7 +112,7 @@ public class LevelDB {
|
|||
* @param data data to put inside database
|
||||
*/
|
||||
@Deprecated
|
||||
public void updateUserData(String uuid, String data) {
|
||||
public static void updateUserData(String uuid, String data) {
|
||||
try {
|
||||
levelDBStore.put(bytes("UUID:" + uuid), bytes("data:" + data));
|
||||
} catch (Error e) {
|
||||
|
|
|
@ -32,6 +32,7 @@ public class MongoDB {
|
|||
config.mongoDBCredentials.useSsl
|
||||
|
||||
)
|
||||
playerCache.wasOnFire = false;
|
||||
);*/
|
||||
mongoClient = MongoClients.create(String.format("mongodb://%s:%d", config.mongoDBCredentials.host, config.mongoDBCredentials.port));
|
||||
MongoDatabase database = mongoClient.getDatabase(config.mongoDBCredentials.databaseName);
|
||||
|
|
Loading…
Reference in New Issue