Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/main/java/net/onelitefeather/stardust/StardustPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
import io.github.retrooper.packetevents.factory.spigot.SpigotPacketEventsBuilder;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.translation.MiniMessageTranslationStore;
import net.kyori.adventure.translation.GlobalTranslator;
import net.kyori.adventure.translation.TranslationRegistry;
import net.kyori.adventure.util.UTF8ResourceBundleControl;
import net.onelitefeather.stardust.api.CommandCooldownService;
import net.onelitefeather.stardust.api.ItemSignService;
import net.onelitefeather.stardust.configuration.PluginConfiguration;
import net.onelitefeather.stardust.listener.*;
import net.onelitefeather.stardust.service.*;
import net.onelitefeather.stardust.translation.PluginTranslationRegistry;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginDescriptionFile;
Expand Down Expand Up @@ -46,6 +44,7 @@ public StardustPlugin(JavaPluginLoader loader, PluginDescriptionFile description
private ItemSignService<ItemStack, Player> itemSignService;
private VanishNoPacketListener packetListener;
private PluginConfiguration pluginConfiguration;
private MiniMessageTranslationStore translationStore;

@Override
public void onLoad() {
Expand All @@ -64,14 +63,14 @@ public void onEnable() {

this.pluginConfiguration = new PluginConfiguration(getConfig());

var registry = TranslationRegistry.create(Key.key("stardust", "localization"));
supportedLocals.forEach(locale -> {
var bundle = ResourceBundle.getBundle("stardust", locale, UTF8ResourceBundleControl.get());
registry.registerAll(locale, bundle, true);
});
this.translationStore = MiniMessageTranslationStore.create(Key.key("stardust", "translations"));
this.translationStore.defaultLocale(supportedLocals.getFirst());
GlobalTranslator.translator().addSource(this.translationStore);

registry.defaultLocale(supportedLocals.getFirst());
GlobalTranslator.translator().addSource(new PluginTranslationRegistry(registry));
supportedLocals.forEach(locale -> this.translationStore.registerAll(
locale,
ResourceBundle.getBundle("stardust", locale),
false));

this.syncFrogService = new SyncFrogService(this);

Expand All @@ -97,6 +96,7 @@ public void onDisable() {
this.luckPermsService.unsubscribeEvents();
this.databaseService.close();

GlobalTranslator.translator().removeSource(this.translationStore);
this.packetListener.unregister();
PacketEvents.getAPI().terminate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void vpnCheck(Player player, @Argument("player") Player target) {
.header("X-Key", this.plugin.getConfig().getString("iphub.key"))
.build();
try {
player.sendMessage(Component.text(address.getAddress().getHostAddress()));
var response = client.send(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));
player.sendMessage(Component.text(response.body()));
if (response.statusCode() == 200) {
Expand Down
102 changes: 55 additions & 47 deletions src/main/resources/stardust_de_DE.properties
Original file line number Diff line number Diff line change
@@ -1,50 +1,58 @@
remaining-time.seconds=<yellow>{0}</yellow> <gray>Sekunde(n)</gray>
remaining-time.minutes=<yellow>{0} <gray>Minute(n)</gray> <gray>und</gray> {1} <gray>Sekunde(n)</gray></yellow>
remaining-time.hours=<yellow>{0} <gray>Stunde(n)</gray> {1} <gray>Minute(n)</gray> <gray>und</gray> {2} <gray>Sekunde(n)</gray></yellow>
remaining-time.days=<yellow>{0} <gray>Tag(e)</gray> {1} <gray>Stunde(n)</gray> {2} <gray>Minute(n)</gray> <gray>und</gray> {3} <gray>Sekunde(n)</gray></yellow>
frog-bucket-spawn-success={0} <gray>Der Frosch wurde <green>erfolgreich</green> freigelassen!</gray>
frog-bucket-added-to-inventory={0} <gray>Bekam <yellow>{1}</yellow> <gold>{2}</gold> zu <reset>{3}
frog-cannot-be-spawned={0} <red>Der Frosch konnte nicht gespawnt werden!/red>
remaining-time.seconds=<yellow><arg:0></yellow> <gray>Sekunde(n)</gray>
remaining-time.minutes=<yellow><arg:0> <gray>Minute(n)</gray> <gray>und</gray> <arg:1> <gray>Sekunde(n)</gray></yellow>
remaining-time.hours=<yellow><arg:0> <gray>Stunde(n)</gray> <arg:1> <gray>Minute(n)</gray> <gray>und</gray> <arg:2> <gray>Sekunde(n)</gray></yellow>
remaining-time.days=<yellow><arg:0> <gray>Tag(e)</gray> <arg:1> <gray>Stunde(n)</gray> <arg:2> <gray>Minute(n)</gray> <gray>und</gray> <arg:3> <gray>Sekunde(n)</gray></yellow>
frog-bucket-spawn-success=<arg:0> <gray>Der Frosch wurde <green>erfolgreich</green> freigelassen!</gray>
frog-bucket-added-to-inventory=<arg:0> <gray>Bekam <yellow><arg:1></yellow> <gold><arg:2></gold> zu <reset><arg:3>
frog-cannot-be-spawned=<arg:0> <red>Der Frosch konnte nicht gespawnt werden!/red>
plugin.prefix=[<gradient:dark_green:green:1>Stardust</gradient>]
plugin.command-cooldowned={0} <gray>Du musst <yellow>{1}</yellow> warten, bevor du diesen <yellow>Befehl</yellow> wieder verwenden kannst.</gray>
plugin.inventory-full={0} <red>Dein Inventar ist voll.</red>
plugin.not-enough-permissions={0} <red>Dir fehlen Berechtigungen, um dies zu tun.</red>
plugin.command-cooldowned=<arg:0> <gray>Du musst <yellow><arg:1></yellow> warten, bevor du diesen <yellow>Befehl</yellow> wieder verwenden kannst.</gray>
plugin.inventory-full=<arg:0> <red>Dein Inventar ist voll.</red>
plugin.not-enough-permissions=<arg:0> <red>Dir fehlen Berechtigungen, um dies zu tun.</red>
plugin.vanish-actionbar=<gray>Du bist <red>unsichtbar</red> f\u00FCr andere <yellow>Spieler</yellow></gray>
plugin.no-item-in-hand={0} <red>Bitte halte ein item in deiner Hand.</red>
plugin.first-join={0} <gray>Willkommen,</gray> {1} <gray>auf</gray> <gradient:#0693F2:white>OneLiteFeather.NET</gradient>
already-in-flight-mode={0} <red>Player {1} <red>kann bereits fliegen.</red>
vanish.confirm-chat-message={0} <red>Du bist unsichtbar, best\u00E4tige diese Nachricht, wenn du deine Nachricht an alle Spieler trotzdem schicken m\u00F6chtest</red>
listener.join-message=<gray>[<green><bold>\u2191</bold></green>]</gray> {0}
listener.quit-message=<gray>[<red><bold>\u2193</bold></red>]</gray> {0}
commands.flight.enable={0} <gray>Spieler {1} <gray>kann nun fliegen!</gray>
commands.flight.target.enable={0} <gray>Du kannst nun fliegen!</gray>
commands.flight.disable={0} <gray>Spieler {1} <gray>kann nun <red>nicht</red> mehr fliegen!</gray>
commands.flight.target.disable={0} <gray>Du kannst nun <red>nicht</red> mehr fliegen!</gray>
commands.glow.enabled={0} <gray>Spieler</gray> {1} <gray><gold>leuchtet</gold> nun in der passenden <yellow>Scoreboard Team</yellow> Farbe.</gray>
commands.glow.disabled={0} <gray>Der Spieler</gray> {1} <gray><yellow>leuchtet</yellow> nicht mehr in der passenden <yellow>Scoreboard Team</yellow> Farbe.</gray>.
commands.godmode.enable={0} <gray>Spieler</gray> {1} <gray>ist jetzt <red>unverletzbar</red>.</gray>
commands.godmode.disable={0} <gray>Spieler</gray> {1} <gray>ist jetzt <red>verletzbar</red>.</gray>
commands.godmode.enable.target={0} <gray>Du bist nun <red>unverwundbar</red></gray>
commands.godmode.disable.target={0} <gray>Du bist nun <red>verwundbar</red></gray>
commands.heal.success={0} <gray>Du hast Spieler {1} <gray>geheilt.</gray>
commands.heal.target={0} <green>Du wurdest geheilt.</green>
commands.rename.success={0} <gray>Das Item <yellow>{1}</yellow> wurde <green>erfolgreich</green> unbenannt</gray>
commands.rename.invalid-item={0} <gray>Stelle bitte sicher, dass du in deiner <yellow>Hand</yellow> ein <yellow>Item</yellow> <yellow>h\u00E4ltst</yellow> .</gray>
commands.repair.success={0} <gray>Das item in deiner <yellow>Hand</yellow> wurde <green>erfolgreich</green> repariert.</gray>
commands.repair.invalid-item={0}<gray>Dieses <yellow>Item</yellow> kann <red>nicht</red> repariert werden.</gray>
plugin.no-item-in-hand=<arg:0> <red>Bitte halte ein item in deiner Hand.</red>
plugin.first-join=<arg:0> <gray>Willkommen,</gray> <arg:1> <gray>auf</gray> <gradient:#0693F2:white>OneLiteFeather.NET</gradient>
already-in-flight-mode=<arg:0> <red>Player <arg:1> <red>kann bereits fliegen.</red>
vanish.confirm-chat-message=<arg:0> <red>Du bist unsichtbar, bestätige diese Nachricht, wenn du deine Nachricht an alle Spieler trotzdem schicken m\u00F6chtest</red>
listener.join-message=<gray>[<green><bold>\u2191</bold></green>]</gray> <arg:0>
listener.quit-message=<gray>[<red><bold>\u2193</bold></red>]</gray> <arg:0>
commands.flight.enable=<arg:0> <gray>Spieler <arg:1> <gray>kann nun fliegen!</gray>
commands.flight.target.enable=<arg:0> <gray>Du kannst nun fliegen!</gray>
commands.flight.disable=<arg:0> <gray>Spieler <arg:1> <gray>kann nun <red>nicht</red> mehr fliegen!</gray>
commands.flight.target.disable=<arg:0> <gray>Du kannst nun <red>nicht</red> mehr fliegen!</gray>
commands.glow.enabled=<arg:0> <gray>Spieler</gray> <arg:1> <gray><gold>leuchtet</gold> nun in der passenden <yellow>Scoreboard Team</yellow> Farbe.</gray>
commands.glow.disabled=<arg:0> <gray>Der Spieler</gray> <arg:1> <gray><yellow>leuchtet</yellow> nicht mehr in der passenden <yellow>Scoreboard Team</yellow> Farbe.</gray>.
commands.godmode.enable=<arg:0> <gray>Spieler</gray> <arg:1> <gray>ist jetzt <red>unverletzbar</red>.</gray>
commands.godmode.disable=<arg:0> <gray>Spieler</gray> <arg:1> <gray>ist jetzt <red>verletzbar</red>.</gray>
commands.godmode.enable.target=<arg:0> <gray>Du bist nun <red>unverwundbar</red></gray>
commands.godmode.disable.target=<arg:0> <gray>Du bist nun <red>verwundbar</red></gray>
commands.heal.success=<arg:0> <gray>Du hast Spieler <arg:1> <gray>geheilt.</gray>
commands.heal.target=<arg:0> <green>Du wurdest geheilt.</green>
commands.rename.success=<arg:0> <gray>Das Item <yellow><arg:1></yellow> wurde <green>erfolgreich</green> unbenannt</gray>
commands.rename.invalid-item=<arg:0> <gray>Stelle bitte sicher, dass du in deiner <yellow>Hand</yellow> ein <yellow>Item</yellow> <yellow>h\u00E4ltst</yellow> .</gray>
commands.repair.success=<arg:0> <gray>Das item in deiner <yellow>Hand</yellow> wurde <green>erfolgreich</green> repariert.</gray>
commands.repair.invalid-item=<arg:0><gray>Dieses <yellow>Item</yellow> kann <red>nicht</red> repariert werden.</gray>
commands.repair.repaired-items.separator=<gold>,</gold> <red></red>
commands.repair.all.success={0} <hover:show_text:"<gold>Repariert:</gold> <red>{1}</red>"><gray>Alle Items in deinem <yellow>Inventar</yellow> wurden repariert.</gray></hover>
commands.sign.signed={0} <gray>Das Item wurde <green>erfolgreich</green> signiert.</gray>
commands.sign.already-signed={0} <gray>Dieses <yellow>Item</yellow> wurde schon signiert.</gray>
commands.sign.no-item-in-hand={0} <gray>Du h\u00E4ltst kein <yellow>Item</yellow> in deiner Hand.</gray>
commands.skull.success={0} <gray>Du hast nun den <yellow>Kopf</yellow> von <yellow>{1}</yellow>.</gray>.
vanish.self.disappeared={0} <gray>Du bist nun <red>unsichtbar</red> f\u00FCr andere Spieler.</gray>
vanish.self.reappeared={0} <gray>Du bist nun <yellow>sichtbar</yellow> f\u00FCr andere Spieler.</gray>
commands.vanish.property-set={0} <gray>Eigenschaften <yellow>{1}</yellow> wurden gesetzt zu <gold>{2}</gold> f\u00FCr den Spieler <yellow>{3}</yellow></gray>
commands.unsign.not-signed={0} <red>Dieses Item wurde nicht von dir signiert</red>
commands.unsign.success={0} <green>Du hast erfolgreich deine Signierung von diesem Item entfernt</green>
vanish.disappeared={0} {1} <gray>ist nun <red>unsichtbar</red>.</gray>
vanish.reappeared={0} {1} <gray>ist nun <yellow>sichtbar</yellow>.</gray>
vanish.join.silently={0} {1} <green>ist dem Server unsichtbar beigetreten.</green>
vanish.quit.silently={0} {1} <green>hat den Server unsichtbar verlassen.</green>
vanish.join.self={0} <green>Du bist immer noch unsichtbar.</green>
commands.ipsame.show=<arg:0> Spieler <gold><arg:1></gold> hat die gleiche IP-Adresse wie Spieler: <gold><arg:2></gold>
commands.ipsame.target-ip=<arg:0> <gray>Spieler <gold><arg:1></gold> hat folgende IP-Adresse: <click:COPY_TO_CLIPBOARD:'<arg:2>'><gold><arg:2></gold>
commands.ipshow=<arg:0> <#9c9c9c>IP-Adresse von <b><arg:1></b>: <#2d4e9c><arg:2>:<arg:3>
commands.repair.all.success=<arg:0> <hover:show_text:"<gold>Repariert:</gold> <red><arg:1></red>"><gray>Alle Items in deinem <yellow>Inventar</yellow> wurden repariert.</gray></hover>
commands.sign.signed=<arg:0> <gray>Das Item wurde <green>erfolgreich</green> signiert.</gray>
commands.sign.already-signed=<arg:0> <gray>Dieses <yellow>Item</yellow> wurde schon signiert.</gray>
commands.sign.no-item-in-hand=<arg:0> <gray>Du h\u00E4ltst kein <yellow>Item</yellow> in deiner Hand.</gray>
commands.skull.success=<arg:0> <gray>Du hast nun den <yellow>Kopf</yellow> von <yellow><arg:1></yellow>.</gray>.
commands.ping.show=<arg:0> <#9c9c9c>Ping von <b><arg:1></b>: <#2d4e9c><arg:2>ms
vanish.self.disappeared=<arg:0> <gray>Du bist nun <red>unsichtbar</red> f\u00FCr andere Spieler.</gray>
vanish.self.reappeared=<arg:0> <gray>Du bist nun <yellow>sichtbar</yellow> f\u00FCr andere Spieler.</gray>
commands.vanish.property-set=<arg:0> <gray>Eigenschaften <yellow><arg:1></yellow> wurden gesetzt zu <gold><arg:2></gold> f\u00FCr den Spieler <yellow><arg:3></yellow></gray>
commands.unsign.not-signed=<arg:0> <red>Dieses Item wurde nicht von dir signiert</red>
commands.unsign.success=<arg:0> <green>Du hast erfolgreich deine Signierung von diesem Item entfernt</green>
vanish.disappeared=<arg:0> <arg:1> <gray>ist nun <red>unsichtbar</red>.</gray>
vanish.reappeared=<arg:0> <arg:1> <gray>ist nun <yellow>sichtbar</yellow>.</gray>
vanish.join.silently=<arg:0> <arg:1> <green>ist dem Server unsichtbar beigetreten.</green>
vanish.quit.silently=<arg:0> <arg:1> <green>hat den Server unsichtbar verlassen.</green>
vanish.join.self=<arg:0> <green>Du bist immer noch unsichtbar.</green>
commands.vpncheck.block.0=<arg:0> <#9c9c9c>VPNCheck from <b><green><hover:show_text:'<gray>IP: <blue><arg:1>\n<gray>ISP: <yellow><arg:2>\n<gray>ASN: <white><arg:3>\n<gray>Country Name: <white><arg:4>(<arg:5>)'><arg:6></hover></b>
commands.vpncheck.block.1=<arg:0> <#9c9c9c>VPNCheck from <b><yellow><hover:show_text:'<gray>IP: <blue><arg:1>\n<gray>ISP: <yellow><arg:2>\n<gray>ASN: <white><arg:3>\n<gray>Country Name: <white><arg:4>(<arg:5>)'><arg:6></hover></b>
commands.vpncheck.block.2=<arg:0> <#9c9c9c>VPNCheck from <b><red><hover:show_text:'<gray>IP: <blue><arg:1>\n<gray>ISP: <yellow><arg:2>\n<gray>ASN: <white><arg:3>\n<gray>Country Name: <white><arg:4>(<arg:5>)'><arg:6></hover></b>
commands.vpncheck.block.3=<arg:0> <#9c9c9c>VPNCheck from <b><dark_purple><hover:show_text:'<gray>IP: <blue><arg:1>\n<gray>ISP: <yellow><arg:2>\n<gray>ASN: <white><arg:3>\n<gray>Country Name: <white><arg:4>(<arg:5>)'><arg:6></hover></b>
Loading
Loading