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:
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user