1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-20 07:01:22 +01:00

Update RestrictedAreaManager.java

This commit is contained in:
montlikadani 2018-08-16 18:36:03 +02:00 committed by GitHub
parent b0ed6b4c68
commit c64969ec48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ import com.gamingmesh.jobs.stuff.ChatColor;
public class RestrictedAreaManager {
protected HashMap<String, RestrictedArea> restrictedAreas = new HashMap<String, RestrictedArea>();
protected HashMap<String, RestrictedArea> restrictedAreas = new HashMap<>();
private Jobs plugin;
@ -114,7 +114,7 @@ public class RestrictedAreaManager {
}
public synchronized List<RestrictedArea> getRestrictedAreasByLoc(Location loc) {
List<RestrictedArea> areas = new ArrayList<RestrictedArea>();
List<RestrictedArea> areas = new ArrayList<>();
for (Entry<String, RestrictedArea> area : restrictedAreas.entrySet()) {
if (area.getValue().inRestrictedArea(loc))
areas.add(area.getValue());
@ -128,7 +128,7 @@ public class RestrictedAreaManager {
}
public synchronized List<RestrictedArea> getRestrictedAreasByName(String name) {
List<RestrictedArea> areas = new ArrayList<RestrictedArea>();
List<RestrictedArea> areas = new ArrayList<>();
for (Entry<String, RestrictedArea> area : restrictedAreas.entrySet()) {
if (area.getKey().equalsIgnoreCase(name))
areas.add(area.getValue());