mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 11:29:05 +00:00
commit
This commit is contained in:
1 parent
c2bc9c6c11
commit
e77a1032d3
2 files changed
+32
-3
No files matched your search
@@ -4,6 +4,8 @@ import cpw.mods.fml.common.network.internal.FMLProxyPacket;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
@@ -11,6 +13,8 @@ import java.util.List;
|
||||
|
||||
public abstract class AbstractPacket {
|
||||
|
||||
public EntityNPCInterface npc;
|
||||
|
||||
public FMLProxyPacket generatePacket() {
|
||||
PacketChannel packetChannel = getChannel();
|
||||
ByteBuf buf = Unpooled.buffer();
|
||||
@@ -36,6 +40,19 @@ public abstract class AbstractPacket {
|
||||
|
||||
public abstract Enum getType();
|
||||
public abstract PacketChannel getChannel();
|
||||
|
||||
public CustomNpcsPermissions.Permission getPermission(){
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean needsNPC(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setNPC(EntityNPCInterface npc){
|
||||
this.npc = npc;
|
||||
}
|
||||
|
||||
public abstract void sendData(ByteBuf out) throws IOException;
|
||||
|
||||
//"player" on the server side is the client who sent this packet
|
||||
|
||||
Reference in new issue
Block a user