Skip to content

Commit

Permalink
Added support fo the "npc" meta data tag assigned by Citizens to the …
Browse files Browse the repository at this point in the history
…AFK Component's NPC compatibility system
  • Loading branch information
DarkArc committed Aug 30, 2014
1 parent e472d27 commit b877f1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/sk89q/commandbook/AFKComponent.java
Expand Up @@ -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.

Copy link
@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.

Copy link
@DarkArc

DarkArc Sep 18, 2014

Author Member

Hm, alright.

This comment has been minimized.

Copy link
@DarkArc

DarkArc Sep 23, 2014

Author Member

Changed in aba170c.

continue;
}

Expand Down

0 comments on commit b877f1c

Please sign in to comment.