mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 10:19:08 +00:00
commit
This commit is contained in:
1 parent
c2bc9c6c11
commit
e77a1032d3
2 files changed
+32
-3
No files matched your search
@@ -18,7 +18,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -154,9 +157,18 @@ public final class PacketHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if(packetType == EnumChannelType.REQUEST){
|
||||
EnumRequestPacket requestPacket = EnumRequestPacket.values()[packetId];
|
||||
if()
|
||||
// Check if permission is allowed
|
||||
if(abstractPacket.getPermission() != null && !CustomNpcsPermissions.hasPermission(player, abstractPacket.getPermission())){
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for required NPC
|
||||
if(abstractPacket.needsNPC()){
|
||||
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
if(npc == null)
|
||||
return;
|
||||
|
||||
abstractPacket.setNPC(npc);
|
||||
}
|
||||
|
||||
// Let the packet parse the rest
|
||||
|
||||
Reference in new issue
Block a user