mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-01-23 09:41:23 +01:00
Reverted changes
This commit is contained in:
parent
7c20dcb8cb
commit
b2987371f8
@ -1,7 +1,5 @@
|
||||
package net.Indyuce.mmocore.loot.chest.particle;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Location;
|
||||
@ -9,6 +7,8 @@ import org.bukkit.Material;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class CastingParticle {
|
||||
private final Consumer<Location> display;
|
||||
|
||||
@ -22,8 +22,7 @@ public class CastingParticle {
|
||||
if (config.contains("color")) {
|
||||
final float size = (float) config.getDouble("size") == 0 ? 1 : (float) Math.max(config.getDouble("size"), 0);
|
||||
Color color = Color.fromRGB(config.getInt("color.red"), config.getInt("color.green"), config.getInt("color.blue"));
|
||||
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, new Particle.DustOptions(color, size));
|
||||
display = loc -> loc.getWorld().spawnParticle(particle, loc, 1, new Particle.DustOptions(color, size));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -31,16 +30,11 @@ public class CastingParticle {
|
||||
format = config.getString("material");
|
||||
Validate.notNull(format, "Could not read material name");
|
||||
Material material = Material.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
|
||||
if (material == Material.DIRT && particle == Particle.SUSPENDED)
|
||||
display = (loc) -> {
|
||||
return;
|
||||
};
|
||||
else
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, material.createBlockData());
|
||||
display = loc -> loc.getWorld().spawnParticle(particle, loc, 1, material.createBlockData());
|
||||
return;
|
||||
}
|
||||
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 0);
|
||||
display = loc -> loc.getWorld().spawnParticle(particle, loc, 0);
|
||||
}
|
||||
|
||||
public CastingParticle(Particle particle) {
|
||||
|
@ -38,12 +38,10 @@ public class PlayerListener implements Listener {
|
||||
// Register custom inventory clicks
|
||||
@EventHandler
|
||||
public void b(InventoryClickEvent event) {
|
||||
if (event.getInventory().getHolder() instanceof PluginInventory) {
|
||||
event.setCancelled(true);
|
||||
if (event.getInventory().getHolder() instanceof PluginInventory)
|
||||
if (event.getCurrentItem() != null && event.getCurrentItem().getItemMeta() != null)
|
||||
((PluginInventory) event.getInventory().getHolder())
|
||||
.whenClicked(new InventoryClickContext(event.getRawSlot(), event.getCurrentItem(), event.getClick(), event, event.getInventory()));
|
||||
}
|
||||
}
|
||||
|
||||
// Register custom inventory close effect
|
||||
|
Loading…
Reference in New Issue
Block a user