-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c06258
commit f583b77
Showing
4 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/de/oliver/fancynpcs/tracker/VisibilityTracker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package de.oliver.fancynpcs.tracker; | ||
|
||
import de.oliver.fancynpcs.FancyNpcs; | ||
import de.oliver.fancynpcs.api.Npc; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.entity.Player; | ||
|
||
public class VisibilityTracker implements Runnable { | ||
|
||
@Override | ||
public void run() { | ||
for (Player player : Bukkit.getOnlinePlayers()) { | ||
for (Npc npc : FancyNpcs.getInstance().getNpcManagerImpl().getAllNpcs()) { | ||
npc.checkAndUpdateVisibility(player); | ||
} | ||
} | ||
} | ||
} |