Skip to content

Commit 612a472

Browse files
committed
Split backend off of Heirloom again
1 parent 242094b commit 612a472

File tree

1 file changed

+1
-238
lines changed

1 file changed

+1
-238
lines changed

README.md

Lines changed: 1 addition & 238 deletions
Original file line numberDiff line numberDiff line change
@@ -1,238 +1 @@
1-
2-
# Server Utils
3-
4-
For Fabric 1.21
5-
6-
A group of utilities for fabric servers.
7-
8-
# Installation
9-
10-
You can download a binary from the [Releases page](https://github.com/kyrptonaught/Server-Utils/releases) or compile it yourself with `./gradlew build`
11-
12-
# Modules
13-
14-
This mod has multiple modules, their usage instructions can be found below.
15-
16-
## Velocity Server Switch
17-
18-
The Velocity Powered Proxy includes a command to allow the player to switch between servers, but the command does not actually exist on the servers themselves. This causes issues when you'd like to run the command through another source like a datapack or a command block.
19-
20-
This module adds the following command: `/velocityserverswitch <servername>`
21-
22-
This command requires operator permissions, and works like any other command, interactable via datapacks, /execute, etc..
23-
24-
## Take Everything
25-
26-
Serverside module to easily take all items from an inventory.
27-
Taking everything from an inventory will also auto equip any armor items that you took and will swap armor if you are already wearing something of lesser value.
28-
29-
### Usage
30-
31-
If you are on 1.17, you may middle click in a container to take all items, you may also double click on an empty slot inside of conatiner to do the same.
32-
33-
If you are on 1.18 or higher, middle clicking will not work unless you are in creative, so you will need to double click on an empty slot.
34-
35-
If you are using a datapack, or having another mod run a command for you the command `/takeeverything` will take all items from a chest, as long as you have a container open while running it
36-
37-
If you'd like to disable the functionality of the mod, you may run the command `/takeeverything false` to disable it, and `/takeeverything true` to re-enable it.
38-
39-
## Velocity Command
40-
41-
This mod adds 3 commands:
42-
43-
* `/velocityforward <selector> <speed>`
44-
* `/modifyvelocity <selector> <add/set> <x> <y> <z>`
45-
* `/startfallfly <selector>`
46-
47-
The speed and xyz options are a float
48-
49-
Using the `add` option for modifyvelocity will add onto the player's current velocity, while `set` will replace their current velocity with your new values
50-
51-
/startfallfly will trigger elytra flight
52-
53-
## Extended Structures
54-
55-
This module makes a few improvements to structure blocks
56-
* Extended size limit from 48x48x48 to 512x512x512
57-
* Fixed [MC-102223](https://bugs.mojang.com/browse/MC-102223) (Paintings shifting when loaded by structure block)
58-
59-
Notice: You must have this mod installed on the server for any functionality, and on the client for interacting with structure blocks
60-
61-
62-
63-
## Scoreboard Suffix
64-
65-
This module adds two commands for adding a more customizable suffix for players in tablist.
66-
67-
### How to use
68-
69-
This module adds three commands:
70-
71-
/setScoreboardSuffix <format>
72-
/setSuffixFont <fontPlaceHolder> <font> [player]
73-
/scoreboardSuffixForceUpdate
74-
`/setScoreboardSuffix` has it's own format, here's an example of how they work: `[{MinecraftJsonHere}, "String", "scoreboard=ScoreboardObjectiveHere"]`
75-
76-
`MinecraftJsonHere` Uses standard Minecraft tellraw JSON data, you can easily generate some using [MinecraftJson.com](https://www.minecraftjson.com/). Now when referencing a font, you can reference a placeholder, which can then be set by `/setSuffixFont`
77-
78-
`String` Is pretty self-explanitory, you can put a string of text here.
79-
80-
`scoreboard=ScoreboardObjectiveHere` Can reference a scoreboard objective here, and it will be displayed. Do keep in mind if a player is on a team with a color, that color will be applied to the number displayed.
81-
82-
`/setSuffixFont` Has 3 arguments `fontPlaceHolder`, `font`, and `player`
83-
84-
`fontPlaceHolder` Can be set in `/setScoreboardSuffix` when referencing a font.
85-
86-
`font` Is the font to set the placeholder to reference, if you are using a custom namespace in a resource pack, put the font in quotations, for example `"mypack:fontname"`.
87-
88-
`/scoreboardSuffixForceUpdate` Simply forces the tablist to update, you may need to do this when changing a team's prefix to make it appear in tablist correctly.
89-
90-
Here are some examples of these commands:
91-
92-
/setScoreboardSuffix [{"text":"This is in uniform font","color":"white","font":"minecraft:uniform"}, {"text":"placeholder font!","color":"white","font":"font1"}, "scoreboard=killcount"]
93-
/setSuffixFont font1 "mypack:coolskeleton95" @a[gamemode=survival]
94-
95-
## SwitchableResourcepacks
96-
97-
This module adds a command to trigger a resourcepack to be sent to the client, using the same method as the built in required resourcepack function when joining a server.
98-
99-
### How to use
100-
101-
This mod adds one command: `/loadresource <packname> <selector>`
102-
103-
Executing this command will trigger the client to load a pack with the alias specified. `<packname>` being a config specified alias to a resourcepack. This can also be done from command blocks/datapacks using `/execute as`
104-
105-
The `<selector>` argument is optional, if it is not specified it will automatically run on the player running the command
106-
107-
SwitchableResourcepacks also makes use of advancement criteria to inform about the status of the client loading the resourcepack. This can be used with datapacks to test if the player has unlocked the advancement, thus giving an update on the clients progress, or if it failed.
108-
The included criteria :
109-
110-
- `switchableresourcepacks:started` - Triggers when the client accepts the resourcepack and loading begins.
111-
- `switchableresourcepacks:finished` - Triggers when the resourcepack finished loading successfully.
112-
- `switchableresourcepacks:failed` - Triggers if the client fails to load the pack.
113-
114-
An example advancement is available [here](https://github.com/kyrptonaught/SwitchableResourcepacks/blob/main/example/exampleadvancement.json).
115-
116-
**Config**
117-
118-
Upon first start up, a basic config will be generated featuring an example pack setup. It will look like [so](https://github.com/kyrptonaught/SwitchableResourcepacks/blob/main/example/exampleconfig.json5).
119-
120-
**Adding a new Pack**
121-
122-
Adding a new pack is as simple as adding a new entry inside of the config. See the example config above.
123-
124-
{
125-
126-
"packname": "example_pack" - The alias used for the command to load this pack.
127-
128-
"url": "https://example.com/resourcepack.zip", - Public url used to download the pack
129-
130-
"hash": "examplehash", - The pack's SHA-1 hash
131-
132-
"required": true, - Is the user required to use this pack? If the user declines they wull be kicked
133-
134-
"hasPrompt": true, - Is the user prompted to use the pack? The prompt will always show if required is true
135-
136-
"message": "plz use me" - Message to be displayed with the prompt
137-
138-
"packCompatibility": "BOTH" - Has 3 options, BOTH, OPTIFINE, and VANILLA. Used for lemclienthelper to identify pack compatibility
139-
140-
}
141-
The config also features `autoRevoke`. Enabling this will automatically revoke all of the above advancement criteria when another resourcepack is downloaded. If set to false, you must do the revoking on your own, else the criteria cannot be triggered again.
142-
143-
## Chest Tracker
144-
145-
This module adds one command with many arguments:
146-
147-
* `/chesttracker enabled true/false` - Enables or disables the module.
148-
* `/chesttracker fillChests <x> <y> <z>` - Mark a chest as filled with coordinates, this will spawn particles above the chest for 40 seconds.
149-
* `/chesttracker reset` - Resets the module.
150-
* `/chesttracker scoreboardObjective <objective>` - Set a scoreboard objective to incriment whenever a player opens a chest they have never opened before
151-
152-
## Drop Event
153-
154-
This module adds a config file in `config/serverutils/dropevent.json5`
155-
156-
The command set in `runCommand` will run whenever a player tries to drop an item without anything in their hand.
157-
158-
## Health command
159-
160-
This module adds one command: `/health <selector> add/remove/set scoreboard/healthValue`
161-
162-
when using the `scoreboard` argument you can provide a scoreboard objective to set the player's health to
163-
164-
## Lockdown
165-
166-
This module adds one command: `/lockdown selector/clear/true/false`
167-
168-
When using a selector, you will be able to set it to `true/false` per-player, not using a selector will apply the lockdown to all players.
169-
170-
Clear will reset it for all players and disable it if its enabled globally
171-
172-
## Ride command
173-
174-
This module adds one command: `/ride <selector>`
175-
176-
The `<selector>` argument determines what entity the entity executing the command will start riding
177-
178-
This command can be used with `/execute as` to force any entity to ride another entity
179-
180-
## Water Freezer
181-
182-
This module adds one command: `/waterFreezer freeze true/false`
183-
184-
Setting it to true will disable all interactions with liquids, water and lava. This will allow you to have water and lava exist next to each other without them turning into stone/obsidian/cobblestone.
185-
186-
## Panorama Renderer
187-
188-
Uses bossbars and custom fonts to render a full screen panorama to the client
189-
190-
More info needed
191-
192-
## TNT Lighter
193-
194-
This module adds one command: `/tntlighter enable true/false`
195-
196-
While enabled, TNT will instantly be ignited when placed and cause no block damage upon exploding
197-
198-
## Brand Blocker
199-
200-
This module allows you to block clients based on their client brand. Brands can be blocked based on a string, or by Regex
201-
202-
If a client joins with a blocked brand, they will be kicked with a brand specific reason. Brand Blocker also supports delaying the "Player has joined" message until after they pass the brand check, and hides the
203-
"Player has left" message upon being kicked.
204-
205-
Config:
206-
207-
"blockedBrands": { - complete brand strings to block
208-
"forge": "$KICKMSG$", - specify the brand and the kick msg. $KICKMSG$ will use the default msg.
209-
"vanilla": "Bad Brand"
210-
},
211-
"blockedBrandsRegex": [ - match brands using regex
212-
{
213-
"regex": "fab\\S+" - regular expression to test the brand.
214-
"kickMsg": "kick me plz" - kick msg. Same rules apply.
215-
},
216-
{
217-
"regex": "for\\S+" -
218-
"kickMsg": "kick me plz"
219-
}
220-
],
221-
"kickMsg": "This client brand is not allowed" - default kick msg.
222-
223-
## Scoreboard Player Info
224-
225-
This module automatically sets a scoreboard value for all players with info about their client.
226-
227-
Currently, has:
228-
229-
* serverutils.mcprotocolversion - represents the client's protocol verison. See [wiki](https://minecraft.fandom.com/wiki/Protocol_version)
230-
* serverutils.haslemclient - Set to 1 if LEMClientHelper was detected by the client, unset if not.
231-
232-
The following will only function and be set if LEMClientHelper is installed on the client.
233-
* serverutils.hasoptifine - Set to 1 if optifine was detected, 0 if not. Or unset if not checked.
234-
* serverutils.hascontroller - Set to 1 if a controller mod was detected, 0 if not. Currently recognises MidnightControls, LambdaControls, Controllable, Controller Support Mod
235-
236-
## Server Metadata Spoofer
237-
238-
This module spoofs the connected player info in the server metadata being sent to clients viewing the server in the multiplayer screen. The player list size is increased to 16 from 12, and colors the player's names based on their team color.
1+
# LEM Backend

0 commit comments

Comments
 (0)