Fix getOnlinePlayers call to support all versions

Moved IPlayerDataManager from api module to common module - it is not part of the API as there is no supported way to obtain an instance of it.
This commit is contained in:
Jikoo
2016-12-22 09:55:51 -05:00
parent a41f89b011
commit f05110c9b8
24 changed files with 204 additions and 6 deletions

View File

@@ -16,6 +16,9 @@
package com.lishid.openinv.internal.v1_4_R1;
import java.util.Arrays;
import java.util.Collection;
import com.lishid.openinv.internal.IPlayerDataManager;
import org.bukkit.Bukkit;
@@ -70,4 +73,9 @@ public class PlayerDataManager implements IPlayerDataManager {
return player;
}
@Override
public Collection<? extends Player> getOnlinePlayers() {
return Arrays.asList(Bukkit.getOnlinePlayers());
}
}