@@ -465,7 +465,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
465465
466466 }
467467 } catch (IllegalArgumentException e ) {
468- throw new ConfigRuntimeException ("No mob of type " + name + " exists" ,
468+ throw ConfigRuntimeException . BuildException ("No mob of type " + name + " exists" ,
469469 ExceptionType .FormatException , t );
470470 }
471471 for (int i = 0 ; i < qty ; i ++) {
@@ -483,7 +483,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
483483 color = MCDyeColor .valueOf (type );
484484 s .setColor (BukkitMCDyeColor .getConvertor ().getConcreteEnum (color ));
485485 } catch (IllegalArgumentException ex ) {
486- throw new ConfigRuntimeException (type + " is not a valid color" ,
486+ throw ConfigRuntimeException . BuildException (type + " is not a valid color" ,
487487 ExceptionType .FormatException , t );
488488 }
489489 }
@@ -496,7 +496,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
496496 otype = MCOcelotType .valueOf (type );
497497 o .setCatType (BukkitMCOcelotType .getConvertor ().getConcreteEnum (otype ));
498498 } catch (IllegalArgumentException ex ){
499- throw new ConfigRuntimeException (type + " is not an ocelot type" ,
499+ throw ConfigRuntimeException . BuildException (type + " is not an ocelot type" ,
500500 ExceptionType .FormatException , t );
501501 }
502502 }
@@ -514,7 +514,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
514514 break ;
515515 }
516516 } catch (IllegalArgumentException ex ){
517- throw new ConfigRuntimeException (type + " is not a creeper state" ,
517+ throw ConfigRuntimeException . BuildException (type + " is not a creeper state" ,
518518 ExceptionType .FormatException , t );
519519 }
520520 }
@@ -535,7 +535,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
535535 break ;
536536 }
537537 } catch (IllegalArgumentException ex ){
538- throw new ConfigRuntimeException (type + " is not a wolf state" ,
538+ throw ConfigRuntimeException . BuildException (type + " is not a wolf state" ,
539539 ExceptionType .FormatException , t );
540540 }
541541 }
@@ -548,7 +548,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
548548 job = MCProfession .valueOf (type );
549549 v .setProfession (BukkitMCProfession .getConvertor ().getConcreteEnum (job ));
550550 } catch (IllegalArgumentException ex ) {
551- throw new ConfigRuntimeException (type + " is not a valid profession" ,
551+ throw ConfigRuntimeException . BuildException (type + " is not a valid profession" ,
552552 ExceptionType .FormatException , t );
553553 }
554554 }
@@ -560,7 +560,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
560560 MaterialData held = new MaterialData (Material .valueOf (type ));
561561 en .setCarriedMaterial (held );
562562 } catch (IllegalArgumentException ex ) {
563- throw new ConfigRuntimeException (type + " is not a valid material" ,
563+ throw ConfigRuntimeException . BuildException (type + " is not a valid material" ,
564564 ExceptionType .FormatException , t );
565565 }
566566 }
@@ -572,7 +572,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
572572 try {
573573 sl .setSize (Integer .parseInt (type ));
574574 } catch (IllegalArgumentException ex ){
575- throw new ConfigRuntimeException (type + " is not a valid size" ,
575+ throw ConfigRuntimeException . BuildException (type + " is not a valid size" ,
576576 ExceptionType .FormatException , t );
577577 }
578578 }
@@ -586,7 +586,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
586586 stype = MCSkeletonType .valueOf (type );
587587 sk .setSkeletonType (BukkitMCSkeletonType .getConvertor ().getConcreteEnum (stype ));
588588 } catch (IllegalArgumentException ex ){
589- throw new ConfigRuntimeException (type + " is not a skeleton type" ,
589+ throw ConfigRuntimeException . BuildException (type + " is not a skeleton type" ,
590590 ExceptionType .FormatException , t );
591591 }
592592 }
@@ -609,11 +609,11 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
609609 try {
610610 ((PigZombie ) z ).setAnger (Integer .valueOf (type ));
611611 } catch (IllegalArgumentException iae ) {
612- throw new ConfigRuntimeException (type + " was neither a zombie state nor a number." ,
612+ throw ConfigRuntimeException . BuildException (type + " was neither a zombie state nor a number." ,
613613 ExceptionType .FormatException , t );
614614 }
615615 } else {
616- throw new ConfigRuntimeException (type + " is not a zombie state" ,
616+ throw ConfigRuntimeException . BuildException (type + " is not a zombie state" ,
617617 ExceptionType .FormatException , t );
618618 }
619619 }
@@ -632,7 +632,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
632632 break ;
633633 }
634634 } catch (IllegalArgumentException ex ){
635- throw new ConfigRuntimeException (type + " is not a pig state" ,
635+ throw ConfigRuntimeException . BuildException (type + " is not a pig state" ,
636636 ExceptionType .FormatException , t );
637637 }
638638 }
@@ -652,7 +652,7 @@ public CArray spawnMob(MCMobs name, String subClass, int qty, MCLocation l, Targ
652652 MCHorse .MCHorsePattern hpattern = MCHorse .MCHorsePattern .valueOf (type );
653653 h .setStyle (BukkitMCHorse .BukkitMCHorsePattern .getConvertor ().getConcreteEnum (hpattern ));
654654 } catch (IllegalArgumentException notAnything ) {
655- throw new ConfigRuntimeException ("Type " + type + " did not match any horse variants,"
655+ throw ConfigRuntimeException . BuildException ("Type " + type + " did not match any horse variants,"
656656 + " colors, or patterns." , ExceptionType .FormatException , t );
657657 }
658658 }
0 commit comments