Files
Holocore/scripts/commands/generic/cmdLeaveGroup.js
T
Skyler Lehan d8db483fd4 Started on groups NGE-111
GroupEventIntent
- Added the GROUP_LEAVE event to the GroupEventType enum to flag for the leaveGroup command

GameManager
- reenabled the GroupService

GroupService
- added a check for the GROUP_LEAVE event type
- created the method handleGroupLeave which will process a player leaving a group and disband if necessary, currently just stubbed
2016-05-18 17:57:25 -04:00

8 lines
370 B
JavaScript

function executeCommand(galacticManager, player, target, args) {
var GroupEventIntent = Java.type("intents.GroupEventIntent");
var GroupEventType = Java.type("intents.GroupEventIntent.GroupEventType");
if (target != null && args == null || args.length == 0) {
new GroupEventIntent(GroupEventType.GROUP_LEAVE, player, target).broadcast();
}
}