Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +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.data.UserConnection;
|
||||
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.BukkitCommandSender;
|
||||
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.Via;
|
||||
import us.myles.ViaVersion.api.platform.ViaInjector;
|
||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
||||
import us.myles.ViaVersion.handlers.ViaVersionInitializer;
|
||||
import us.myles.ViaVersion.util.ConcurrentList;
|
||||
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.protocol1_9to1_8.*;
|
||||
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.HandItemProvider;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
|
||||
|
@ -1,9 +1,7 @@
|
||||
package us.myles.ViaVersion;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import us.myles.ViaVersion.api.command.ViaVersionCommand;
|
||||
import us.myles.ViaVersion.api.data.UserConnection;
|
||||
import us.myles.ViaVersion.api.platform.ViaInjector;
|
||||
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.BossColor;
|
||||
import us.myles.ViaVersion.api.boss.BossStyle;
|
||||
import us.myles.ViaVersion.api.command.ViaVersionCommand;
|
||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
||||
|
||||
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
|
||||
public BossBar addPlayer(T player){
|
||||
public BossBar addPlayer(T player) {
|
||||
throw new NotImplementedException("This method is not implemented for the platform " + Via.getPlatform().getPlatformName());
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ public abstract class BossBar<T> {
|
||||
* @return The BossBar object
|
||||
*/
|
||||
public abstract BossBar addPlayer(UUID player);
|
||||
|
||||
|
||||
/**
|
||||
* add multiple players
|
||||
*
|
||||
@ -95,7 +95,7 @@ public abstract class BossBar<T> {
|
||||
* @deprecated Deprecated use UUID's instead of Player objects {@link #addPlayer(UUID)}
|
||||
*/
|
||||
@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());
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ public abstract class BossBar<T> {
|
||||
* @deprecated Deprecated use UUID's instead of Player objects {@link #removePlayer(UUID)}
|
||||
*/
|
||||
@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());
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ public interface ViaVersionCommand {
|
||||
* Executed when the Command sender executes the command
|
||||
*
|
||||
* @param sender Sender object
|
||||
* @param args arguments provided
|
||||
* @param args arguments provided
|
||||
* @return was successful
|
||||
*/
|
||||
boolean onCommand(ViaCommandSender sender, String[] args);
|
||||
@ -40,7 +40,7 @@ public interface ViaVersionCommand {
|
||||
* Executed when the Command sender tab-completes
|
||||
*
|
||||
* @param sender Sender object
|
||||
* @param args arguments provided
|
||||
* @param args arguments provided
|
||||
* @return was successful
|
||||
*/
|
||||
List<String> onTabComplete(ViaCommandSender sender, String[] args);
|
||||
|
@ -7,7 +7,7 @@ public interface ConfigurationProvider {
|
||||
/**
|
||||
* Sets the specified path to the given value.
|
||||
*
|
||||
* @param path Path of the object to set.
|
||||
* @param path Path of the object to set.
|
||||
* @param value New value to set the path to
|
||||
*/
|
||||
void set(String path, Object value);
|
||||
@ -22,5 +22,5 @@ public interface ConfigurationProvider {
|
||||
*
|
||||
* @return Map with key->values
|
||||
*/
|
||||
Map<String,Object> getValues();
|
||||
Map<String, Object> getValues();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package us.myles.ViaVersion.api.minecraft.metadata;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import us.myles.ViaVersion.api.type.Type;
|
||||
|
||||
@AllArgsConstructor
|
||||
|
@ -1,7 +1,6 @@
|
||||
package us.myles.ViaVersion.api.platform;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import jdk.nashorn.internal.runtime.regexp.joni.Config;
|
||||
import us.myles.ViaVersion.api.ViaAPI;
|
||||
import us.myles.ViaVersion.api.ViaVersionConfig;
|
||||
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
||||
|
@ -64,6 +64,7 @@ public abstract class Protocol {
|
||||
protected void register(ViaProviders providers) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.protocol.ProtocolRegistry;
|
||||
import us.myles.ViaVersion.dump.DumpTemplate;
|
||||
import us.myles.ViaVersion.dump.PluginInfo;
|
||||
import us.myles.ViaVersion.dump.VersionInfo;
|
||||
|
||||
import java.io.InputStreamReader;
|
||||
@ -18,8 +17,6 @@ import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
@ -4,7 +4,6 @@ import com.google.gson.JsonObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
|
@ -46,7 +46,7 @@ public class ChunkSection1_9to1_8 implements ChunkSection {
|
||||
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)];
|
||||
return palette.get(index) >> 4;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ public enum MetaIndex {
|
||||
do {
|
||||
Optional<MetaIndex> optMeta = getIndex(currentType, index);
|
||||
|
||||
if (optMeta.isPresent()){
|
||||
if (optMeta.isPresent()) {
|
||||
return optMeta.get();
|
||||
}
|
||||
|
||||
|
@ -8,9 +8,10 @@ import java.util.*;
|
||||
/**
|
||||
* Created by wea_ondara licensed under MIT
|
||||
* Same license as in LICENSE
|
||||
*
|
||||
* <p>
|
||||
* Taken from:
|
||||
* https://github.com/weaondara/BungeePerms/blob/master/src/main/java/net/alpenblock/bungeeperms/util/ConcurrentList.java
|
||||
*
|
||||
* @param <E> List Type
|
||||
*/
|
||||
public class ConcurrentList<E> extends ArrayList<E> {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren