Skip to content

Commit

Permalink
Merge branch '1.20.4' into 1.20.4-folia
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Mar 23, 2024
2 parents 9192bda + c82c72a commit a10911b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/xiamomc/morph/config/ConfigOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public enum ConfigOption

UUID_RANDOM_BASE(ConfigNode.create().append("uuid_random_base"), RandomStringUtils.randomAlphabetic(8)),

ENABLE_MULTIINSTANCE(multiInstanceNode().append("enabled"), false),

MASTER_ADDRESS(multiInstanceNode().append("master_address"), "0.0.0.0:39210"),

IS_MASTER(multiInstanceNode().append("is_master_service"), false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ private void prepareInstance(boolean isMaster)
private MorphManager manager;

private final Bindable<Boolean> isMaster = new Bindable<>(false);
private final Bindable<Boolean> enabled = new Bindable<>(false);

@Initializer
private void load(MorphConfigManager configManager)
Expand Down Expand Up @@ -113,7 +114,8 @@ public void onReload()
{
stopAll();

this.addSchedule(() -> prepareInstance(isMaster.get()), 20);
if (enabled.get())
this.addSchedule(() -> prepareInstance(isMaster.get()), 20);
}

private boolean stopAll()
Expand Down
14 changes: 14 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ root:
idle_consumption: true

# Disable Fly Ability in the following worlds
#
# Example:
# nofly_worlds:
# - example_world1
# - example_world2
nofly_worlds:
- example_world1
- example_world2
Expand Down Expand Up @@ -173,6 +178,12 @@ root:
#
# Use '@default' to disable all disguises under a category, like 'player:@default' or 'minecraft:@default'
# Remember to add quotes or the library we use to read the config will panic ;)
#
# Example:
# bannedDisguises:
# - minecraft:example_mc_disguise
# - player:a_player_disguise
# - 'foo:@default'
bannedDisguises:
- minecraft:example_mc_disguise
- player:a_player_disguise
Expand Down Expand Up @@ -202,6 +213,9 @@ root:
# Multi instance network options
# This network is used to sync the player data across multiple FeatherMorph instances
multi_instance:
# Enable this feature?
enabled: false

# The address where the master server is.
# If `is_master_service` is on, this will be the address we open the service at.
master_address: "0.0.0.0:39210"
Expand Down

0 comments on commit a10911b

Please sign in to comment.