forked from Fascinated/Bat
add message snipe feature
This commit is contained in:
@ -4,6 +4,8 @@ import cc.fascinated.bat.BatApplication;
|
||||
import lombok.Getter;
|
||||
import lombok.SneakyThrows;
|
||||
import org.bson.Document;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -13,6 +15,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Getter
|
||||
public abstract class ProfileHolder {
|
||||
private static final Logger log = LoggerFactory.getLogger(ProfileHolder.class);
|
||||
/**
|
||||
* The profiles for the holder
|
||||
*/
|
||||
@ -38,6 +41,8 @@ public abstract class ProfileHolder {
|
||||
Serializable profile = getProfiles().get(clazz.getSimpleName());
|
||||
if (profile == null) {
|
||||
T newProfile = clazz.cast(clazz.getDeclaredConstructors()[0].newInstance());
|
||||
|
||||
log.info("instance of profiles: {}", document.get("profiles").getClass().getSimpleName());
|
||||
Document profiles = document.get("profiles", new org.bson.Document());
|
||||
Document profileDocument = (Document) profiles.get(clazz.getSimpleName());
|
||||
|
||||
|
Reference in New Issue
Block a user