Fix /makeitem looking up the template by string instead of template id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
42a1c8a532
commit
4e30a04619
1 file changed
+2
-3
@@ -62,11 +62,10 @@ public class MakeItemCmd extends AbstractDevCmd {
|
|||||||
ItemTemplate template;
|
ItemTemplate template;
|
||||||
try {
|
try {
|
||||||
templateID = Integer.parseInt(words[0]);
|
templateID = Integer.parseInt(words[0]);
|
||||||
template = ItemTemplate.templates.get(words[0].toLowerCase());
|
template = ItemTemplate.templates.get(templateID);
|
||||||
|
|
||||||
if (template == null) {
|
if (template == null) {
|
||||||
throwbackError(pc, "Supplied type " + words[0]
|
throwbackError(pc, "No item template with id " + words[0]);
|
||||||
+ " failed to parse to an Integer");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user