Player player = null;
try {
if (event instanceof PermissionEntityEvent) {
if (PermissionEventEnums.PEXEntity_Action.valueOf(event.getEventName()) != null) {
PermissionEntityEvent EntityEvent = (PermissionEntityEvent) event;
PermissionEntity entity = EntityEvent.getEntity();
if (entity instanceof PermissionGroup) {
PermissionGroup group = (PermissionGroup)entity;
// Update all players who are in this group.
for (Player toUpdate : TownyUniverse.getOnlinePlayers()) {