001/* 002 * Copyright 2021 Siroshun09 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package com.github.siroshun09.mcmessage.translation; 018 019import net.kyori.adventure.key.Key; 020import org.jetbrains.annotations.NotNull; 021import org.jetbrains.annotations.Unmodifiable; 022 023import java.io.IOException; 024import java.nio.file.Path; 025import java.util.Locale; 026import java.util.Set; 027 028public interface TranslationLoader { 029 030 void load() throws IOException; 031 032 void reload() throws IOException; 033 034 @NotNull @Unmodifiable Set<Locale> getLoadedLocales(); 035 036 @NotNull Path getDirectory(); 037 038 @NotNull Key getRegistryKey(); 039 040 @NotNull Locale getDefaultLocale(); 041 042 @NotNull String getFileExtension(); 043}