Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 00:22:51 +01:00
Optimize imports & reformat code
Dieser Commit ist enthalten in:
Ursprung
32afa2a9a3
Commit
573374866b
@ -15,7 +15,6 @@ import us.myles.ViaVersion.api.command.ViaCommandSender;
|
|||||||
import us.myles.ViaVersion.api.configuration.ConfigurationProvider;
|
import us.myles.ViaVersion.api.configuration.ConfigurationProvider;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.api.platform.ViaPlatform;
|
import us.myles.ViaVersion.api.platform.ViaPlatform;
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
|
||||||
import us.myles.ViaVersion.bukkit.BukkitCommandHandler;
|
import us.myles.ViaVersion.bukkit.BukkitCommandHandler;
|
||||||
import us.myles.ViaVersion.bukkit.BukkitCommandSender;
|
import us.myles.ViaVersion.bukkit.BukkitCommandSender;
|
||||||
import us.myles.ViaVersion.bukkit.BukkitViaAPI;
|
import us.myles.ViaVersion.bukkit.BukkitViaAPI;
|
||||||
|
@ -8,7 +8,6 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
|||||||
import us.myles.ViaVersion.api.Pair;
|
import us.myles.ViaVersion.api.Pair;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
import us.myles.ViaVersion.api.platform.ViaInjector;
|
import us.myles.ViaVersion.api.platform.ViaInjector;
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
|
||||||
import us.myles.ViaVersion.handlers.ViaVersionInitializer;
|
import us.myles.ViaVersion.handlers.ViaVersionInitializer;
|
||||||
import us.myles.ViaVersion.util.ConcurrentList;
|
import us.myles.ViaVersion.util.ConcurrentList;
|
||||||
import us.myles.ViaVersion.util.ListWrapper;
|
import us.myles.ViaVersion.util.ListWrapper;
|
||||||
|
@ -13,7 +13,6 @@ import us.myles.ViaVersion.api.platform.ViaPlatformLoader;
|
|||||||
import us.myles.ViaVersion.listeners.UpdateListener;
|
import us.myles.ViaVersion.listeners.UpdateListener;
|
||||||
import us.myles.ViaVersion.listeners.protocol1_9to1_8.*;
|
import us.myles.ViaVersion.listeners.protocol1_9to1_8.*;
|
||||||
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.ViaIdleThread;
|
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.HandItemProvider;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.HandItemProvider;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package us.myles.ViaVersion;
|
package us.myles.ViaVersion;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import us.myles.ViaVersion.api.command.ViaVersionCommand;
|
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.api.platform.ViaInjector;
|
import us.myles.ViaVersion.api.platform.ViaInjector;
|
||||||
import us.myles.ViaVersion.api.platform.ViaPlatform;
|
import us.myles.ViaVersion.api.platform.ViaPlatform;
|
||||||
|
@ -4,7 +4,6 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import us.myles.ViaVersion.api.boss.BossBar;
|
import us.myles.ViaVersion.api.boss.BossBar;
|
||||||
import us.myles.ViaVersion.api.boss.BossColor;
|
import us.myles.ViaVersion.api.boss.BossColor;
|
||||||
import us.myles.ViaVersion.api.boss.BossStyle;
|
import us.myles.ViaVersion.api.boss.BossStyle;
|
||||||
import us.myles.ViaVersion.api.command.ViaVersionCommand;
|
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
||||||
|
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
@ -75,7 +75,7 @@ public abstract class BossBar<T> {
|
|||||||
* @deprecated Deprecated use UUID's instead of Player objects {@link #addPlayer(UUID)}
|
* @deprecated Deprecated use UUID's instead of Player objects {@link #addPlayer(UUID)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public BossBar addPlayer(T player){
|
public BossBar addPlayer(T player) {
|
||||||
throw new NotImplementedException("This method is not implemented for the platform " + Via.getPlatform().getPlatformName());
|
throw new NotImplementedException("This method is not implemented for the platform " + Via.getPlatform().getPlatformName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ public abstract class BossBar<T> {
|
|||||||
* @deprecated Deprecated use UUID's instead of Player objects {@link #addPlayer(UUID)}
|
* @deprecated Deprecated use UUID's instead of Player objects {@link #addPlayer(UUID)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public BossBar addPlayers(T... players){
|
public BossBar addPlayers(T... players) {
|
||||||
throw new NotImplementedException("This method is not implemented for the platform " + Via.getPlatform().getPlatformName());
|
throw new NotImplementedException("This method is not implemented for the platform " + Via.getPlatform().getPlatformName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ public abstract class BossBar<T> {
|
|||||||
* @deprecated Deprecated use UUID's instead of Player objects {@link #removePlayer(UUID)}
|
* @deprecated Deprecated use UUID's instead of Player objects {@link #removePlayer(UUID)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public BossBar removePlayer(T player){
|
public BossBar removePlayer(T player) {
|
||||||
throw new NotImplementedException("This method is not implemented for the platform " + Via.getPlatform().getPlatformName());
|
throw new NotImplementedException("This method is not implemented for the platform " + Via.getPlatform().getPlatformName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,5 +22,5 @@ public interface ConfigurationProvider {
|
|||||||
*
|
*
|
||||||
* @return Map with key->values
|
* @return Map with key->values
|
||||||
*/
|
*/
|
||||||
Map<String,Object> getValues();
|
Map<String, Object> getValues();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package us.myles.ViaVersion.api.minecraft.metadata;
|
package us.myles.ViaVersion.api.minecraft.metadata;
|
||||||
|
|
||||||
import lombok.*;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
import us.myles.ViaVersion.api.type.Type;
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package us.myles.ViaVersion.api.platform;
|
package us.myles.ViaVersion.api.platform;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import jdk.nashorn.internal.runtime.regexp.joni.Config;
|
|
||||||
import us.myles.ViaVersion.api.ViaAPI;
|
import us.myles.ViaVersion.api.ViaAPI;
|
||||||
import us.myles.ViaVersion.api.ViaVersionConfig;
|
import us.myles.ViaVersion.api.ViaVersionConfig;
|
||||||
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
||||||
|
@ -64,6 +64,7 @@ public abstract class Protocol {
|
|||||||
protected void register(ViaProviders providers) {
|
protected void register(ViaProviders providers) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the packets for this protocol
|
* Register the packets for this protocol
|
||||||
*/
|
*/
|
||||||
|
@ -9,7 +9,6 @@ import us.myles.ViaVersion.api.command.ViaCommandSender;
|
|||||||
import us.myles.ViaVersion.api.command.ViaSubCommand;
|
import us.myles.ViaVersion.api.command.ViaSubCommand;
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
||||||
import us.myles.ViaVersion.dump.DumpTemplate;
|
import us.myles.ViaVersion.dump.DumpTemplate;
|
||||||
import us.myles.ViaVersion.dump.PluginInfo;
|
|
||||||
import us.myles.ViaVersion.dump.VersionInfo;
|
import us.myles.ViaVersion.dump.VersionInfo;
|
||||||
|
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
@ -18,8 +17,6 @@ import java.io.OutputStream;
|
|||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import com.google.gson.JsonObject;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@ -46,7 +46,7 @@ public class ChunkSection1_9to1_8 implements ChunkSection {
|
|||||||
setBlock(index(x, y, z), type, data);
|
setBlock(index(x, y, z), type, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getBlockId(int x, int y, int z){
|
public int getBlockId(int x, int y, int z) {
|
||||||
int index = blocks[index(x, y, z)];
|
int index = blocks[index(x, y, z)];
|
||||||
return palette.get(index) >> 4;
|
return palette.get(index) >> 4;
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ public enum MetaIndex {
|
|||||||
do {
|
do {
|
||||||
Optional<MetaIndex> optMeta = getIndex(currentType, index);
|
Optional<MetaIndex> optMeta = getIndex(currentType, index);
|
||||||
|
|
||||||
if (optMeta.isPresent()){
|
if (optMeta.isPresent()) {
|
||||||
return optMeta.get();
|
return optMeta.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,9 +8,10 @@ import java.util.*;
|
|||||||
/**
|
/**
|
||||||
* Created by wea_ondara licensed under MIT
|
* Created by wea_ondara licensed under MIT
|
||||||
* Same license as in LICENSE
|
* Same license as in LICENSE
|
||||||
*
|
* <p>
|
||||||
* Taken from:
|
* Taken from:
|
||||||
* https://github.com/weaondara/BungeePerms/blob/master/src/main/java/net/alpenblock/bungeeperms/util/ConcurrentList.java
|
* https://github.com/weaondara/BungeePerms/blob/master/src/main/java/net/alpenblock/bungeeperms/util/ConcurrentList.java
|
||||||
|
*
|
||||||
* @param <E> List Type
|
* @param <E> List Type
|
||||||
*/
|
*/
|
||||||
public class ConcurrentList<E> extends ArrayList<E> {
|
public class ConcurrentList<E> extends ArrayList<E> {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren