Open Parties and Claims

Open Parties and Claims

25M Downloads

Whitelisting items or block interactions not working

julian-piehl opened this issue ยท 24 comments

commented

I'm using the modpack "Better MC" for Minecraft 1.19.2.
Now I wanted to whitelist the usage of some items like firework and block interaction with some blocks like the traiding station from adorn.

I added the ids to the arrays in the openpartiesandclains-server.toml and restarted the server but nothing changed.

commented

Are they still in the config? I think you might need to shut down the server, then edit the config and then start
the server.
You can also post what you have in the file here and I'll take a look.

commented

This is the config file I'm using.

[serverConfig]
	#A list of options in the player config that individual players can reconfigure. If an option is in neither of the configurable option lists, then the value in the default player config is used across the server. Check the default player config .toml file for the option names.
	playerConfigurablePlayerConfigOptions = ["playerConfig.claims.protectClaimedChunks", "playerConfig.claims.protection.fromParty", "playerConfig.claims.protection.fromAllyParties", "playerConfig.claims.forceload.enabled", "playerConfig.claims.name", "playerConfig.claims.color", "playerConfig.parties.name", "playerConfig.parties.shareLocationWithParty", "playerConfig.parties.shareLocationWithMutualAllyParties", "playerConfig.parties.receiveLocationsFromParty", "playerConfig.parties.receiveLocationsFromMutualAllyParties"]
	#A list of additional options in the player config that OPs can reconfigure for players. This is meant for options that should be configured per player but not by the players. If an option is in neither of the configurable option lists, then the value in the default player config is used across the server. Check the default player config .toml file for the option names.
	opConfigurablePlayerConfigOptions = ["playerConfig.claims.bonusChunkClaims", "playerConfig.claims.bonusChunkForceloads"]
	#How often to auto-save modified data, e.g. parties, claims, player configs (in minutes)
	#Range: > 1
	autosaveInterval = 10

	[serverConfig.parties]
		#The maximum number of allies for a party. Existing allies are not removed if the limit is reduced.
		#Range: > 0
		maxPartyAllies = 64
		#How often to check for expired parties in order to remove them (in minutes). The interval is effectively rounded up to a multiple of 10 minutes.
		#Range: > 10
		partyExpirationCheckInterval = 360
		#The maximum number of invites to a party. Existing invites are not removed if the limit is reduced.
		#Range: > 1
		maxPartyInvites = 16
		#For how long a party (members) can stay completely inactive on the server until it is deleted (in hours). This improves performance for servers running for years.
		#Range: > 1
		partyExpirationTime = 168
		#Whether the parties part of this mod is enabled.
		enabled = true
		#The maximum number of members in a party. Existing members are not removed if the limit is reduced.
		#Range: > 1
		maxPartyMembers = 64

	[serverConfig.claims]
		#The maximum number of chunks that a player can claim. Additional claims can be configured in the player config.
		#This value can be overridden with a FTB Ranks permission.
		#Range: > 0
		maxPlayerClaims = 500
		#The maximum distance on the X or Z axis (forming a square) that a chunk can be claimed at by a player.
		#Range: > 0
		maxClaimDistance = 5
		#How often to check for expired player chunk claims in order to remove them (in minutes). The interval is effectively rounded up to a multiple of 10 minutes.
		#Range: > 10
		playerClaimsExpirationCheckInterval = 360
		#The FTB Ranks permission that should override the default "maxPlayerClaims" value. Set it to an empty string to never check permissions.
		maxPlayerClaimsFTBPermission = "xaero.pac_max_claims"
		#The FTB Ranks permission that should override the default "maxPlayerClaimForceloads" value. Set it to an empty string to never check permissions. The permission override only takes effect after the player logs in at least once after a server (re)launch, so it is recommended to keep all permission-based forceload limits equal to or greater than "maxPlayerClaimForceloads".
		maxPlayerClaimForceloadsFTBPermission = "xaero.pac_max_forceloads"
		#The type of the list defined in "claimableDimensionsList". ONLY - include only the listed dimensions. ALL_BUT - include all but the listed dimensions.
		#Allowed Values: ONLY, ALL_BUT
		claimableDimensionsListType = "ALL_BUT"
		#Whether the claims part of this mod is enabled.
		enabled = true
		#Dimensions to include/exclude from being claimable, depending on the list type. For example ["minecraft:overworld", "minecraft:the_nether"]. By default the list is empty and of type ALL_BUT, meaning that all dimensions are claimable.
		claimableDimensionsList = []
		#Whether to synchronize world chunk claims to the game clients. Enables client-side mods to access the claims data, e.g. to display it on a map. ALL - all claims are synced. OWNED_ONLY - only the claims that the client player owns and server claims are synced. NOT_SYNCED - claims are not synced.
		#Allowed Values: NOT_SYNCED, OWNED_ONLY, ALL
		claimsSynchronization = "ALL"
		#Whether to allow existing player forceloads to stay active in unclaimable dimensions which were previously claimable. Only relevant if existing claims are allowed.
		allowExistingForceloadsInUnclaimableDimensions = false
		#Whether to convert expired player chunk claims to "expired claims" instead of completely freeing them. This shouldn't be too bad for performance because it still reduces the number of unique claims.
		playerClaimsConvertExpiredClaims = true
		#The maximum number of claimed chunks that a player can forceload. Additional forceloads can be configured in the player config.
		#This value can be overridden with a FTB Ranks permission.
		#Range: > 0
		maxPlayerClaimForceloads = 10a
		#For how long a player can stay completely inactive on the server until their claims are expired (in hours). This improves performance for servers running for years.
		#Range: > 1
		playerClaimsExpirationTime = 8760
		#Whether to allow existing player claims to stay active in unclaimable dimensions which were previously claimable.
		allowExistingClaimsInUnclaimableDimensions = true

		[serverConfig.claims.protection]
			#By default, most item uses are disabled in protected chunks. To make an exception for a specific item, add it to this list. This option has a higher priority than "additionalBannedItemsList". For example ["minecraft:fishing_rod", "minecraft:ender_pearl"]
			itemUseProtectionExceptionList = ["fwaystones:pocket_wormhole", "fwaystones:abyss_watcher", "fwaystones:local_void", "inmis:baby_backpack", "inmis:frayed_backpack", "inmis:plated_backpack", "inmis:gilden_backpack", "inmis:jeweled_backpack", "inmis:blazing_backpack", "inmis:withered_backpack", "inmis:endless_backpack", "inmis:ender_pouch", "toms_storage:ts.adv_wireless_terminal", "toms_storage:ts.wireless_terminal", "minecraft:firework_rocket"]
			#By default, use of some items is allowed in protected chunks, e.g. bows, shield, tridents, splash potions, to let the players protect themselves. To remove such exceptions for specific items, add them to this list. For example ["minecraft:trident", "minecraft:shield"]
			additionalBannedItemsList = []
			#The type of the list defined in "hostileChunkProtectedEntityList". ONLY - include only the listed entities. ALL_BUT - include all but the listed entities.
			#Allowed Values: ONLY, ALL_BUT
			hostileChunkProtectedEntityListType = "ONLY"
			#The type of the list defined in "friendlyChunkProtectedEntityList". ONLY - include only the listed entities. ALL_BUT - include all but the listed entities.
			#Allowed Values: ONLY, ALL_BUT
			friendlyChunkProtectedEntityListType = "ALL_BUT"
			#Blocks to exclude from chunk protection. Just a block ID in the list, e.g. "minecraft:level" allows block interaction with an empty hand if a claim owner's config agrees. A block ID with a prefix "force$" allows empty hand interactions without asking the claim owner's config. Prefix "break$" allows breaking the block, if the claim owner's config agrees. Prefix "force_break$" allows breaking across the server. Add the same block multiple times to use multiple prefixes. For example ["minecraft:lever", "force$minecraft:stone_button", "force_break$minecraft:stone_button"]
			blockProtectionExceptionList = ["adorn:traiding_station"]
			#Entities to exclude from chunk protection. Just an entity ID in the list, e.g. "minecraft:horse" allows entity interaction with an empty hand if a claim owner's config agrees. An entity ID with a prefix "force$" allows empty hand interactions without asking the claim owner's config. Prefix "break$" allows killing the entity, if the claim owner's config agrees. Prefix "force_break$" allows killing the entity across the server. Add the same entity multiple times to use multiple prefixes. For example ["minecraft:villager", "break$minecraft:villager"]
			entityProtectionExceptionList = ["minecraft:villager", "force$minecraft:minecart"]
			#Friendly entities to include/exclude in chunk protection, depending on the list type. For example ["minecraft:cow", "minecraft:rabbit"]. By default the list is empty with the type set to ALL_BUT, which means that all friendly entities are included.
			friendlyChunkProtectedEntityList = ["minecraft:boat"]
			#Hostile entities to include/exclude in chunk protection, depending on the list type. For example ["minecraft:creeper", "minecraft:zombie"]
			hostileChunkProtectedEntityList = []
