mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 11:36:51 +01:00
Remove any references to Guava in Minecraft.
This commit is contained in:
parent
029b19d94c
commit
fa55e2cb27
@ -8,7 +8,6 @@ import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import com.comphenix.protocol.events.ConnectionSide;
|
||||
import com.comphenix.protocol.injector.packet.PacketRegistry;
|
||||
import com.comphenix.protocol.reflect.ObjectEnum;
|
||||
@ -731,13 +730,12 @@ public class PacketType implements Serializable {
|
||||
|
||||
/**
|
||||
* Retrieve the equivalent packet class.
|
||||
* @return The packet class.
|
||||
* @return The packet class, or NULL if not found.
|
||||
*/
|
||||
public Class<?> getPacketClass() {
|
||||
try {
|
||||
return PacketRegistry.getPacketClassFromType(this);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -782,7 +780,7 @@ public class PacketType implements Serializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
Class<?> clazz = getPacketClass();
|
||||
Class<?> clazz = getPacketClass();;
|
||||
return (clazz != null ? clazz.getSimpleName() : "UNREGISTERED") +
|
||||
" [" + protocol + ", " + sender + ", " + currentId + ", legacy: " + legacyId + "]";
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.util.Set;
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.injector.packet.PacketRegistry;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.util.com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
/**
|
||||
* Represents a concurrent set of packet types.
|
||||
|
@ -22,8 +22,6 @@ import java.util.Set;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.com.google.common.collect.Sets;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.comphenix.protocol.PacketType;
|
||||
@ -32,6 +30,7 @@ import com.comphenix.protocol.injector.packet.PacketRegistry;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents a packet listener with useful constructors.
|
||||
|
@ -29,7 +29,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.util.com.google.common.collect.Sets;
|
||||
import net.sf.cglib.proxy.Enhancer;
|
||||
import net.sf.cglib.proxy.MethodInterceptor;
|
||||
import net.sf.cglib.proxy.MethodProxy;
|
||||
@ -75,6 +74,7 @@ import com.google.common.base.Objects;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
public final class PacketFilterManager implements ProtocolManager, ListenerInvoker, InternalManager {
|
||||
|
||||
|
@ -6,8 +6,8 @@ import java.util.concurrent.Callable;
|
||||
|
||||
import com.comphenix.protocol.reflect.FuzzyReflection;
|
||||
import com.comphenix.protocol.reflect.FuzzyReflection.FieldAccessor;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.minecraft.util.com.google.common.collect.Maps;
|
||||
import net.minecraft.util.io.netty.buffer.ByteBufAllocator;
|
||||
import net.minecraft.util.io.netty.channel.Channel;
|
||||
import net.minecraft.util.io.netty.channel.ChannelConfig;
|
||||
|
@ -30,13 +30,12 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.util.com.google.common.base.Joiner;
|
||||
import net.minecraft.util.com.google.common.collect.Sets;
|
||||
|
||||
import com.comphenix.protocol.reflect.fuzzy.AbstractFuzzyMatcher;
|
||||
import com.comphenix.protocol.reflect.fuzzy.FuzzyMethodContract;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Retrieves fields and methods by signature, not just name.
|
||||
|
@ -19,7 +19,7 @@ package com.comphenix.protocol.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import net.minecraft.util.com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
* Represents a field that will revert to its original state when this class is garbaged collected.
|
||||
|
@ -2,9 +2,8 @@ package com.comphenix.protocol.wrappers.nbt;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.util.com.google.common.collect.Maps;
|
||||
|
||||
import com.comphenix.protocol.reflect.StructureModifier;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
public abstract class NameProperty {
|
||||
private static final Map<Class<?>, StructureModifier<String>> MODIFIERS = Maps.newConcurrentMap();
|
||||
|
@ -3,14 +3,13 @@ package com.comphenix.protocol.utility;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import net.minecraft.server.v1_7_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.util.com.google.common.collect.Maps;
|
||||
import net.minecraft.util.com.mojang.authlib.GameProfile;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.comphenix.protocol.BukkitInitialization;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
public class MinecraftReflectionTest {
|
||||
@BeforeClass
|
||||
|
Loading…
Reference in New Issue
Block a user