From 53271e96bf2079cdd1807f4b4373cbde5f040e48 Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Fri, 18 Oct 2019 21:17:51 -0500 Subject: [PATCH 1/7] pass nested tabs to main if no sub commands --- .../src/main/java/com/songoda/core/commands/CommandManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/songoda/core/commands/CommandManager.java b/Core/src/main/java/com/songoda/core/commands/CommandManager.java index 95f8d243..127c0afc 100644 --- a/Core/src/main/java/com/songoda/core/commands/CommandManager.java +++ b/Core/src/main/java/com/songoda/core/commands/CommandManager.java @@ -251,7 +251,7 @@ public class CommandManager implements CommandExecutor, TabCompleter { // grab the specific command that's being called SimpleNestedCommand nested = commands.get(command.getName().toLowerCase()); if (nested != null) { - if (args.length == 0) { + if (args.length == 0 || nested.children.isEmpty()) { return nested.parent != null ? nested.parent.onTab(sender, args) : null; } // check for each sub-command that they have access to From c9a978a315b4cfbea2c725e36b0b084f1aeff578 Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Sun, 20 Oct 2019 15:21:36 -0500 Subject: [PATCH 2/7] add support for yaml lang file format, add actionbar for messages, fix wg unknown flag error --- .../worldguard/WorldGuardFlagHandler.java | 6 +- .../java/com/songoda/core/locale/Locale.java | 71 +++++++++++-------- .../java/com/songoda/core/locale/Message.java | 26 +++++++ 3 files changed, 72 insertions(+), 31 deletions(-) diff --git a/Core/src/main/java/com/songoda/core/hooks/worldguard/WorldGuardFlagHandler.java b/Core/src/main/java/com/songoda/core/hooks/worldguard/WorldGuardFlagHandler.java index 4923405b..9fd7e0f5 100644 --- a/Core/src/main/java/com/songoda/core/hooks/worldguard/WorldGuardFlagHandler.java +++ b/Core/src/main/java/com/songoda/core/hooks/worldguard/WorldGuardFlagHandler.java @@ -94,13 +94,13 @@ public class WorldGuardFlagHandler { flags.put(flag, addFlag); } catch (Exception ex) { Bukkit.getServer().getLogger().log(Level.WARNING, "Could not add flag {0} to WorldGuard", addFlag.getName()); - Flag wgFlag = (StateFlag) WorldGuard.getInstance().getFlagRegistry().get(addFlag.getName()); - if (wgFlag == null) { + Object wgFlag = WorldGuard.getInstance().getFlagRegistry().get(addFlag.getName()); + if (wgFlag == null || !(wgFlag instanceof StateFlag)) { wgPlugin = false; Bukkit.getServer().getLogger().log(Level.WARNING, "Could not hook WorldGuard"); } else { flags.put(flag, wgFlag); - Bukkit.getServer().getLogger().log(Level.WARNING, "Loaded existing {1} {0}", new Object[]{wgFlag.getName(), wgFlag.getClass().getSimpleName()}); + Bukkit.getServer().getLogger().log(Level.WARNING, "Loaded existing {1} {0}", new Object[]{((Flag) wgFlag).getName(), wgFlag.getClass().getSimpleName()}); } } } diff --git a/Core/src/main/java/com/songoda/core/locale/Locale.java b/Core/src/main/java/com/songoda/core/locale/Locale.java index 31825e84..d5200e0b 100644 --- a/Core/src/main/java/com/songoda/core/locale/Locale.java +++ b/Core/src/main/java/com/songoda/core/locale/Locale.java @@ -1,8 +1,10 @@ package com.songoda.core.locale; +import com.songoda.core.configuration.Config; import com.songoda.core.utils.TextUtils; import java.io.BufferedInputStream; import java.io.BufferedReader; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -17,23 +19,25 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; /** * Assists in the utilization of localization files.
* Created to be used by the Songoda Team.
- * NOTE: Using this class in multiple plugins requires shading!
* Updated 2019-09-01 to support UTF encoded lang files - jascotty2 * * @author Brianna O'Keefe - Songoda */ public class Locale { - private static final Pattern NODE_PATTERN = Pattern.compile("^([^ ]+)\\s*=\\s*\"?(.*?)\"?$"); + private static final Pattern OLD_NODE_PATTERN = Pattern.compile("^([^ ]+)\\s*=\\s*\"?(.*?)\"?$"); private static final String FILE_EXTENSION = ".lang"; private final Map nodes = new HashMap<>(); @@ -189,8 +193,10 @@ public class Locale { Charset existingCharset = TextUtils.detectCharset(existingIn, StandardCharsets.UTF_8); try (OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(existingFile, true), existingCharset); - BufferedReader defaultReader = new BufferedReader(new InputStreamReader(defaultIn, defaultCharset)); - BufferedReader existingReader = new BufferedReader(new InputStreamReader(existingIn, existingCharset));) { + BufferedReader defaultReaderOriginal = new BufferedReader(new InputStreamReader(defaultIn, defaultCharset)); + BufferedReader existingReaderOriginal = new BufferedReader(new InputStreamReader(existingIn, existingCharset)); + BufferedReader defaultReader = translatePropertyToYAML(defaultReaderOriginal, defaultCharset); + BufferedReader existingReader = translatePropertyToYAML(existingReaderOriginal, existingCharset);) { defaultLines = defaultReader.lines().map(s -> s.replaceAll("[\uFEFF\uFFFE\u200B]", "")).collect(Collectors.toList()); existingLines = existingReader.lines().map(s -> s.replaceAll("[\uFEFF\uFFFE\u200B]", "").split("\\s*=")[0]).collect(Collectors.toList()); @@ -200,7 +206,7 @@ public class Locale { continue; } - String key = defaultValue.split("\\s*=")[0]; + String key = defaultValue.split("\\s*:")[0]; if (!existingLines.contains(key)) { if (!changed) { @@ -259,36 +265,45 @@ public class Locale { // load in the file! try (FileInputStream stream = new FileInputStream(file); - BufferedReader reader = new BufferedReader(new InputStreamReader((InputStream) stream, charset));) { - String line; - for (int lineNumber = 0; (line = reader.readLine()) != null; lineNumber++) { - if (lineNumber == 0){ - // remove BOM markers, if any - line = line.replaceAll("[\uFEFF\uFFFE\u200B]", ""); - } - // convert to UTF-8 ? - /*if (charset == StandardCharsets.UTF_16LE || charset == StandardCharsets.UTF_16BE) { - byte[] encoded = line.getBytes(charset); - line = new String(encoded, 0, encoded.length, StandardCharsets.UTF_8); - } */ - - if ((line = line.trim()).isEmpty() || line.startsWith("#") /* Comment */) continue; - - Matcher matcher = NODE_PATTERN.matcher(line); - if (!matcher.find()) { - System.err.println("Invalid locale syntax at (line=" + lineNumber + "): " + line); - continue; - } - - nodes.put(matcher.group(1), matcher.group(2)); - } + BufferedReader source = new BufferedReader(new InputStreamReader((InputStream) stream, charset)); + BufferedReader reader = translatePropertyToYAML(source, charset);) { + Config lang = new Config(file); + lang.load(reader); + // todo: how should string lists be handled? + lang.getValues(true).forEach((k, v) -> nodes.put(k, v.toString())); } catch (IOException e) { e.printStackTrace(); return false; + } catch (InvalidConfigurationException ex) { + Logger.getLogger(Locale.class.getName()).log(Level.SEVERE, "Configuration error in language file \"" + file.getName() + "\"", ex); + return false; } return true; } + protected static BufferedReader translatePropertyToYAML(BufferedReader source, Charset charset) throws IOException { + StringBuilder output = new StringBuilder(); + String line, line1; + for (int lineNumber = 0; (line = source.readLine()) != null; lineNumber++) { + if (lineNumber == 0) { + // remove BOM markers, if any + line1 = line; + line = line.replaceAll("[\uFEFF\uFFFE\u200B]", ""); + if(line1.length() != line.length()) { + output.append(line1.substring(0, line1.length() - line.length())); + } + } + Matcher matcher; + if ((line = line.trim().replace('\r', ' ')).isEmpty() || line.startsWith("#") /* Comment */ + || !(matcher = OLD_NODE_PATTERN.matcher(line)).find()) { + output.append(line).append("\n"); + } else { + output.append(matcher.group(1)).append(": \"").append(matcher.group(2)).append("\"\n"); + } + } + // I hate Java sometimes because of crap like this: + return new BufferedReader(new InputStreamReader(new BufferedInputStream(new ByteArrayInputStream(output.toString().getBytes(charset))), charset)); + } /** * Supply the Message object with the plugins prefix. diff --git a/Core/src/main/java/com/songoda/core/locale/Message.java b/Core/src/main/java/com/songoda/core/locale/Message.java index a19256cb..9561441d 100644 --- a/Core/src/main/java/com/songoda/core/locale/Message.java +++ b/Core/src/main/java/com/songoda/core/locale/Message.java @@ -13,6 +13,16 @@ import org.bukkit.entity.Player; */ public class Message { + private static boolean canActionBar = false; + static { + try { + Class.forName("net.md_5.bungee.api.ChatMessageType"); + Class.forName("net.md_5.bungee.api.chat.TextComponent"); + Player.Spigot.class.getDeclaredMethod("sendMessage", net.md_5.bungee.api.ChatMessageType.class, net.md_5.bungee.api.chat.TextComponent.class); + canActionBar = true; + } catch (Exception ex) { + } + } private String prefix = null; private String message; @@ -70,6 +80,22 @@ public class Message { } } + /** + * Format and send the held message to a player as an actionbar message + * + * @param sender command sender to send the message to + */ + public void sendActionBar(CommandSender sender) { + if (!(sender instanceof Player)) { + sender.sendMessage(this.getMessage()); + } else if (!canActionBar) { + sendTitle(sender); + } else { + ((Player) sender).spigot().sendMessage(net.md_5.bungee.api.ChatMessageType.ACTION_BAR, + new net.md_5.bungee.api.chat.TextComponent(getMessage())); + } + } + /** * Format and send the held message with the * appended plugin prefix to a command sender From 02460fcc80bda9c49e36da8926eb51d502b74ae1 Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Sun, 20 Oct 2019 15:28:06 -0500 Subject: [PATCH 3/7] translate old root nodes to have a unique key --- .../java/com/songoda/core/locale/Locale.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Core/src/main/java/com/songoda/core/locale/Locale.java b/Core/src/main/java/com/songoda/core/locale/Locale.java index d5200e0b..73fcf37f 100644 --- a/Core/src/main/java/com/songoda/core/locale/Locale.java +++ b/Core/src/main/java/com/songoda/core/locale/Locale.java @@ -1,6 +1,7 @@ package com.songoda.core.locale; import com.songoda.core.configuration.Config; +import com.songoda.core.configuration.ConfigSection; import com.songoda.core.utils.TextUtils; import java.io.BufferedInputStream; import java.io.BufferedReader; @@ -269,6 +270,7 @@ public class Locale { BufferedReader reader = translatePropertyToYAML(source, charset);) { Config lang = new Config(file); lang.load(reader); + translateMsgRoot(lang, file, charset); // todo: how should string lists be handled? lang.getValues(true).forEach((k, v) -> nodes.put(k, v.toString())); } catch (IOException e) { @@ -305,6 +307,32 @@ public class Locale { return new BufferedReader(new InputStreamReader(new BufferedInputStream(new ByteArrayInputStream(output.toString().getBytes(charset))), charset)); } + protected static void translateMsgRoot(Config lang, File file, Charset charset) throws IOException { + List msgs = lang.getValues(true).entrySet().stream() + .filter(e -> e.getValue() instanceof ConfigSection) + .map(e -> e.getKey()) + .collect(Collectors.toList()); + if (!msgs.isEmpty()) { + try (FileInputStream stream = new FileInputStream(file); + BufferedReader source = new BufferedReader(new InputStreamReader((InputStream) stream, charset))) { + String line; + for (int lineNumber = 0; (line = source.readLine()) != null; lineNumber++) { + if (lineNumber == 0) { + // remove BOM markers, if any + line = line.replaceAll("[\uFEFF\uFFFE\u200B]", ""); + } + Matcher matcher; + if (!(line = line.trim()).isEmpty() && !line.startsWith("#") + && (matcher = OLD_NODE_PATTERN.matcher(line)).find()) { + if (msgs.contains(matcher.group(1))) { + lang.set(matcher.group(1) + ".message", matcher.group(2)); + } + } + } + } + } + } + /** * Supply the Message object with the plugins prefix. * @@ -332,6 +360,9 @@ public class Locale { * @return the message for the specified node */ public Message getMessage(String node) { + if(this.nodes.containsKey(node + ".message")) { + node += ".message"; + } return this.getMessageOrDefault(node, node); } @@ -343,6 +374,9 @@ public class Locale { * @return the message for the specified node. Default if none found */ public Message getMessageOrDefault(String node, String defaultValue) { + if(this.nodes.containsKey(node + ".message")) { + node += ".message"; + } return supplyPrefix(new Message(this.nodes.getOrDefault(node, defaultValue))); } From 29076ad7594bc1340b4b12798b9bcecebf35b4b8 Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Sun, 20 Oct 2019 16:10:07 -0500 Subject: [PATCH 4/7] fix compatibility with renamed legacy crops --- .../compatibility/CompatibleMaterial.java | 69 +++++++++++++++++-- .../LegacyMaterialBlockType.java | 17 +++-- .../com/songoda/core/utils/BlockUtils.java | 12 ++-- 3 files changed, 83 insertions(+), 15 deletions(-) diff --git a/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java b/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java index c5df1364..83c7037b 100644 --- a/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java +++ b/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java @@ -1171,7 +1171,7 @@ public enum CompatibleMaterial { } /** - * Lookup a Legacy Material by its modern id name.
+ * Lookup a Material by its modern id name.
* This also can grab materials by their legacy, but only if there is no * modern material by that name. * @@ -1183,7 +1183,7 @@ public enum CompatibleMaterial { } /** - * Lookup a Legacy Material by its modern id name.
+ * Lookup a Material by its modern id name.
* This also can grab materials by their legacy, but only if there is no * modern material by that name. * @@ -1196,7 +1196,7 @@ public enum CompatibleMaterial { } /** - * Lookup a Legacy Material by bukkit material. + * Lookup a Material by bukkit material. * * @param mat item to lookup * @return LegacyMaterial or null if none found @@ -1206,7 +1206,7 @@ public enum CompatibleMaterial { } /** - * Lookup a Legacy Material by Itemstack. + * Lookup a Material by Itemstack. * * @param item item to lookup * @return LegacyMaterial or null if none found @@ -1218,7 +1218,66 @@ public enum CompatibleMaterial { String key = item.getType() + ":"; CompatibleMaterial m = lookupMap.get(key); return m != null ? m : lookupMap.get(key + item.getDurability()); - } + } + + /** + * Lookup a Block Material by its modern id name.
+ * This also can grab materials by their legacy, but only if there is no + * modern material by that name. + * + * @param name item to lookup + * @return LegacyMaterial or null if none found + */ + public static CompatibleMaterial getBlockMaterial(String name) { + if (name == null) { + return null; + } else if (useLegacy) { + LegacyMaterialBlockType legacyBlock = LegacyMaterialBlockType.getFromLegacy(name.toUpperCase()); + if (legacyBlock != null) { + return lookupMap.get(legacyBlock.name()); + } + } + return lookupMap.get(name.toUpperCase()); + } + + /** + * Lookup a Block Material by its modern id name.
+ * This also can grab materials by their legacy, but only if there is no + * modern material by that name. + * + * @param name item to lookup + * @param def default item if this is not a valid material + * @return LegacyMaterial or null if none found + */ + public static CompatibleMaterial getBlockMaterial(String name, CompatibleMaterial def) { + if (name == null) { + return def; + } else if (useLegacy) { + LegacyMaterialBlockType legacyBlock = LegacyMaterialBlockType.getFromLegacy(name.toUpperCase()); + if (legacyBlock != null) { + return lookupMap.get(legacyBlock.name()); + } + } + return lookupMap.getOrDefault(name.toUpperCase(), def); + } + + /** + * Lookup a Block Material by bukkit material. + * + * @param mat item to lookup + * @return LegacyMaterial or null if none found + */ + public static CompatibleMaterial getBlockMaterial(Material mat) { + if (mat == null) { + return null; + } else if (useLegacy) { + LegacyMaterialBlockType legacyBlock = LegacyMaterialBlockType.getFromLegacy(mat.name()); + if (legacyBlock != null) { + return lookupMap.get(legacyBlock.name()); + } + } + return lookupMap.get(mat.name()); + } static LinkedHashSet all = null; diff --git a/Core/src/main/java/com/songoda/core/compatibility/LegacyMaterialBlockType.java b/Core/src/main/java/com/songoda/core/compatibility/LegacyMaterialBlockType.java index 4e19630c..5bbddac7 100644 --- a/Core/src/main/java/com/songoda/core/compatibility/LegacyMaterialBlockType.java +++ b/Core/src/main/java/com/songoda/core/compatibility/LegacyMaterialBlockType.java @@ -18,6 +18,7 @@ public enum LegacyMaterialBlockType { BIRCH_DOOR("BIRCH_DOOR", true), FURNACE("FURNACE", "BURNING_FURNACE"), CAKE("CAKE_BLOCK"), + CARROTS("CARROT"), // totally makes sense, lol CAULDRON("CAULDRON_BLOCK"), COMPARATOR("REDSTONE_COMPARATOR_OFF", "REDSTONE_COMPARATOR_ON"), DARK_OAK_DOOR("DARK_OAK_DOOR", true), @@ -29,29 +30,33 @@ public enum LegacyMaterialBlockType { FLOWER_POT("FLOWER_POT"), IRON_DOOR("IRON_DOOR_BLOCK", true), JUNGLE_DOOR("JUNGLE_DOOR", true), + LAVA("STATIONARY_LAVA"), NETHER_WART("NETHER_WARTS"), /* < PURPUR_DOUBLE_SLAB */ + POTATOES("POTATO"), REDSTONE_LAMP("REDSTONE_LAMP_OFF", "REDSTONE_LAMP_ON"), REDSTONE_ORE("REDSTONE_ORE", "GLOWING_REDSTONE_ORE"), REDSTONE_TORCH("REDSTONE_TORCH_ON", "REDSTONE_TORCH_OFF"), SPRUCE_DOOR("SPRUCE_DOOR"), - /* - < STATIONARY_LAVA, - < STATIONARY_WATER, - */ SUGAR_CANE("SUGAR_CANE_BLOCK"), + WATER("STATIONARY_WATER"), WHEAT("CROPS"); final String blockMaterialName; final String alternateBlockMaterialName; final Material blockMaterial, alternateBlockMaterial; final boolean requiresData; // some blocks require data to render properly (double blocks) final static Map lookupTable = new HashMap(); + final static Map reverseLookupTable = new HashMap(); static { for (LegacyMaterialBlockType t : values()) { lookupTable.put(t.name(), t); + reverseLookupTable.put(t.blockMaterialName, t); + if(t.alternateBlockMaterialName != null) { + reverseLookupTable.put(t.alternateBlockMaterialName, t); + } } } @@ -99,4 +104,8 @@ public enum LegacyMaterialBlockType { return lookupTable.get(lookup); } + public static LegacyMaterialBlockType getFromLegacy(String lookup) { + return reverseLookupTable.get(lookup); + } + } diff --git a/Core/src/main/java/com/songoda/core/utils/BlockUtils.java b/Core/src/main/java/com/songoda/core/utils/BlockUtils.java index 49b86a48..52a406ea 100644 --- a/Core/src/main/java/com/songoda/core/utils/BlockUtils.java +++ b/Core/src/main/java/com/songoda/core/utils/BlockUtils.java @@ -359,7 +359,7 @@ public class BlockUtils { } else if (!useLegacy) { return BlockUtilsModern._isCropFullyGrown(block); } - CompatibleMaterial mat = CompatibleMaterial.getMaterial(block.getType()); + CompatibleMaterial mat = CompatibleMaterial.getBlockMaterial(block.getType()); if (mat == null || !mat.isCrop()) { return false; } else { @@ -379,7 +379,7 @@ public class BlockUtils { } else if (!useLegacy) { return BlockUtilsModern._getMaxGrowthStage(block); } - CompatibleMaterial mat = CompatibleMaterial.getMaterial(block.getType()); + CompatibleMaterial mat = CompatibleMaterial.getBlockMaterial(block.getType()); if (mat == null || !mat.isCrop()) { return -1; } else { @@ -399,7 +399,7 @@ public class BlockUtils { } else if (!useLegacy) { return BlockUtilsModern._getMaxGrowthStage(material); } - CompatibleMaterial mat = CompatibleMaterial.getMaterial(material); + CompatibleMaterial mat = CompatibleMaterial.getBlockMaterial(material); if (mat == null || !mat.isCrop()) { return -1; } else { @@ -418,7 +418,7 @@ public class BlockUtils { } else if (!useLegacy) { BlockUtilsModern._setGrowthStage(block, stage); } else { - CompatibleMaterial mat = CompatibleMaterial.getMaterial(block.getType()); + CompatibleMaterial mat = CompatibleMaterial.getBlockMaterial(block.getType()); if (mat != null && mat.isCrop()) { try { legacySetBlockData.invoke(block, (byte) Math.max(0, Math.min(stage, mat == CompatibleMaterial.BEETROOTS ? 3 : 7))); @@ -439,7 +439,7 @@ public class BlockUtils { } else if (!useLegacy) { BlockUtilsModern._incrementGrowthStage(block); } else { - CompatibleMaterial mat = CompatibleMaterial.getMaterial(block.getType()); + CompatibleMaterial mat = CompatibleMaterial.getBlockMaterial(block.getType()); if (mat != null && mat.isCrop() && block.getData() < (mat == CompatibleMaterial.BEETROOTS ? 3 : 7)) { try { legacySetBlockData.invoke(block, (byte) (block.getData() + 1)); @@ -460,7 +460,7 @@ public class BlockUtils { } else if (!useLegacy) { BlockUtilsModern._resetGrowthStage(block); } else { - CompatibleMaterial mat = CompatibleMaterial.getMaterial(block.getType()); + CompatibleMaterial mat = CompatibleMaterial.getBlockMaterial(block.getType()); if (mat != null && mat.isCrop()) { try { legacySetBlockData.invoke(block, (byte) 0); From 2064626dfe20111524e6d1e433c4dd69cfb8b361 Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Sun, 20 Oct 2019 16:10:41 -0500 Subject: [PATCH 5/7] Version 2.2.5 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e6936cb..abee18f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "SongodaCore" path: "/builds/$CI_PROJECT_PATH" - version: "2.2.4" + version: "2.2.5" build: stage: build From 312044c8cda77a8f75fe7ab0be782cebc32687e3 Mon Sep 17 00:00:00 2001 From: Brianna Date: Wed, 23 Oct 2019 21:12:46 -0400 Subject: [PATCH 6/7] Fix for weird interaction with crops and older versions of Minecraft. --- .../com/songoda/core/compatibility/CompatibleMaterial.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java b/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java index 83c7037b..4c434c3c 100644 --- a/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java +++ b/Core/src/main/java/com/songoda/core/compatibility/CompatibleMaterial.java @@ -2116,12 +2116,14 @@ public enum CompatibleMaterial { case BEETROOTS: case CACTUS: case CARROTS: + case CARROT: case CHORUS_FLOWER: // FROSTED_ICE is Ageable, but not a crop case KELP: case MELON_STEM: case NETHER_WART: - case POTATOES: + case POTATOES: + case POTATO: case PUMPKIN_STEM: case SUGAR_CANE: case WHEAT: From f024b78043018bf55d122678e29d68ae88388c44 Mon Sep 17 00:00:00 2001 From: Brianna Date: Wed, 23 Oct 2019 21:13:55 -0400 Subject: [PATCH 7/7] version 2.2.6 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abee18f9..bc2c7f3d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "SongodaCore" path: "/builds/$CI_PROJECT_PATH" - version: "2.2.5" + version: "2.2.6" build: stage: build