Fixed NoSuchMethodError on Paper 1.10.2 #394

This commit is contained in:
Rsl1122 2017-11-01 09:57:18 +02:00
parent 41d148fc4c
commit 5a87efe5ad

View File

@ -175,7 +175,11 @@ public class TPSCountTimer extends AbsRunnable {
* @return amount of entities
*/
private int getEntityCountPaper() {
try {
return ((Plan) plugin).getServer().getWorlds().stream().mapToInt(World::getEntityCount).sum();
} catch (NoSuchMethodError e) {
return getEntityCount();
}
}
public int getLatestPlayersOnline() {