Skip to content

Commit

Permalink
Remove unused chat-types setting from config.yml (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Aug 14, 2023
1 parent 43e2b24 commit e0b7426
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
import java.io.File;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.checkerframework.checker.nullness.qual.Nullable;

public class ViaBackwardsConfig extends Config implements com.viaversion.viabackwards.api.ViaBackwardsConfig {

Expand All @@ -34,7 +32,6 @@ public class ViaBackwardsConfig extends Config implements com.viaversion.viaback
private boolean alwaysShowOriginalMobName;
private boolean fix1_13FormattedInventoryTitles;
private boolean handlePingsAsInvAcknowledgements;
private Map<String, String> chatTypeFormats;

public ViaBackwardsConfig(File configFile) {
super(configFile);
Expand All @@ -53,7 +50,6 @@ private void loadFields() {
fix1_13FormattedInventoryTitles = getBoolean("fix-formatted-inventory-titles", true);
alwaysShowOriginalMobName = getBoolean("always-show-original-mob-name", true);
handlePingsAsInvAcknowledgements = getBoolean("handle-pings-as-inv-acknowledgements", false);
chatTypeFormats = get("chat-types-1_19_1", Map.class, new HashMap<String, String>());
}

@Override
Expand Down Expand Up @@ -86,11 +82,6 @@ public boolean handlePingsAsInvAcknowledgements() {
return handlePingsAsInvAcknowledgements || Boolean.getBoolean("com.viaversion.handlePingsAsInvAcknowledgements");
}

@Override
public @Nullable String chatTypeFormat(final String translationKey) {
return chatTypeFormats.get(translationKey);
}

@Override
public URL getDefaultConfigURL() {
return getClass().getClassLoader().getResource("assets/viabackwards/config.yml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
package com.viaversion.viabackwards.api;

import org.checkerframework.checker.nullness.qual.Nullable;

public interface ViaBackwardsConfig {

/**
Expand Down Expand Up @@ -52,6 +50,4 @@ public interface ViaBackwardsConfig {
boolean alwaysShowOriginalMobName();

boolean handlePingsAsInvAcknowledgements();

@Nullable String chatTypeFormat(String translationKey);
}
12 changes: 1 addition & 11 deletions common/src/main/resources/assets/viabackwards/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,4 @@ fix-formatted-inventory-titles: true
#
# Sends inventory acknowledgement packets to act as a replacement for ping packets for sub 1.17 clients.
# This only takes effect for ids in the short range. Useful for anticheat compatibility.
handle-pings-as-inv-acknowledgements: false
#
# 1.19.1 chat type formats.
chat-types-1_19_1:
"chat.type.text": "<%s> %s"
"chat.type.announcement": "[%s] %s"
"commands.message.display.incoming": "%s whispers to you: %s"
"commands.message.display.outgoing": "You whisper to %s: %s"
"chat.type.team.text": "%s <%s> %s"
"chat.type.team.sent": "-> %s <%s> %s"
"chat.type.emote": "* %s %s"
handle-pings-as-inv-acknowledgements: false

0 comments on commit e0b7426

Please sign in to comment.