Beispiel #1
0
 private static String convertLocalURLTag(final String name, final String arg) {
   if (name.equals("sprite")) {
     try {
       Pony tmp = PonyCreator.create(arg);
       return "" + tmp.getFrontSprite();
     } catch (ReflectiveOperationException e) {
       printDebug("[Meta.toLocalURL] Error creating pony " + arg + ": " + e);
       e.printStackTrace();
     }
   } else if (name.equals("type")) {
     try {
       return "" + pokepon.enums.Type.forName(arg).getToken();
     } catch (NullPointerException e) {
       printDebug("[Meta.toLocalURL] Error creating type " + arg);
       e.printStackTrace();
     }
   } else if (name.equals("movetype")) {
     try {
       return "" + Move.MoveType.forName(arg).getToken();
     } catch (NullPointerException e) {
       printDebug("[Meta.toLocalURL] Error creating movetype " + arg);
       e.printStackTrace();
     }
   }
   return "";
 }