-
Notifications
You must be signed in to change notification settings - Fork 3
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
32 changed files
with
562 additions
and
120 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,6 @@ public interface TranslationManager { | |
|
||
void registerToPlatforms(); | ||
|
||
void unregisterFromPlatforms(); | ||
|
||
} |
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
21 changes: 21 additions & 0 deletions
21
i18n-common/src/main/java/de/helixdevs/i18n/common/command/CommandReloadtranslations.java
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,21 @@ | ||
package de.helixdevs.i18n.common.command; | ||
|
||
import de.helixdevs.i18n.common.command.api.Command; | ||
import de.helixdevs.i18n.common.command.api.Sender; | ||
import de.helixdevs.i18n.common.platform.I18nPlatform; | ||
|
||
public class CommandReloadtranslations extends Command { | ||
|
||
private final I18nPlatform i18nPlatform; | ||
|
||
public CommandReloadtranslations(I18nPlatform i18nPlatform) { | ||
super("reloadtranslations", "i18n.reloadtranslations"); | ||
this.i18nPlatform = i18nPlatform; | ||
} | ||
|
||
@Override | ||
public void execute(Sender sender, String[] arguments) { | ||
i18nPlatform.reload(); | ||
sender.sendMessage("§aTranslations reloaded."); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
i18n-common/src/main/java/de/helixdevs/i18n/common/command/api/Command.java
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,22 @@ | ||
package de.helixdevs.i18n.common.command.api; | ||
|
||
public abstract class Command { | ||
|
||
private final String label; | ||
private final String permission; | ||
|
||
public Command(String label, String permission) { | ||
this.label = label; | ||
this.permission = permission; | ||
} | ||
|
||
public String getLabel() { | ||
return label; | ||
} | ||
|
||
public String getPermission() { | ||
return permission; | ||
} | ||
|
||
public abstract void execute(Sender sender, String[] arguments); | ||
} |
7 changes: 7 additions & 0 deletions
7
i18n-common/src/main/java/de/helixdevs/i18n/common/command/api/Sender.java
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,7 @@ | ||
package de.helixdevs.i18n.common.command.api; | ||
|
||
public interface Sender { | ||
|
||
void sendMessage(String message); | ||
|
||
} |
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
Oops, something went wrong.