3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-08 17:20:24 +01:00

Compatibility for 16w38a and sync with master

Dieser Commit ist enthalten in:
Matsv 2016-09-20 16:43:42 +02:00
Commit a330d2b148
8 geänderte Dateien mit 40 neuen und 84 gelöschten Zeilen

Datei anzeigen

@ -1,12 +1,11 @@
### What version of ViaVersion are you using? Type /ver viaversion ### What is the output link of /viaversion dump?
### What version of Spigot are you using? Type /ver
### What plugins are you using? Type /plugins
### Are you using any additional software like BungeeCord? If so, what software and version? (Please list your plugins as well) ### Are you using any additional software like BungeeCord? If so, what software and version? (Please list your plugins as well)
### How does this error happen? login? Using an item? ### How does this error happen? login? Using an item?
### Is there an error in the console? Use pastebin.com. Is there a kick message? ### Is there an error in the console? Use pastebin.com. Is there a kick message?

Datei anzeigen

@ -1,4 +1,4 @@
# ViaVersion 0.9.8 # ViaVersion 0.9.9
[![Build Status](https://travis-ci.org/MylesIsCool/ViaVersion.svg?branch=master)](https://travis-ci.org/MylesIsCool/ViaVersion) [![Build Status](https://travis-ci.org/MylesIsCool/ViaVersion.svg?branch=master)](https://travis-ci.org/MylesIsCool/ViaVersion)
[![Gitter](https://badges.gitter.im/MylesIsCool/ViaVersion.svg)](https://gitter.im/MylesIsCool/ViaVersion) [![Gitter](https://badges.gitter.im/MylesIsCool/ViaVersion.svg)](https://gitter.im/MylesIsCool/ViaVersion)

Datei anzeigen

@ -10,7 +10,7 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<name>ViaVersion</name> <name>ViaVersion</name>
<description>Allow 1.8 clients to join 1.9 bukkit servers!</description> <description>Allow newer clients to join older server versions.</description>
<inceptionYear>2016</inceptionYear> <inceptionYear>2016</inceptionYear>
<url>https://www.spigotmc.org/resources/viaversion.19254/</url> <url>https://www.spigotmc.org/resources/viaversion.19254/</url>

Datei anzeigen

@ -9,7 +9,7 @@ public class Bungee extends Plugin {
@Override @Override
public void onEnable() { public void onEnable() {
getLogger().severe(RED + "==============================================="); getLogger().severe(RED + "===============================================");
getLogger().severe(RED + "ViaVersion is NOT a Bungeecord plugin"); getLogger().severe(RED + "ViaVersion is NOT a Bungeecord plugin.");
getLogger().severe(RED + "Install this plugin on all your spigot/bukkit"); getLogger().severe(RED + "Install this plugin on all your spigot/bukkit");
getLogger().severe(RED + "servers and use the latest Bungeecord version"); getLogger().severe(RED + "servers and use the latest Bungeecord version");
getLogger().severe(RED + "to make ViaVersion work with BungeeCord."); getLogger().severe(RED + "to make ViaVersion work with BungeeCord.");

Datei anzeigen

@ -7,8 +7,8 @@ import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.SocketChannel;
import lombok.Getter; import lombok.Getter;
import lombok.NonNull; import lombok.NonNull;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;

Datei anzeigen

@ -17,6 +17,7 @@ public interface ViaVersionAPI {
* *
* @param player Bukkit player object * @param player Bukkit player object
* @return True if the client is modified (At the moment it also means version 1.9 and higher) * @return True if the client is modified (At the moment it also means version 1.9 and higher)
* @deprecated As of 0.9.9, because all players are ported use {@link #getPlayerVersion(Player)}
*/ */
boolean isPorted(Player player); boolean isPorted(Player player);
@ -42,7 +43,9 @@ public interface ViaVersionAPI {
* *
* @param playerUUID UUID of a player * @param playerUUID UUID of a player
* @return True if the client is on 1.9 * @return True if the client is on 1.9
* @deprecated As of 0.9.9, because all players are ported use {@link #getPlayerVersion(UUID)}
*/ */
@Deprecated
boolean isPorted(UUID playerUUID); boolean isPorted(UUID playerUUID);
/** /**
@ -116,9 +119,9 @@ public interface ViaVersionAPI {
/** /**
* Get the supported protocol versions * Get the supported protocol versions
* This method removes any blocked protocol versions. * This method removes any blocked protocol versions.
* @see ProtocolRegistry#getSupportedVersions() for full list.
* *
* @return a list of protocol versions * @return a list of protocol versions
* @see ProtocolRegistry#getSupportedVersions() for full list.
*/ */
SortedSet<Integer> getSupportedVersions(); SortedSet<Integer> getSupportedVersions();

Datei anzeigen

@ -21,169 +21,123 @@ public abstract class ListWrapper implements List {
@Override @Override
public synchronized int size() { public synchronized int size() {
synchronized (lock) {
return this.list.size(); return this.list.size();
} }
}
@Override @Override
public synchronized boolean isEmpty() { public synchronized boolean isEmpty() {
synchronized (lock) {
return this.list.isEmpty(); return this.list.isEmpty();
} }
}
@Override @Override
public synchronized boolean contains(Object o) { public synchronized boolean contains(Object o) {
synchronized (lock) {
return this.list.contains(o); return this.list.contains(o);
} }
}
@Override @Override
public synchronized Iterator iterator() { public synchronized Iterator iterator() {
synchronized (lock) {
return listIterator(); return listIterator();
} }
}
@Override @Override
public synchronized Object[] toArray() { public synchronized Object[] toArray() {
synchronized (lock) {
return this.list.toArray(); return this.list.toArray();
} }
}
@Override @Override
public synchronized boolean add(Object o) { public synchronized boolean add(Object o) {
synchronized (lock) {
handleAdd(o); handleAdd(o);
return this.list.add(o); return this.list.add(o);
} }
}
@Override @Override
public synchronized boolean remove(Object o) { public synchronized boolean remove(Object o) {
synchronized (lock) {
return this.list.remove(o); return this.list.remove(o);
} }
}
@Override @Override
public synchronized boolean addAll(Collection c) { public synchronized boolean addAll(Collection c) {
synchronized (lock) {
for (Object o : c) { for (Object o : c) {
handleAdd(o); handleAdd(o);
} }
return this.list.addAll(c); return this.list.addAll(c);
} }
}
@Override @Override
public synchronized boolean addAll(int index, Collection c) { public synchronized boolean addAll(int index, Collection c) {
synchronized (lock) {
for (Object o : c) { for (Object o : c) {
handleAdd(o); handleAdd(o);
} }
return this.list.addAll(index, c); return this.list.addAll(index, c);
} }
}
@Override @Override
public synchronized void clear() { public synchronized void clear() {
synchronized (lock) {
this.list.clear(); this.list.clear();
} }
}
@Override @Override
public synchronized Object get(int index) { public synchronized Object get(int index) {
synchronized (lock) {
return this.list.get(index); return this.list.get(index);
} }
}
@Override @Override
public synchronized Object set(int index, Object element) { public synchronized Object set(int index, Object element) {
synchronized (lock) {
return this.list.set(index, element); return this.list.set(index, element);
} }
}
@Override @Override
public synchronized void add(int index, Object element) { public synchronized void add(int index, Object element) {
synchronized (lock) {
this.list.add(index, element); this.list.add(index, element);
} }
}
@Override @Override
public synchronized Object remove(int index) { public synchronized Object remove(int index) {
synchronized (lock) {
return this.list.remove(index); return this.list.remove(index);
} }
}
@Override @Override
public synchronized int indexOf(Object o) { public synchronized int indexOf(Object o) {
synchronized (lock) {
return this.list.indexOf(o); return this.list.indexOf(o);
} }
}
@Override @Override
public synchronized int lastIndexOf(Object o) { public synchronized int lastIndexOf(Object o) {
synchronized (lock) {
return this.list.lastIndexOf(o); return this.list.lastIndexOf(o);
} }
}
@Override @Override
public synchronized ListIterator listIterator() { public synchronized ListIterator listIterator() {
synchronized (lock) {
return this.list.listIterator(); return this.list.listIterator();
} }
}
@Override @Override
public synchronized ListIterator listIterator(int index) { public synchronized ListIterator listIterator(int index) {
synchronized (lock) {
return this.list.listIterator(index); return this.list.listIterator(index);
} }
}
@Override @Override
public synchronized List subList(int fromIndex, int toIndex) { public synchronized List subList(int fromIndex, int toIndex) {
synchronized (lock) {
return this.list.subList(fromIndex, toIndex); return this.list.subList(fromIndex, toIndex);
} }
}
@Override @Override
public synchronized boolean retainAll(Collection c) { public synchronized boolean retainAll(Collection c) {
synchronized (lock) {
return this.list.retainAll(c); return this.list.retainAll(c);
} }
}
@Override @Override
public synchronized boolean removeAll(Collection c) { public synchronized boolean removeAll(Collection c) {
synchronized (lock) {
return this.list.removeAll(c); return this.list.removeAll(c);
} }
}
@Override @Override
public synchronized boolean containsAll(Collection c) { public synchronized boolean containsAll(Collection c) {
synchronized (lock) {
return this.list.containsAll(c); return this.list.containsAll(c);
} }
}
@Override @Override
public synchronized Object[] toArray(Object[] a) { public synchronized Object[] toArray(Object[] a) {
synchronized (lock) {
return this.list.toArray(a); return this.list.toArray(a);
} }
}
} }

Datei anzeigen

@ -1,6 +1,6 @@
name: ViaVersion name: ViaVersion
main: us.myles.ViaVersion.ViaVersionPlugin main: us.myles.ViaVersion.ViaVersionPlugin
author: _MylesC authors: [_MylesC, Matsv]
version: ${project.version} version: ${project.version}
load: postworld load: postworld
loadbefore: [ProtocolLib, ProxyPipe, SpigotLib, SkinRestorer] loadbefore: [ProtocolLib, ProxyPipe, SpigotLib, SkinRestorer]