From f941318cc889043888c1cc8f87cd194954ff4813 Mon Sep 17 00:00:00 2001 From: PetteriM1 <26197131+PetteriM1@users.noreply.github.com> Date: Thu, 26 Aug 2021 17:51:34 +0300 Subject: [PATCH] EnchantCommand: Make enchantment name non case sensitive (#1892) (cherry picked from commit f5f3c7dae20509cd8c29b5c55eed39321c29ebb5) --- src/main/java/cn/nukkit/command/defaults/EnchantCommand.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/cn/nukkit/command/defaults/EnchantCommand.java b/src/main/java/cn/nukkit/command/defaults/EnchantCommand.java index e262a9ca62a..f8ee9c189cc 100644 --- a/src/main/java/cn/nukkit/command/defaults/EnchantCommand.java +++ b/src/main/java/cn/nukkit/command/defaults/EnchantCommand.java @@ -78,6 +78,7 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args) } public int getIdByName(String value) throws NumberFormatException { + value = value.toLowerCase(); switch (value) { case "protection": return 0;