11/* **********************************************************************************
2- * Copyright (c) 2024 /// Project SWG /// www.projectswg.com *
2+ * Copyright (c) 2025 /// Project SWG /// www.projectswg.com *
33 * *
4- * ProjectSWG is the first NGE emulator for Star Wars Galaxies founded on *
4+ * ProjectSWG is an emulation project for Star Wars Galaxies founded on *
55 * July 7th, 2011 after SOE announced the official shutdown of Star Wars Galaxies. *
6- * Our goal is to create an emulator which will provide a server for players to *
7- * continue playing a game similar to the one they used to play. We are basing *
8- * it on the final publish of the game prior to end-game events. *
6+ * Our goal is to create one or more emulators which will provide servers for *
7+ * players to continue playing a game similar to the one they used to play. *
98 * *
109 * This file is part of Holocore. *
1110 * *
@@ -32,24 +31,13 @@ import com.projectswg.holocore.resources.support.global.commands.ICmdCallback
3231import com.projectswg.holocore.resources.support.global.player.Player
3332import com.projectswg.holocore.resources.support.objects.swg.SWGObject
3433import com.projectswg.holocore.resources.support.objects.swg.creature.CreatureObject
35- import com.projectswg.holocore.services.support.global.zone.CharacterLookupService.PlayerLookup
3634
3735class CmdGroupInvite : ICmdCallback {
3836 override fun execute (player : Player , target : SWGObject ? , args : String ) {
39- var farAwayTarget: Player ? = null
40-
41- if (args.isNotEmpty()) {
42- farAwayTarget = PlayerLookup .getPlayerByFirstName(args)
43- }
44-
45- if (farAwayTarget != null ) {
46- InviteToGroupIntent (player, farAwayTarget.creatureObject).broadcast()
37+ if (target is CreatureObject ) {
38+ InviteToGroupIntent (player, (target as CreatureObject ? )!! ).broadcast()
4739 } else {
48- if (target is CreatureObject ) {
49- InviteToGroupIntent (player, (target as CreatureObject ? )!! ).broadcast()
50- } else {
51- broadcastPersonal(player, " @group:invite_no_target_self" )
52- }
40+ broadcastPersonal(player, " @group:invite_no_target_self" )
5341 }
5442 }
5543}
0 commit comments