SHARE
TWEET

Untitled

a guest Nov 12th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @EventHandler
  2.     public void breaks2(BlockBreakEvent e) {
  3.         if (this.m.getConfig().getBoolean("Settings.Blocks.Particles")) {
  4.             if (this.m.getConfig().getBoolean("Settings.blocks.Redstone.particles")) {
  5.                 Player player = e.getPlayer();
  6.                 Material m = e.getBlock().getType();
  7.                 int red1 = this.m.getConfig().getInt("Blocks." + m.name() + ".break" + ".RGB" + ".RED");
  8.                 int green1 = this.m.getConfig().getInt("Blocks." + m.name() + ".break" + ".RGB" + ".GREEN");
  9.                 int blue1 = this.m.getConfig().getInt("Blocks." + m.name() + ".break" + ".RGB" + ".BLUE");
  10.                 int count = this.m.getConfig().getInt("Blocks." + m.name() + ".break" + ".amount");
  11.                 double x = this.m.getConfig().getDouble("Blocks." + m.name() + ".break" + ".reach.x");
  12.                 double y = this.m.getConfig().getDouble("Blocks." + m.name() + ".break" + ".reach.y");
  13.                 double z = this.m.getConfig().getDouble("Blocks." + m.name() + ".break" + ".reach.z");
  14.                 Particle particle = Particle.valueOf(this.m.getConfig().getString("Blocks." + m.name() + ".break" + ".particle"));
  15.                 if(particle != null){
  16.                 if(particle==Particle.REDSTONE){
  17.                 Particle.DustOptions dustOptions = new Particle.DustOptions(Color.fromRGB(red1, green1, blue1), 1);
  18.                 player.getWorld().spawnParticle(Particle.REDSTONE, player, count, x, y, z, dustOptions);
  19.                 }else{
  20.                 player.getWorld().spawnParticle(particle, player, count, x, y, z);
  21.                 }
  22.                 }else Common.log("&cError: Particle with name &4" + m.getConfig().getString("Blocks." + m.name() + ".break" + ".particle")+" doesn't exist!");
  23.        
  24.                     }
  25.                 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top