Fix possible NPE error

Former-commit-id: ca3f9cbd9f2956523515eb6474e7105fee77c488 [formerly 29155c341f3987773b6a12ce4af0801b69606c70]
Former-commit-id: fdd825ca194d469eaca615a6515cd595589f7b88
This commit is contained in:
Ghost_chu committed 2019-11-16 15:25:40 +08:00
1 parent 1473c4bd60
commit b8a9a2fb24
1 file changed
+1 -1
@@ -982,6 +982,6 @@ public class ShopManager {
* @return The list have this world all shops
*/
public @NotNull List<Shop> getShopsInWorld(@NotNull World world){
return getAllShops().stream().filter(shop -> shop.getLocation().getWorld().equals(world)).collect(Collectors.toList());
return getAllShops().stream().filter(shop -> Objects.equals(shop.getLocation().getWorld(), world)).collect(Collectors.toList());
}
}