mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 07:35:11 +00:00
Added custom kill types
This commit is contained in:
1 parent
7e0ff3c836
commit
47f41ff5b7
3 files changed
+26
-6
No files matched your search
@@ -308,7 +308,16 @@ public class ServerEventsHandler {
|
||||
}
|
||||
String name = entityName;
|
||||
QuestKill quest = (QuestKill) data.quest.questInterface;
|
||||
if(quest.targetType == 1 && !(entity instanceof EntityNPCInterface))
|
||||
|
||||
Class entityType = EntityNPCInterface.class;
|
||||
if(quest.targetType == 2) {
|
||||
try {
|
||||
entityType = Class.forName(quest.customTargetType);
|
||||
} catch (ClassNotFoundException notFoundException) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(quest.targetType > 0 && !(entityType.isInstance(entity)))
|
||||
continue;
|
||||
if(quest.targets.containsKey(entity.getCommandSenderName()))
|
||||
name = entity.getCommandSenderName();
|
||||
|
||||
Reference in new issue
Block a user