- if (isOwner) {
- if (!processTypes.contains(ProcessType.OWNER)) {
- itemKicked = true;
- }
- } else {
- if (!processTypes.contains(ProcessType.NORMAL)) {
- itemKicked = true;
+ final String th = attributes.getValue("thread");
+
+ // 初めて見つけたthreadをメインスレッドとみなす
+ if(mainThreadId == null) {
+ mainThreadId = th;
+ }
+
+ final boolean isOptional = (mainThreadId == null) ? false : !mainThreadId.equals(th);
+
+ boolean nokick = false;
+ for(ProcessType pt : processTypes) {
+ if(pt.isOwner() == isOwner && pt.isOptional() == isOptional) {
+ nokick = true;
+ break;