Skip to content

Commit

Permalink
fix: in-compatible configuration keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurawald committed Jul 10, 2024
1 parent 7cb528c commit c8836dc
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Modules {
public NewbieWelcome newbie_welcome = new NewbieWelcome();
public TeleportWarmup teleport_warmup = new TeleportWarmup();
public MOTD motd = new MOTD();
public FakePlayerManager fake_player_manager = new FakePlayerManager();
public FakePlayerManager better_fake_player = new FakePlayerManager();
public BetterInfo better_info = new BetterInfo();
public CommandCooldown command_cooldown = new CommandCooldown();
public TopChunks top_chunks = new TopChunks();
Expand All @@ -51,9 +51,9 @@ public class Modules {
public MultiObsidianPlatform multi_obsidian_platform = new MultiObsidianPlatform();
public OpProtect op_protect = new OpProtect();
public Pvp pvp = new Pvp();
public FixPlayerListCME fix_player_list_cme = new FixPlayerListCME();
public FixWhitelist fix_whitelist = new FixWhitelist();
public CommandPermission command_permission = new CommandPermission();
public FixPlayerListCME stronger_player_list = new FixPlayerListCME();
public FixWhitelist whitelist_fix = new FixWhitelist();
public CommandPermission zero_command_permission = new CommandPermission();
public Head head = new Head();
public Profiler profiler = new Profiler();
public CommandSpy command_spy = new CommandSpy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public boolean hasFakePlayers(ServerPlayerEntity player) {

public void renewFakePlayers(ServerPlayerEntity player) {
String name = player.getGameProfile().getName();
int duration = Configs.configHandler.model().modules.fake_player_manager.renew_duration_ms;
int duration = Configs.configHandler.model().modules.better_fake_player.renew_duration_ms;
long newTime = System.currentTimeMillis() + duration;
player2expiration.put(name, newTime);
MessageUtil.sendMessage(player, "better_fake_player.renew.success", DateUtil.toStandardDateFormat(newTime));
Expand Down Expand Up @@ -140,7 +140,7 @@ public boolean canManipulateFakePlayer(CommandContext<ServerCommandSource> ctx,
}

private int getCurrentAmountLimit() {
ArrayList<List<Integer>> rules = Configs.configHandler.model().modules.fake_player_manager.caps_limit_rule;
ArrayList<List<Integer>> rules = Configs.configHandler.model().modules.better_fake_player.caps_limit_rule;
LocalDate currentDate = LocalDate.now();
LocalTime currentTime = LocalTime.now();
int currentDays = currentDate.getDayOfWeek().getValue();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract class PlayerCommandMixin {

@Unique
private static String transformFakePlayerName(String fakePlayerName) {
return Configs.configHandler.model().modules.fake_player_manager.transform_name.replace("%name%", fakePlayerName);
return Configs.configHandler.model().modules.better_fake_player.transform_name.replace("%name%", fakePlayerName);
}

@Redirect(method = "cantSpawn", at = @At(
Expand Down Expand Up @@ -56,7 +56,7 @@ private static String transformFakePlayerName(String fakePlayerName) {
}

/* fix: fake-player auth network laggy */
if (Configs.configHandler.model().modules.fake_player_manager.use_local_random_skins_for_fake_player) {
if (Configs.configHandler.model().modules.better_fake_player.use_local_random_skins_for_fake_player) {
String fakePlayerName = StringArgumentType.getString(context, "player");
fakePlayerName = transformFakePlayerName(fakePlayerName);
Fuji.SERVER.getUserCache().add(module.createOfflineGameProfile(fakePlayerName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private void disconnectAllPlayers(CallbackInfo ci) {
private void onPlayerConnected(ClientConnection connection, ServerPlayerEntity serverPlayer, ConnectedClientData commonListenerCookie, CallbackInfo ci) {
// if the player isn't a server player entity, it must be someone's fake player
if (serverPlayer.getClass() != ServerPlayerEntity.class
&& Configs.configHandler.model().modules.fake_player_manager.use_local_random_skins_for_fake_player) {
&& Configs.configHandler.model().modules.better_fake_player.use_local_random_skins_for_fake_player) {
SkinRestorer.setSkinAsync(server, Collections.singleton(serverPlayer.getGameProfile()), () -> SkinRestorer.getSkinStorage().getRandomSkin(serverPlayer.getUuid()));
}
}
Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/resources/fuji.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
"stronger_player_list.ServerLevelMixin",
"system_message.ComponentMixin",
"teleport_warmup.ServerPlayerMixin",
"tick_chunk_cache.ChunkMapMixin",
"tick_chunk_cache.ServerChunkCacheMixin",
"top_chunks.ThreadedAnvilChunkStorageMixin",
"whitelist_fix.UserWhiteListMixin",
"works.HopperBlockEntityMixin",
Expand Down

0 comments on commit c8836dc

Please sign in to comment.