chore: More work

This commit is contained in:
NotMyFault
2022-01-20 01:38:20 +01:00
parent 4a2da59505
commit 8385387e88
23 changed files with 40 additions and 12 deletions

View File

@@ -53,7 +53,7 @@ public abstract class MetaDataAccess<T> implements AutoCloseable {
this.lockAccess = lockAccess;
}
@SuppressWarnings("ALL")
@SuppressWarnings("unchecked")
private static <E extends Throwable> void sneakyThrow(final Throwable e) throws E {
throw (E) e;
}

View File

@@ -96,7 +96,7 @@ public class FlagContainer {
}
/**
* Cast a plot flag with wildcard parameters into a parametrisized
* Cast a plot flag with wildcard parameters into a parametrized
* PlotFlag. This is an unsafe operation, and should only be performed
* if the generic parameters are known beforehand.
*
@@ -105,7 +105,7 @@ public class FlagContainer {
* @param <T> Flag type
* @return Casted flag
*/
@SuppressWarnings("ALL")
@SuppressWarnings("unchecked")
public static <V, T extends PlotFlag<V, ?>> T castUnsafe(
final PlotFlag<?, ?> flag
) {
@@ -181,6 +181,7 @@ public class FlagContainer {
* @param <V> flag value type
* @return value of flag removed
*/
@SuppressWarnings("unchecked")
public <V, T extends PlotFlag<V, ?>> V removeFlag(final T flag) {
final Object value = this.flagMap.remove(flag.getClass());
if (this.plotFlagUpdateHandler != null) {

View File

@@ -73,6 +73,7 @@ public class EntityUtil {
return i;
}
@SuppressWarnings("unchecked")
public static boolean checkEntity(Plot plot, PlotFlag<Integer, ?>... flags) {
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
return true;