@@ -58,11 +58,20 @@ public final class GodotPluginRegistry {
5858 /**
5959 * Prefix used for version 1 of the Godot plugin, mostly compatible with Godot 3.x
6060 */
61- private static final String GODOT_PLUGIN_V1_NAME_PREFIX = "org.redotengine .plugin.v1." ;
61+ private static final String GODOT_PLUGIN_V1_NAME_PREFIX = "org.godotengine .plugin.v1." ;
6262 /**
6363 * Prefix used for version 2 of the Godot plugin, compatible with Godot 4.2+
6464 */
65- private static final String GODOT_PLUGIN_V2_NAME_PREFIX = "org.redotengine.plugin.v2." ;
65+ private static final String GODOT_PLUGIN_V2_NAME_PREFIX = "org.godotengine.plugin.v2." ;
66+ /**
67+ * Prefix used for version 1 of the Godot plugin, mostly compatible with Godot 3.x
68+ * Although there isn't any REDOT prior version 4.2, someone may refit old-styled plugins.
69+ */
70+ private static final String REDOT_PLUGIN_V1_NAME_PREFIX = "org.redotengine.plugin.v1." ;
71+ /**
72+ * Prefix used for version 2 of the Redot plugin, compatible with Redot 4.2+
73+ */
74+ private static final String REDOT_PLUGIN_V2_NAME_PREFIX = "org.redotengine.plugin.v2." ;
6675
6776 private static GodotPluginRegistry instance ;
6877 private final ConcurrentHashMap <String , GodotPlugin > registry ;
@@ -151,9 +160,15 @@ private void loadPlugins(Godot godot, Set<GodotPlugin> runtimePlugins) {
151160 String pluginName = null ;
152161 if (metaDataName .startsWith (GODOT_PLUGIN_V2_NAME_PREFIX )) {
153162 pluginName = metaDataName .substring (GODOT_PLUGIN_V2_NAME_PREFIX .length ()).trim ();
163+ } else if (metaDataName .startsWith (REDOT_PLUGIN_V2_NAME_PREFIX )) {
164+ pluginName = metaDataName .substring (REDOT_PLUGIN_V2_NAME_PREFIX .length ()).trim ();
154165 } else if (metaDataName .startsWith (GODOT_PLUGIN_V1_NAME_PREFIX )) {
155166 pluginName = metaDataName .substring (GODOT_PLUGIN_V1_NAME_PREFIX .length ()).trim ();
156- Log .w (TAG , "Redot v1 plugin are deprecated in Redot 4.2 and higher: " + pluginName );
167+ Log .w (TAG , "Godot v1 plugins in Redot are deprecated in Redot 4.2 and higher: " + pluginName );
168+ } else if (metaDataName .startsWith (REDOT_PLUGIN_V1_NAME_PREFIX )) {
169+ // Although there isn't any REDOT prior version 4.2, someone may refit old-styled plugins.
170+ pluginName = metaDataName .substring (REDOT_PLUGIN_V1_NAME_PREFIX .length ()).trim ();
171+ Log .w (TAG , "Redot v1 plugins are deprecated in Redot 4.2 and higher: " + pluginName );
157172 }
158173
159174 if (!TextUtils .isEmpty (pluginName )) {
0 commit comments