Permalink
Browse files

Added support fo the "npc" meta data tag assigned by Citizens to the …

…AFK Component's NPC compatibility system
  • Loading branch information...
DarkArc committed Aug 30, 2014
1 parent e472d27 commit b877f1c259c93ba30d8c8b1de165ef9456eddef8
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/sk89q/commandbook/AFKComponent.java
@@ -216,7 +216,7 @@ public void run() {
final Player target = session.getPlayer();
if (target == null || !session.getPlayer().isValid()) continue;
- if (onlinePlayers != null && !onlinePlayers.contains(target)) {
+ if (onlinePlayers != null && (target.hasMetadata("npc") || !onlinePlayers.contains(target))) {

This comment has been minimized.

Show comment
Hide comment
@SupaHam

SupaHam Sep 18, 2014

@DarkArc I can't recall if metadata is case sensitive, but I'm going to assume it is. According to the documentation, the metadata is actually 'NPC' and not 'npc'. http://wiki.citizensnpcs.co/API#Checking_if_an_entity_is_a_Citizens_NPC

@SupaHam

SupaHam Sep 18, 2014

@DarkArc I can't recall if metadata is case sensitive, but I'm going to assume it is. According to the documentation, the metadata is actually 'NPC' and not 'npc'. http://wiki.citizensnpcs.co/API#Checking_if_an_entity_is_a_Citizens_NPC

This comment has been minimized.

Show comment
Hide comment
@DarkArc

DarkArc Sep 18, 2014

Collaborator

Hm, alright.

@DarkArc

DarkArc Sep 18, 2014

Collaborator

Hm, alright.

This comment has been minimized.

Show comment
Hide comment
@DarkArc

DarkArc Sep 23, 2014

Collaborator

Changed in aba170c.

@DarkArc

DarkArc Sep 23, 2014

Collaborator

Changed in aba170c.

continue;
}

0 comments on commit b877f1c

Please sign in to comment.