-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.izzel.ambershop.cmd; | ||
|
||
import com.google.inject.Inject; | ||
import io.izzel.amber.commons.i18n.AmberLocale; | ||
import io.izzel.ambershop.data.ShopDataSource; | ||
import io.izzel.ambershop.util.AmberTasks; | ||
import lombok.val; | ||
import org.spongepowered.api.command.CommandResult; | ||
import org.spongepowered.api.command.CommandSource; | ||
import org.spongepowered.api.command.args.CommandContext; | ||
import org.spongepowered.api.command.spec.CommandExecutor; | ||
|
||
public class FixExecutor implements CommandExecutor { | ||
|
||
@Inject private AmberLocale locale; | ||
@Inject private AmberTasks tasks; | ||
@Inject private ShopDataSource ds; | ||
|
||
@Override | ||
public CommandResult execute(CommandSource src, CommandContext args) { | ||
tasks.async().submit(() -> { | ||
val result = ds.fixAll().get(); | ||
locale.to(src, result.getPath(), result.getArgs()); | ||
return null; | ||
}); | ||
return CommandResult.success(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters