Skip to content

Commit

Permalink
try to fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveG committed Dec 3, 2015
1 parent 3d18176 commit 0d42a44
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ gradle-app.setting
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

!libs/Essentials-2.x-SNAPSHOT.jar
!libs/Essentials-2.13.1.jar
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repositories {
flatDir {
dirs 'libs'
}

mavenCentral()

maven {
Expand All @@ -18,5 +18,5 @@ archivesBaseName = "PlayTimeTracker-MC172"

dependencies {
compile 'org.bukkit:bukkit:1.7.2-R0.3'
compile name: 'Essentials-2.x-SNAPSHOT' // just use the api, version does not matter
compile name: 'Essentials-2.13.1' // for Bukkit 1.7.2-R0.3
}
Binary file added libs/Essentials-2.13.1.jar
Binary file not shown.
Binary file removed libs/Essentials-2.x-SNAPSHOT.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions src/main/java/cat/nyaa/playtimetracker/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public void onEnable() {

private IEssentials ess = null;

public boolean isAFK(UUID id) {
if (!cfg.getBoolean("ignore-afk") || ess == null || id == null) return false;
else return ess.getUser(id).isAfk();
public boolean isAFK(String playerName) {
if (!cfg.getBoolean("ignore-afk") || ess == null || playerName == null) return false;
else return ess.getUser(playerName).isAfk();
}

public boolean inGroup(String id, Set<String> group) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cat/nyaa/playtimetracker/RecordMgr.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void updateOnline(boolean accumulate) {
}

public void updateSingle(Player p) {
updateSingle(p, !plugin.isAFK(p.getUniqueId()));
updateSingle(p, !plugin.isAFK(p.getName()));
}

public void updateSingle(Player p, boolean accumulate) {
Expand Down

0 comments on commit 0d42a44

Please sign in to comment.