commented

"adorn:traiding_station" seems to be spelled wrong. Are you trying to use the firework at a block? The exception list is for using it at air, meaning it should work for elytras, not for launching it.

commented

Although I think I might make the item exception list work for both types of item use, if that doesn't cause any issues.

commented

"adorn:traiding_station" seems to be spelled wrong. Are you trying to use the firework at a block? The exception list is for using it at air, meaning it should work for elytras, not for launching it.

You're right, this one I spelled wrong....
But I can't use firework (and the other items) against air.

commented

Although I think I might make the item exception list work for both types of item use, if that doesn't cause any issues.

Maybe you could make it like the force$ prefix.
By default you can use it at blocks and air, but you can change this behavior using air$ or block$ or something like that.

commented

How are you trying to use it against air? It has no use against air if you're not flying an elytra.

commented

Yeah, I'll think about what I want to do with the exceptions. Appreciate the suggestion though.

commented

How are you trying to use it against air? It has no use against air if you're not flying an elytra.

i tried in in mid air... If I'm disabling Non-Ally-Mode and do the exact same it is working :D

commented

Is "allow some block interactions" on in the player config?

commented

Nvm, not related.

commented

Yeah, I can't explain it right now. Let me test if the option doesn't work with non-ally-mode or something. That'd be weird though.

