Commits
md_5 authored 0ebb9c7afa7
19 19 | Preconditions.checkArgument(attribute != null, "attribute"); |
20 20 | net.minecraft.server.AttributeInstance nms = handle.a(toMinecraft(attribute.name())); |
21 21 | |
22 22 | return (nms == null) ? null : new CraftAttributeInstance(nms, attribute); |
23 23 | } |
24 24 | |
25 25 | static String toMinecraft(String bukkit) { |
26 26 | int first = bukkit.indexOf('_'); |
27 27 | int second = bukkit.indexOf('_', first + 1); |
28 28 | |
29 - | StringBuilder sb = new StringBuilder(bukkit.toLowerCase()); |
29 + | StringBuilder sb = new StringBuilder(bukkit.toLowerCase(java.util.Locale.ENGLISH)); |
30 30 | |
31 31 | sb.setCharAt(first, '.'); |
32 32 | if (second != -1) { |
33 33 | sb.deleteCharAt(second); |
34 34 | sb.setCharAt(second, bukkit.charAt(second + 1)); |
35 35 | } |
36 36 | |
37 37 | return sb.toString(); |
38 38 | } |
39 39 | } |