first commit
Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
This commit is contained in:
commit
bbccd4a815
454 files changed
+45050
No files matched your search
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class AbstractValueList<T>
|
||||
implements List<T> {
|
||||
protected final List<T> list;
|
||||
|
||||
protected AbstractValueList(T ... values) {
|
||||
this(Arrays.asList(values));
|
||||
}
|
||||
|
||||
protected AbstractValueList(List<T> values) {
|
||||
this.list = Collections.unmodifiableList(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return this.list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return this.list.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(Object o) {
|
||||
return this.list.contains(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<T> iterator() {
|
||||
return this.list.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return this.list.toArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T[] toArray(T[] a) {
|
||||
return this.list.toArray(a);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean add(T s) {
|
||||
return (Boolean)AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Object o) {
|
||||
return (Boolean)AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAll(Collection<?> c) {
|
||||
return this.list.containsAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(Collection<? extends T> c) {
|
||||
return (Boolean)AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(int index, Collection<? extends T> c) {
|
||||
return (Boolean)AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeAll(Collection<?> c) {
|
||||
return (Boolean)AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAll(Collection<?> c) {
|
||||
return (Boolean)AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T get(int index) {
|
||||
return this.list.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public T set(int index, T element) {
|
||||
return AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(int index, T element) {
|
||||
AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T remove(int index) {
|
||||
return AbstractValueList.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int indexOf(Object o) {
|
||||
return this.list.indexOf(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int lastIndexOf(Object o) {
|
||||
return this.list.lastIndexOf(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListIterator<T> listIterator() {
|
||||
return this.list.listIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListIterator<T> listIterator(int index) {
|
||||
return this.list.listIterator(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<T> subList(int fromIndex, int toIndex) {
|
||||
return this.list.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || this.getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AbstractValueList that = (AbstractValueList)o;
|
||||
return Objects.equals(this.list, that.list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.list.hashCode();
|
||||
}
|
||||
|
||||
private static <T> T throwException() {
|
||||
throw new UnsupportedOperationException("Can't modify config entries");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class AbstractValueMap<K, V>
|
||||
implements Map<K, V> {
|
||||
protected final Map<K, V> map;
|
||||
|
||||
protected AbstractValueMap(Map<K, V> map) {
|
||||
this.map = Collections.unmodifiableMap(new LinkedHashMap<K, V>(map));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return this.map.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return this.map.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsKey(Object key) {
|
||||
return this.map.containsKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsValue(Object value) {
|
||||
return this.map.containsValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public V get(Object key) {
|
||||
return this.map.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public V put(K key, V value) {
|
||||
return (V)AbstractValueMap.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public V remove(Object key) {
|
||||
return (V)AbstractValueMap.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putAll(Map<? extends K, ? extends V> m) {
|
||||
AbstractValueMap.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
AbstractValueMap.throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<K> keySet() {
|
||||
return this.map.keySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<V> values() {
|
||||
return this.map.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Map.Entry<K, V>> entrySet() {
|
||||
return this.map.entrySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || this.getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AbstractValueMap that = (AbstractValueMap)o;
|
||||
return this.map.equals(that.map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.map.hashCode();
|
||||
}
|
||||
|
||||
private static <T> T throwException() {
|
||||
throw new UnsupportedOperationException("Can't modify config entries");
|
||||
}
|
||||
|
||||
public static abstract class Builder<K, V, M extends AbstractValueMap<K, V>> {
|
||||
protected final Map<K, V> map = new LinkedHashMap();
|
||||
|
||||
protected Builder() {
|
||||
}
|
||||
|
||||
public Builder<K, V, M> put(K key, V value) {
|
||||
this.map.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<K, V, M> putAll(Map<K, V> map) {
|
||||
this.map.putAll(map);
|
||||
return this;
|
||||
}
|
||||
|
||||
public abstract M build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.AbstractValueList;
|
||||
import java.util.List;
|
||||
|
||||
public class IntegerList
|
||||
extends AbstractValueList<Integer> {
|
||||
protected IntegerList(Integer ... values) {
|
||||
super(values);
|
||||
}
|
||||
|
||||
protected IntegerList(List<Integer> values) {
|
||||
super(values);
|
||||
}
|
||||
|
||||
public static IntegerList of(Integer ... values) {
|
||||
return new IntegerList(values);
|
||||
}
|
||||
|
||||
public static IntegerList of(List<Integer> values) {
|
||||
return new IntegerList(values);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.AbstractValueList;
|
||||
import java.util.List;
|
||||
|
||||
public class StringList
|
||||
extends AbstractValueList<String> {
|
||||
protected StringList(String ... values) {
|
||||
super(values);
|
||||
}
|
||||
|
||||
protected StringList(List<String> values) {
|
||||
super(values);
|
||||
}
|
||||
|
||||
public static StringList of(String ... values) {
|
||||
return new StringList(values);
|
||||
}
|
||||
|
||||
public static StringList of(List<String> values) {
|
||||
return new StringList(values);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.AbstractValueMap;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
public class StringMap
|
||||
extends AbstractValueMap<String, String> {
|
||||
protected StringMap(Map<String, String> map) {
|
||||
super(map);
|
||||
}
|
||||
|
||||
public static StringMap of(Map<String, String> map) {
|
||||
return new StringMap(map);
|
||||
}
|
||||
|
||||
public static StringMap of() {
|
||||
return new StringMap(Collections.emptyMap());
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static class Builder
|
||||
extends AbstractValueMap.Builder<String, String, StringMap> {
|
||||
@Override
|
||||
public StringMap build() {
|
||||
return new StringMap(this.map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.annotation.Nullable
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.IntegerList;
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class IntegerListValueSerializer
|
||||
implements ValueSerializer<IntegerList> {
|
||||
public static final IntegerListValueSerializer INSTANCE = new IntegerListValueSerializer();
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IntegerList deserialize(String str) {
|
||||
ArrayList<Integer> resultList = new ArrayList<Integer>();
|
||||
for (String s : str.split(",")) {
|
||||
try {
|
||||
resultList.add(Integer.valueOf(s));
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return IntegerList.of(resultList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(IntegerList val) {
|
||||
ArrayList<String> resultList = new ArrayList<String>(val.size());
|
||||
for (Integer i : val) {
|
||||
resultList.add(String.valueOf(i));
|
||||
}
|
||||
return String.join((CharSequence)",", resultList);
|
||||
}
|
||||
}
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.StringList;
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class StringListValueSerializer
|
||||
implements ValueSerializer<StringList> {
|
||||
public static final StringListValueSerializer INSTANCE = new StringListValueSerializer();
|
||||
|
||||
@Override
|
||||
public StringList deserialize(String str) {
|
||||
ArrayList<String> resultList = new ArrayList<String>();
|
||||
for (String s : str.split("(?<!\\\\),")) {
|
||||
resultList.add(s.replace("\\,", ","));
|
||||
}
|
||||
return StringList.of(resultList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(StringList val) {
|
||||
ArrayList<String> resultList = new ArrayList<String>(val.size());
|
||||
for (String str : val) {
|
||||
resultList.add(str.replace(",", "\\,"));
|
||||
}
|
||||
return String.join((CharSequence)",", resultList);
|
||||
}
|
||||
}
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.annotation.Nullable
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.StringMap;
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class StringMapValueSerializer
|
||||
implements ValueSerializer<StringMap> {
|
||||
public static final StringMapValueSerializer INSTANCE = new StringMapValueSerializer();
|
||||
public static final Pattern QUOTE_ESCAPE_PATTERN = Pattern.compile("\"((?:(?![\"\\\\]).|\\\\.)*)\"\\s*=\\s*\"((?:(?![\"\\\\]).|\\\\.)*)\"");
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public StringMap deserialize(String str) {
|
||||
boolean matches = QUOTE_ESCAPE_PATTERN.splitAsStream(str).allMatch(s -> s.trim().isEmpty() || s.trim().equals(","));
|
||||
if (!matches) {
|
||||
return null;
|
||||
}
|
||||
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
|
||||
Matcher matcher = QUOTE_ESCAPE_PATTERN.matcher(str);
|
||||
while (matcher.find()) {
|
||||
map.put(StringMapValueSerializer.unescape(matcher.group(1)), StringMapValueSerializer.unescape(matcher.group(2)));
|
||||
}
|
||||
return StringMap.of(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(StringMap val) {
|
||||
ArrayList<String> resultList = new ArrayList<String>(val.size());
|
||||
for (Map.Entry entry : val.entrySet()) {
|
||||
resultList.add("\"" + StringMapValueSerializer.escape((String)entry.getKey()) + "\"=\"" + StringMapValueSerializer.escape((String)entry.getValue()) + "\"");
|
||||
}
|
||||
return String.join((CharSequence)",", resultList);
|
||||
}
|
||||
|
||||
private static String escape(String input) {
|
||||
return input.replace("\\", "\\\\").replace("\"", "\\\"");
|
||||
}
|
||||
|
||||
private static String unescape(String input) {
|
||||
return input.replace("\\\"", "\"").replace("\\\\", "\\");
|
||||
}
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.UUID;
|
||||
|
||||
public class UUIDSerializer
|
||||
implements ValueSerializer<UUID> {
|
||||
public static final UUIDSerializer INSTANCE = new UUIDSerializer();
|
||||
|
||||
@Override
|
||||
public UUID deserialize(String str) {
|
||||
return UUID.fromString(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(UUID val) {
|
||||
return val.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user