More compile fixes

This commit is contained in:
MattBDev
2019-08-22 13:14:27 -04:00
parent 6998c2d230
commit 135c12b650
32 changed files with 217 additions and 269 deletions

View File

@ -72,7 +72,6 @@ public interface World extends Extent, Keyed, IChunkCache<IChunkGet> {
*
* @return the maximum Y
*/
@Override
int getMaxY();
/**

View File

@ -66,13 +66,13 @@ public class SnapshotRepository {
}
/**
* Get a list of snapshots in a directory. The newest snapshot is near the top of the array.
* Get a list of snapshots in a directory. The newest snapshot is
* near the top of the array.
*
* @param newestFirst true to get the newest first
* @return a list of snapshots
*/
public List<Snapshot> getSnapshots(boolean newestFirst, String worldName)
throws MissingWorldException {
public List<Snapshot> getSnapshots(boolean newestFirst, String worldName) throws MissingWorldException {
FilenameFilter filter = (dir, name) -> {
File f = new File(dir, name);
return isValidSnapshot(f);
@ -116,8 +116,7 @@ public class SnapshotRepository {
* @return a snapshot or null
*/
@Nullable
public Snapshot getSnapshotAfter(ZonedDateTime date, String world)
throws MissingWorldException {
public Snapshot getSnapshotAfter(ZonedDateTime date, String world) throws MissingWorldException {
List<Snapshot> snapshots = getSnapshots(true, world);
Snapshot last = null;
@ -139,8 +138,7 @@ public class SnapshotRepository {
* @return a snapshot or null
*/
@Nullable
public Snapshot getSnapshotBefore(ZonedDateTime date, String world)
throws MissingWorldException {
public Snapshot getSnapshotBefore(ZonedDateTime date, String world) throws MissingWorldException {
List<Snapshot> snapshots = getSnapshots(false, world);
Snapshot last = null;
@ -206,8 +204,7 @@ public class SnapshotRepository {
* @return whether it is a valid snapshot
*/
protected boolean isValidSnapshot(File file) {
if (!file.getName()
.matches("^[A-Za-z0-9_\\- \\./\\\\'\\$@~!%\\^\\*\\(\\)\\[\\]\\+\\{\\},\\?]+$")) {
if (!file.getName().matches("^[A-Za-z0-9_\\- \\./\\\\'\\$@~!%\\^\\*\\(\\)\\[\\]\\+\\{\\},\\?]+$")) {
return false;
}