only generate uninstall function if it contains commands
This commit is contained in:
parent
9337d09d7b
commit
1950c29ac3
|
@ -195,6 +195,7 @@ impl Datapack {
|
|||
}
|
||||
|
||||
if let Some(uninstall_commands) = uninstall_commands {
|
||||
if !uninstall_commands.is_empty() {
|
||||
let main_namespace = modified_namespaces
|
||||
.entry(&self.main_namespace_name)
|
||||
.or_insert_with(|| Cow::Owned(Namespace::new(&self.main_namespace_name)));
|
||||
|
@ -203,6 +204,7 @@ impl Datapack {
|
|||
.get_commands_mut()
|
||||
.extend(uninstall_commands);
|
||||
}
|
||||
}
|
||||
|
||||
// Compile namespaces
|
||||
for (name, namespace) in modified_namespaces {
|
||||
|
|
Loading…
Reference in New Issue