commented

My friend (owner of the server) looked in the config file... It seems to be what you said earlier. The config got reseted.

I'm trying changing the config when the server is offline and talk back to you if it works.

commented

Not really into fabric development but is this a thing of fabric or of this plugin?

commented

That's a thing of Forge. The mod requires "Forge Config API Port" on Fabric which mirrors the same behavior. It resaves the config when you stop the server. Not a fan of that as you can imagine.

commented

By the way, I noticed this line in the config:
maxPlayerClaimForceloads = 10a
Was the "a" actually there?

commented

Also, another thing with Forge Config API Port: it jumbles up all options in the file while the real Forge doesn't. Pretty annoying but hopefully will be fixed.

commented

Ah, I understand ;(

commented

By the way, I noticed this line in the config: maxPlayerClaimForceloads = 10a Was the "a" actually there?

No idea how this got there :D

commented

Did you test it?

commented

Yeah, now it's working :D Thanks for your help

commented

Maybe you can help me again... I'm trying to use the "trading table" mentioned earlier.
Therefore you need to interact with the block while you are holding an item in your hand.

Through adding the table to the blockProtectionExceptionList i can now interact with the block using an empty hand but not holding an item. Is this behavior changeable through the config?

itemUseProtectionExceptionList wouldn't work because you should interact with the table using any item.

commented

No, you can't add an exception like that. I'll see if that's possible to implement.

commented

Made a separate issue for what I might implement #116