Skip to content

Commit

Permalink
fix: no canEdit() check needed in SyncTranslationMessageToClient
Browse files Browse the repository at this point in the history
This is coming from server, just accept the translation update!
  • Loading branch information
desht committed Oct 31, 2024
1 parent 65d7f6d commit baad4dc
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import dev.ftb.mods.ftbquests.client.ClientQuestFile;
import dev.ftb.mods.ftbquests.quest.QuestObjectBase;
import dev.ftb.mods.ftbquests.quest.translation.TranslationKey;
import dev.ftb.mods.ftbquests.util.NetUtils;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
Expand Down Expand Up @@ -52,7 +51,7 @@ public Type<? extends CustomPacketPayload> type() {
public static void handle(SyncTranslationMessageToClient message, NetworkManager.PacketContext context) {
context.queue(() -> {
ClientQuestFile file = ClientQuestFile.INSTANCE;
if (file.isValid() && NetUtils.canEdit(context)) {
if (file.isValid()) {
QuestObjectBase object = file.getBase(message.id);
if (object != null) {
message.val.ifLeft(str -> file.getTranslationManager().addTranslation(object, message.locale, message.subKey, str))
Expand Down

0 comments on commit baad4dc

Please sign in to comment.