mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 01:45:07 +00:00
Invites are now fully functional, can be accepted and ignored
This commit is contained in:
1 parent
4abbb62e69
commit
b712d5390b
5 files changed
+124
-18
No files matched your search
@@ -8,12 +8,14 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IExtendedEntityProperties;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.PacketHandlerServer;
|
||||
import noppes.npcs.Server;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.handler.*;
|
||||
import noppes.npcs.config.ConfigMain;
|
||||
import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.constants.EnumRoleType;
|
||||
import noppes.npcs.controllers.PartyController;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -203,6 +205,26 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
|
||||
}
|
||||
}
|
||||
|
||||
public void ignoreInvite(UUID uuid) {
|
||||
if (uuid != null) {
|
||||
this.partyInvites.remove(uuid);
|
||||
PacketHandlerServer.sendInviteData((EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
public void acceptInvite(UUID uuid) {
|
||||
if (uuid != null) {
|
||||
this.partyInvites.remove(uuid);
|
||||
Party party = PartyController.Instance().getParty(uuid);
|
||||
party.addPlayer(player);
|
||||
PacketHandlerServer.sendPartyData((EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
public HashSet<UUID> getPartyInvites() {
|
||||
return (HashSet<UUID>) this.partyInvites.clone();
|
||||
}
|
||||
|
||||
public void setCompanion(ICustomNpc npc) {
|
||||
this.setCompanion((EntityNPCInterface) npc.getMCEntity());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user