/
minecraftbackup
/
SkinsRestorer
Обзор
Документация
Войти
/
minecraftbackup
/
SkinsRestorer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
bukkit/src/test/java/net/skinsrestorer/SRBukkitExtension.java
39 строк
1 KB
AlexProgrammerDE
Update all license headers
01 янв 2024, 22:02
01 янв 2024, 22:02
d769680
Код
Авторство
О чём код?
/* * SkinsRestorer * Copyright (C) 2024 SkinsRestorer Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ package net.skinsrestorer; import org.bukkit.Bukkit; import org.junit.jupiter.api.extension.AfterEachCallback; import org.junit.jupiter.api.extension.BeforeAllCallback; import org.junit.jupiter.api.extension.ExtensionContext; import java.lang.reflect.Field; public class SRBukkitExtension implements BeforeAllCallback, AfterEachCallback { @Override public void beforeAll(ExtensionContext context) { System.setProperty("sr.nms.version", "1_19_R2"); } @Override public void afterEach(ExtensionContext context) throws Exception { Field serverField = Bukkit.class.getDeclaredField("server"); serverField.setAccessible(true); serverField.set(null, null); } }