mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-24 17:47:40 +01:00
Add wildcard types for generics to suppress warnings
This commit is contained in:
parent
1a6ed552ea
commit
2fef8eac1e
@ -90,7 +90,7 @@ public abstract class BukkitVersionHelper {
|
||||
/**
|
||||
* Get tile entities map from chunk
|
||||
*/
|
||||
public abstract Map getTileEntitiesForChunk(Chunk c);
|
||||
public abstract Map<?, ?> getTileEntitiesForChunk(Chunk c);
|
||||
/**
|
||||
* Get X coordinate of tile entity
|
||||
*/
|
||||
|
@ -24,8 +24,8 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
|
||||
protected String nms_package; // Package used for net.minecraft.server
|
||||
private boolean failed;
|
||||
protected static final Object[] nullargs = new Object[0];
|
||||
protected static final Class[] nulltypes = new Class[0];
|
||||
private static final Map nullmap = Collections.emptyMap();
|
||||
protected static final Class<?>[] nulltypes = new Class[0];
|
||||
private static final Map<?, ?> nullmap = Collections.emptyMap();
|
||||
|
||||
/** CraftChunkSnapshot */
|
||||
private Class<?> craftchunksnapshot;
|
||||
@ -249,7 +249,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
|
||||
/**
|
||||
* Get method
|
||||
*/
|
||||
protected Method getMethod(Class<?> cls, String[] ids, Class[] args) {
|
||||
protected Method getMethod(Class<?> cls, String[] ids, Class<?>[] args) {
|
||||
if(cls == null) return null;
|
||||
for(String id : ids) {
|
||||
try {
|
||||
@ -262,7 +262,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
|
||||
failed = true;
|
||||
return null;
|
||||
}
|
||||
protected Method getMethodNoFail(Class<?> cls, String[] ids, Class[] args) {
|
||||
protected Method getMethodNoFail(Class<?> cls, String[] ids, Class<?>[] args) {
|
||||
if(cls == null) return null;
|
||||
for(String id : ids) {
|
||||
try {
|
||||
@ -360,10 +360,10 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
|
||||
}
|
||||
|
||||
/** Get tile entities map from chunk */
|
||||
public Map getTileEntitiesForChunk(Chunk c) {
|
||||
public Map<?, ?> getTileEntitiesForChunk(Chunk c) {
|
||||
Object omsc = callMethod(c, cc_gethandle, nullargs, null);
|
||||
if(omsc != null) {
|
||||
return (Map)getFieldValue(omsc, nmsc_tileentities, nullmap);
|
||||
return (Map<?, ?>)getFieldValue(omsc, nmsc_tileentities, nullmap);
|
||||
}
|
||||
return nullmap;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public class BukkitVersionHelperGlowstone extends BukkitVersionHelper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map getTileEntitiesForChunk(Chunk c) {
|
||||
public Map<?, ?> getTileEntitiesForChunk(Chunk c) {
|
||||
// TODO Auto-generated method stub
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user