Skip to content

Commit a2d5bf3

Browse files
committed
📂 Use kebad-case
1 parent 98ef851 commit a2d5bf3

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

Hooks/Floodgate/src/main/java/fr/maxlego08/menu/hooks/FloodgateBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ public SimpleForm.Builder buildSimpleForm(Player player, ConfigurationSection me
3131
List<Map<?, ?>> buttonsConfig = floodgateConfig.getMapList("buttons");
3232
if (buttonsConfig != null && !buttonsConfig.isEmpty()) {
3333
for (Map<?, ?> buttonMap : buttonsConfig) {
34-
String buttonText = buttonMap.get("text") instanceof String ? (String) buttonMap.get("text") : "Bouton";
34+
String buttonText = buttonMap.get("text") instanceof String ? (String) buttonMap.get("text") : "Button";
3535

36-
if (buttonMap.containsKey("imageType") && buttonMap.containsKey("imageData")) {
37-
String imageTypeStr = String.valueOf(buttonMap.get("imageType"));
38-
String imageData = String.valueOf(buttonMap.get("imageData"));
36+
if (buttonMap.containsKey("imageType") && buttonMap.containsKey("image-data")) {
37+
String imageTypeStr = String.valueOf(buttonMap.get("image-type"));
38+
String imageData = String.valueOf(buttonMap.get("image-data"));
3939
try {
4040
FormImage.Type imageType = FormImage.Type.valueOf(imageTypeStr.toUpperCase());
4141
formBuilder.button(buttonText, imageType, imageData);

src/main/resources/inventories/basic_inventory.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,18 @@ items:
206206
# # - modelid -> Allows to check only the Custom Model Id
207207
# type: full
208208

209-
210-
floodgate:
211209
# If you want to use Floodgate, you can use this section to create a menu that will be displayed to players who do not have access to the plugin.
212210
# This menu will be displayed when the player does not have access to the plugin.
211+
floodgate:
213212

214-
# Title and content of the floodgate form.
213+
# Type of the floodgate form.
214+
# The type can be either SIMPLE or CUSTOM.ù
215+
# If you use SIMPLE, the form will be a simple form with a title and content, with only buttons.
216+
# If you use CUSTOM, the form will be a custom form with diffrent types of components,
217+
# such as text fields, dropdowns, etc.
218+
# Title and content of the floodgate form.
219+
type: "SIMPLE"
220+
215221
title: "Titre du Menu Floodgate"
216222
content: "Description ou contenu du menu."
217223

@@ -223,10 +229,10 @@ floodgate:
223229
- text: "Button 2 (URL Image)"
224230
# You can also put an image in the button, you must specify the type of image and the data of the image.
225231
# The imageType can be either URL or PATH.
226-
imageType: "URL"
232+
image-type: "URL"
227233
# The imageData is the URL of the image of the image (if URL imageType is used).
228-
imageData: "https://example.com/image.png"
234+
image-data: "https://example.com/image.png"
229235
- text: "Button 3 (Texture PATH Image)"
230-
imageType: "PATH"
236+
image-type: "PATH"
231237
# The imageData is the path of the image (if PATH imageType is used).
232-
imageData: "textures/items/diamond.png"
238+
image-data: "textures/items/diamond.png"

0 commit comments

Comments
 (0)