mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
send sitting config changes to the server when editing while online
This commit is contained in:
parent
0ff8f44f89
commit
8a4eee31bc
1 changed files with 8 additions and 0 deletions
|
@ -8,7 +8,9 @@ import net.minecraft.text.Text;
|
|||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Util;
|
||||
import one.oth3r.sit.file.CustomFile;
|
||||
import one.oth3r.sit.file.SittingConfig;
|
||||
import one.oth3r.sit.utl.Data;
|
||||
import one.oth3r.sit.utl.Utl;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.file.Paths;
|
||||
|
@ -58,6 +60,12 @@ public class UnderConstructionScreen<T extends CustomFile<T>> extends Screen {
|
|||
(button) -> {
|
||||
this.file.load();
|
||||
this.file.save();
|
||||
|
||||
// send the settings to the server if editing the sitting file and on a supported server
|
||||
if (this.file instanceof SittingConfig && Data.isSupportedServer()) {
|
||||
Utl.sendSettingsPackets();
|
||||
}
|
||||
|
||||
this.client.setScreen(parent);
|
||||
})
|
||||
.dimensions(0, 0, 140,20).build());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue