[TinyProtocol] Update to 1.8
Dieser Commit ist enthalten in:
Ursprung
74297da901
Commit
a60e2522c9
@ -3,32 +3,18 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.comphenix.tinyprotocol</groupId>
|
<groupId>com.comphenix.tinyprotocol</groupId>
|
||||||
<artifactId>TinyProtocol</artifactId>
|
<artifactId>TinyProtocol</artifactId>
|
||||||
<version>0.1.0</version>
|
<version>0.2.0</version>
|
||||||
<name>TinyProtocol</name>
|
<name>TinyProtocol</name>
|
||||||
<description>Intercept packets without ProtocolLib.</description>
|
<description>Intercept packets without ProtocolLib.</description>
|
||||||
|
|
||||||
<distributionManagement>
|
|
||||||
<repository>
|
|
||||||
<id>comphenix-releases</id>
|
|
||||||
<name>Comphenix Maven Releases</name>
|
|
||||||
<url>http://repo.comphenix.net/content/repositories/releases/</url>
|
|
||||||
</repository>
|
|
||||||
<snapshotRepository>
|
|
||||||
<id>comphenix-snapshots</id>
|
|
||||||
<name>Comphenix Maven Snapshots</name>
|
|
||||||
<url>http://repo.comphenix.net/content/repositories/snapshots/</url>
|
|
||||||
</snapshotRepository>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>md_5-repo</id>
|
<id>spigot-repo</id>
|
||||||
<url>http://repo.md-5.net/content/repositories/public/</url>
|
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>comphenix-rep</id>
|
<id>shadowvolt-repo</id>
|
||||||
<name>Comphenix Maven Releases</name>
|
<url>http://ci.shadowvolt.com/plugin/repository/everything/</url>
|
||||||
<url>http://repo.comphenix.net/content/groups/public</url>
|
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
@ -56,12 +42,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.7.10-R0.1-SNAPSHOT</version>
|
<version>1.8-R0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.7.10-R0.1-SNAPSHOT</version>
|
<version>1.8-R0.1-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.comphenix.tinyprotocol;
|
package com.comphenix.tinyprotocol;
|
||||||
|
|
||||||
|
import io.netty.channel.Channel;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -10,8 +12,6 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
import com.comphenix.tinyprotocol.Reflection.ConstructorInvoker;
|
import com.comphenix.tinyprotocol.Reflection.ConstructorInvoker;
|
||||||
import com.comphenix.tinyprotocol.Reflection.FieldAccessor;
|
import com.comphenix.tinyprotocol.Reflection.FieldAccessor;
|
||||||
|
|
||||||
import net.minecraft.util.io.netty.channel.Channel;
|
|
||||||
|
|
||||||
public class ExamplePlugin extends JavaPlugin {
|
public class ExamplePlugin extends JavaPlugin {
|
||||||
// Chat packets
|
// Chat packets
|
||||||
private FieldAccessor<String> CHAT_MESSAGE = Reflection.getField(
|
private FieldAccessor<String> CHAT_MESSAGE = Reflection.getField(
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
package com.comphenix.tinyprotocol;
|
package com.comphenix.tinyprotocol;
|
||||||
|
|
||||||
|
import io.netty.channel.Channel;
|
||||||
|
import io.netty.channel.ChannelDuplexHandler;
|
||||||
|
import io.netty.channel.ChannelFuture;
|
||||||
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||||
|
import io.netty.channel.ChannelInitializer;
|
||||||
|
import io.netty.channel.ChannelPipeline;
|
||||||
|
import io.netty.channel.ChannelPromise;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -8,17 +17,6 @@ import java.util.Set;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import net.minecraft.util.com.mojang.authlib.GameProfile;
|
|
||||||
// These are not versioned, but they require CraftBukkit
|
|
||||||
import net.minecraft.util.io.netty.channel.Channel;
|
|
||||||
import net.minecraft.util.io.netty.channel.ChannelDuplexHandler;
|
|
||||||
import net.minecraft.util.io.netty.channel.ChannelFuture;
|
|
||||||
import net.minecraft.util.io.netty.channel.ChannelHandlerContext;
|
|
||||||
import net.minecraft.util.io.netty.channel.ChannelInboundHandlerAdapter;
|
|
||||||
import net.minecraft.util.io.netty.channel.ChannelInitializer;
|
|
||||||
import net.minecraft.util.io.netty.channel.ChannelPipeline;
|
|
||||||
import net.minecraft.util.io.netty.channel.ChannelPromise;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -33,6 +31,7 @@ import com.comphenix.tinyprotocol.Reflection.FieldAccessor;
|
|||||||
import com.comphenix.tinyprotocol.Reflection.MethodInvoker;
|
import com.comphenix.tinyprotocol.Reflection.MethodInvoker;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.MapMaker;
|
import com.google.common.collect.MapMaker;
|
||||||
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a very tiny alternative to ProtocolLib in 1.7.2.
|
* Represents a very tiny alternative to ProtocolLib in 1.7.2.
|
||||||
@ -204,6 +203,7 @@ public abstract class TinyProtocol {
|
|||||||
|
|
||||||
// Remove channel handler
|
// Remove channel handler
|
||||||
serverChannel.eventLoop().execute(new Runnable() {
|
serverChannel.eventLoop().execute(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
pipeline.remove(serverChannelHandler);
|
pipeline.remove(serverChannelHandler);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren