mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-08-01 03:55:27 +02:00
chore: More work
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user