Guest User

Untitled

a guest
Jan 14th, 2020
49
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(Sponge.getPluginManager().isLoaded("auratokens")) {
  2. if (!GereAuraTokensConfig.getNode("auraList", randomPickedTexture).isVirtual()){
  3. int auraChance = GereAuraTokensConfig.getNode("spawnWithAuraChance").getInt();
  4. if (auraChance > 0){
  5. Random randomChanceAura = new Random();
  6. int chanceAura = randomChanceAura.nextInt(100);
  7. if (chanceAura + 1 >= auraChance){
  8. String auraEffect = GereAuraTokensConfig.getNode("auraList", randomPickedTexture, "Effect").getString();
  9. if (auraEffect == null) return;
  10. String rawAuraType = GereAuraTokensConfig.getNode("auraList", randomPickedTexture, "Type").getString();
  11. if (rawAuraType == null) return;
  12. String formattedAuraType = rawAuraType.toLowerCase();
  13. String auraType;
  14. switch (formattedAuraType){
  15. case "circle":
  16. auraType = "Circle";
  17. break;
  18. case "cylinder":
  19. auraType = "Cylinder";
  20. break;
  21. case "helix":
  22. auraType = "Helix";
  23. break;
  24. case "atomic":
  25. auraType = "Atomic";
  26. break;
  27. case "shell":
  28. auraType = "Shell";
  29. break;
  30. case "rising":
  31. auraType = "Rising";
  32. break;
  33. case "sphere":
  34. auraType = "Sphere";
  35. break;
  36. case "spiral":
  37. auraType = "Spiral";
  38. break;
  39. default:
  40. auraType = "Random";
  41. }
  42. entityPixelmon.getPokemonData().getPersistentData().setByte("HasAura", (byte) 1);
  43. entityPixelmon.getPokemonData().getPersistentData().setString("AuraEffect", auraEffect.toUpperCase());
  44. entityPixelmon.getPokemonData().getPersistentData().setString("AuraType", auraType);
  45. }
  46. }
  47. }
  48. }
RAW Paste Data