mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-07-13 17:24:22 +00:00
'/pp edit' implemented, fix cmd material bug
This commit is contained in:
parent
b4455e6686
commit
4fce663167
11 changed files with 329 additions and 35 deletions
|
@ -142,7 +142,7 @@ public class FixedCommandModule implements CommandModule {
|
|||
return;
|
||||
}
|
||||
|
||||
ParticleStyle style = ParticleStyleManager.styleFromString(args[4]);
|
||||
ParticleStyle style = ParticleStyle.fromName(args[4]);
|
||||
if (style == null) {
|
||||
LangManager.sendMessage(p, Lang.FIXED_CREATE_STYLE_INVALID, args[4]);
|
||||
return;
|
||||
|
@ -213,7 +213,7 @@ public class FixedCommandModule implements CommandModule {
|
|||
try {
|
||||
material = ParticleUtils.closestMatch(args[5]);
|
||||
if (material == null) material = Material.matchMaterial(args[5]);
|
||||
if (material == null) throw new Exception();
|
||||
if (material == null || !material.isBlock()) throw new Exception();
|
||||
} catch (Exception e) {
|
||||
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
|
||||
return;
|
||||
|
@ -225,7 +225,7 @@ public class FixedCommandModule implements CommandModule {
|
|||
try {
|
||||
material = ParticleUtils.closestMatch(args[5]);
|
||||
if (material == null) material = Material.matchMaterial(args[5]);
|
||||
if (material == null) throw new Exception();
|
||||
if (material == null || material.isBlock()) throw new Exception();
|
||||
} catch (Exception e) {
|
||||
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue