package com.github.bjoernpetersen.jmusicbot.provider;

import com.github.bjoernpetersen.jmusicbot.Plugin;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public final class DependencyMap<T extends Plugin> {

  @Nonnull
  private final Map<Class<? extends T>, T> wrapped;

  public DependencyMap(@Nonnull Map<Class<? extends T>, T> wrapped) {
    this.wrapped = wrapped;
  }

  @Nullable
  public <Base extends T> Base get(Class<Base> baseClass) {
    return (Base) wrapped.get(baseClass);
  }
}

@@ -497,15 +497,23 @@
 urn 
-(Base) 
+baseClass.cast(
 wrap
@@ -530,16 +530,17 @@
 seClass)
+)
 ;%0A  %7D%0A%7D%0A

Replace unsafe cast in DependencyMap with safe cast