mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 22:27:32 +00:00
Profile Packets are Permission Based and not Op Based
This commit is contained in:
1 parent
710cb04f8d
commit
d37368efc8
10 files changed
+39
-42
No files matched your search
@@ -16,6 +16,7 @@ import kamkeel.npcs.network.packets.data.script.ScriptOverlayClosePacket;
|
||||
import kamkeel.npcs.network.packets.data.script.ScriptOverlayDataPacket;
|
||||
import kamkeel.npcs.network.packets.data.script.ScriptedParticlePacket;
|
||||
import kamkeel.npcs.network.packets.player.*;
|
||||
import kamkeel.npcs.network.packets.player.profile.*;
|
||||
import kamkeel.npcs.network.packets.request.*;
|
||||
import kamkeel.npcs.network.packets.request.animation.AnimationGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.animation.AnimationRemovePacket;
|
||||
@@ -55,7 +56,6 @@ import kamkeel.npcs.network.packets.request.party.*;
|
||||
import kamkeel.npcs.network.packets.request.pather.MovingPathGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.pather.MovingPathSavePacket;
|
||||
import kamkeel.npcs.network.packets.request.playerdata.*;
|
||||
import kamkeel.npcs.network.packets.request.profile.*;
|
||||
import kamkeel.npcs.network.packets.request.quest.*;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeRemovePacket;
|
||||
@@ -320,14 +320,6 @@ public class PacketHandler {
|
||||
REQUEST_PACKET.registerPacket(new EffectSavePacket());
|
||||
REQUEST_PACKET.registerPacket(new EffectRemovePacket());
|
||||
|
||||
// Profile Packets
|
||||
REQUEST_PACKET.registerPacket(new ProfileGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new ProfileGetInfoPacket());
|
||||
REQUEST_PACKET.registerPacket(new ProfileCreatePacket());
|
||||
REQUEST_PACKET.registerPacket(new ProfileRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new ProfileRenamePacket());
|
||||
REQUEST_PACKET.registerPacket(new ProfileChangePacket());
|
||||
|
||||
// Magic Packets
|
||||
REQUEST_PACKET.registerPacket(new MagicCycleRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new MagicCycleSavePacket());
|
||||
@@ -434,6 +426,14 @@ public class PacketHandler {
|
||||
PLAYER_PACKET.registerPacket(new CustomGuiClosePacket());
|
||||
PLAYER_PACKET.registerPacket(new CustomGuiUnfocusedPacket());
|
||||
PLAYER_PACKET.registerPacket(new CustomScrollClickPacket());
|
||||
|
||||
// Profile Packets
|
||||
PLAYER_PACKET.registerPacket(new ProfileCreatePacket());
|
||||
PLAYER_PACKET.registerPacket(new ProfileRemovePacket());
|
||||
PLAYER_PACKET.registerPacket(new ProfileRenamePacket());
|
||||
PLAYER_PACKET.registerPacket(new ProfileChangePacket());
|
||||
PLAYER_PACKET.registerPacket(new ProfileGetPacket());
|
||||
PLAYER_PACKET.registerPacket(new ProfileGetInfoPacket());
|
||||
}
|
||||
|
||||
public void registerChannels() {
|
||||
|
||||
@@ -19,4 +19,9 @@ public enum EnumPlayerPacket {
|
||||
CustomGuiScrollClick,
|
||||
CustomGuiClose,
|
||||
CustomGuiUnfocused,
|
||||
|
||||
ProfileCreate,
|
||||
ProfileRemove,
|
||||
ProfileRename,
|
||||
ProfileChange, ProfileGet, ProfileGetInfo,
|
||||
}
|
||||
@@ -185,14 +185,6 @@ public enum EnumRequestPacket {
|
||||
ColorSet,
|
||||
ColorBrush,
|
||||
|
||||
ProfileGet,
|
||||
ProfileGetAll,
|
||||
ProfileGetInfo,
|
||||
ProfileCreate,
|
||||
ProfileRemove,
|
||||
ProfileRename,
|
||||
ProfileChange,
|
||||
|
||||
MagicCycleRemove,
|
||||
MagicCycleSave,
|
||||
MagicGetAll,
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package kamkeel.npcs.network.packets.request.profile;
|
||||
package kamkeel.npcs.network.packets.player.profile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -8,7 +8,7 @@ import kamkeel.npcs.controllers.data.profile.ProfileOperation;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import kamkeel.npcs.network.enums.EnumPlayerPacket;
|
||||
import kamkeel.npcs.network.packets.data.ChatAlertPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -30,12 +30,12 @@ public final class ProfileChangePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumRequestPacket.ProfileChange;
|
||||
return EnumPlayerPacket.ProfileChange;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
return PacketHandler.PLAYER_PACKET;
|
||||
}
|
||||
|
||||
@Override
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package kamkeel.npcs.network.packets.request.profile;
|
||||
package kamkeel.npcs.network.packets.player.profile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -9,7 +9,7 @@ import kamkeel.npcs.controllers.data.profile.ProfileOperation;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import kamkeel.npcs.network.enums.EnumPlayerPacket;
|
||||
import kamkeel.npcs.network.packets.data.ChatAlertPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -25,12 +25,12 @@ public final class ProfileCreatePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumRequestPacket.ProfileCreate;
|
||||
return EnumPlayerPacket.ProfileCreate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
return PacketHandler.PLAYER_PACKET;
|
||||
}
|
||||
|
||||
@Override
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
package kamkeel.npcs.network.packets.request.profile;
|
||||
package kamkeel.npcs.network.packets.player.profile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.npcs.controllers.ProfileController;
|
||||
import kamkeel.npcs.network.enums.EnumPlayerPacket;
|
||||
import noppes.npcs.api.handler.data.ISlot;
|
||||
import kamkeel.npcs.controllers.data.profile.ProfileInfoEntry;
|
||||
import kamkeel.npcs.controllers.data.profile.Profile;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import kamkeel.npcs.network.packets.data.large.GuiDataPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -31,12 +31,12 @@ public final class ProfileGetInfoPacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumRequestPacket.ProfileGetInfo;
|
||||
return EnumPlayerPacket.ProfileGetInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
return PacketHandler.PLAYER_PACKET;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package kamkeel.npcs.network.packets.request.profile;
|
||||
package kamkeel.npcs.network.packets.player.profile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -8,7 +8,7 @@ import kamkeel.npcs.controllers.data.profile.Profile;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import kamkeel.npcs.network.enums.EnumPlayerPacket;
|
||||
import kamkeel.npcs.network.packets.data.large.GuiDataPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -24,12 +24,12 @@ public final class ProfileGetPacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumRequestPacket.ProfileGet;
|
||||
return EnumPlayerPacket.ProfileGet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
return PacketHandler.PLAYER_PACKET;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package kamkeel.npcs.network.packets.request.profile;
|
||||
package kamkeel.npcs.network.packets.player.profile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -8,7 +8,7 @@ import kamkeel.npcs.controllers.data.profile.ProfileOperation;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import kamkeel.npcs.network.enums.EnumPlayerPacket;
|
||||
import kamkeel.npcs.network.packets.data.ChatAlertPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -30,12 +30,12 @@ public final class ProfileRemovePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumRequestPacket.ProfileRemove;
|
||||
return EnumPlayerPacket.ProfileRemove;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
return PacketHandler.PLAYER_PACKET;
|
||||
}
|
||||
|
||||
@Override
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package kamkeel.npcs.network.packets.request.profile;
|
||||
package kamkeel.npcs.network.packets.player.profile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -8,7 +8,7 @@ import kamkeel.npcs.controllers.data.profile.Profile;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import kamkeel.npcs.network.enums.EnumPlayerPacket;
|
||||
import kamkeel.npcs.network.packets.data.ChatAlertPacket;
|
||||
import kamkeel.npcs.util.ByteBufUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -33,12 +33,12 @@ public final class ProfileRenamePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumRequestPacket.ProfileRename;
|
||||
return EnumPlayerPacket.ProfileRename;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
return PacketHandler.PLAYER_PACKET;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1,11 +1,11 @@
|
||||
package noppes.npcs.client.gui.player.inventory;
|
||||
|
||||
import kamkeel.npcs.network.packets.player.profile.*;
|
||||
import noppes.npcs.api.handler.data.ISlot;
|
||||
import kamkeel.npcs.controllers.data.profile.ProfileInfoEntry;
|
||||
import kamkeel.npcs.controllers.data.profile.Profile;
|
||||
import kamkeel.npcs.controllers.data.profile.Slot;
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.profile.*;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiYesNo;
|
||||
import net.minecraft.client.gui.GuiYesNoCallback;
|
||||
|
||||
Reference in new issue
Block a user