mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 12:42:36 +00:00
Switched to storing UUID instead of username, with Offline Mode compatibility
This commit is contained in:
1 parent
ba76cb4c0b
commit
60ded66263
17 files changed
+167
-86
No files matched your search
@@ -15,6 +15,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import crazypants.util.PlayerUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -66,7 +67,7 @@ public class ServerChannelRegister extends ChannelRegister {
|
||||
}
|
||||
int oridinal = reader.nextInt();
|
||||
|
||||
Channel chan = new Channel(name, user, ChannelType.values()[oridinal]);
|
||||
Channel chan = new Channel(name, PlayerUtil.getPlayerUIDUnstable(user), ChannelType.values()[oridinal]);
|
||||
instance.addChannel(chan);
|
||||
|
||||
reader.endObject();
|
||||
@@ -144,7 +145,7 @@ public class ServerChannelRegister extends ChannelRegister {
|
||||
writer.beginObject();
|
||||
writer.name("name").value(chan.getName());
|
||||
if(chan.getUser() != null) {
|
||||
writer.name("user").value(chan.getUser());
|
||||
writer.name("user").value(chan.getUser().toString());
|
||||
}
|
||||
writer.name("type").value(chan.getType().ordinal());
|
||||
writer.endObject();
|
||||
|
||||
Reference in new issue
Block a user