Skip to content

Commit 6599fd9

Browse files
author
david
committed
renamed parameter name for clarity
1 parent 7544a37 commit 6599fd9

File tree

1 file changed

+51
-51
lines changed
  • src/main/java/net/onelitefeather/bettergopaint/utils

1 file changed

+51
-51
lines changed

src/main/java/net/onelitefeather/bettergopaint/utils/GUI.java

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -67,158 +67,158 @@ private static void formatDefault(@NotNull Inventory inventory) {
6767
}
6868
}
6969

70-
public static void update(@NotNull Inventory inv, @NotNull PlayerBrush playerBrush) {
70+
public static void update(@NotNull Inventory inventory, @NotNull PlayerBrush playerBrush) {
7171
Brush brush = playerBrush.brush();
7272

7373
// FILLER
74-
formatDefault(inv);
74+
formatDefault(inventory);
7575

7676
// goPaint toggle
7777
if (playerBrush.enabled()) {
78-
inv.setItem(1, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
79-
inv.setItem(10, Items.create(Material.FEATHER, 1, "§6goPaint Brush",
78+
inventory.setItem(1, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
79+
inventory.setItem(10, Items.create(Material.FEATHER, 1, "§6goPaint Brush",
8080
"§a§lEnabled\n\n§7Left click with item to export\n§7Right click to toggle"
8181
));
82-
inv.setItem(19, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
82+
inventory.setItem(19, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
8383
} else {
84-
inv.setItem(1, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
85-
inv.setItem(10, Items.create(Material.FEATHER, 1, "§6goPaint Brush",
84+
inventory.setItem(1, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
85+
inventory.setItem(10, Items.create(Material.FEATHER, 1, "§6goPaint Brush",
8686
"§c§lDisabled\n\n§7Left click with item to export\n§7Right click to toggle"
8787
));
88-
inv.setItem(19, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
88+
inventory.setItem(19, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
8989
}
9090

9191
// Brushes + Chance
92-
inv.setItem(2, Items.create(Material.ORANGE_STAINED_GLASS_PANE, 1, "§7", ""));
92+
inventory.setItem(2, Items.create(Material.ORANGE_STAINED_GLASS_PANE, 1, "§7", ""));
9393

9494

9595
String clicks = "\n§7Shift click to select\n§7Click to cycle brush\n\n";
9696

97-
inv.setItem(11, Items.createHead(brush.getHead(), 1, "§6Selected Brush type",
97+
inventory.setItem(11, Items.createHead(brush.getHead(), 1, "§6Selected Brush type",
9898
clicks + plugin.getBrushManager().getBrushLore(brush)
9999
));
100-
inv.setItem(20, Items.create(Material.ORANGE_STAINED_GLASS_PANE, 1, "§7", ""));
100+
inventory.setItem(20, Items.create(Material.ORANGE_STAINED_GLASS_PANE, 1, "§7", ""));
101101

102102
// chance
103103
if (brush instanceof SprayBrush) {
104-
inv.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
105-
inv.setItem(12, Items.create(Material.GOLD_NUGGET, 1,
104+
inventory.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
105+
inventory.setItem(12, Items.create(Material.GOLD_NUGGET, 1,
106106
"§6Place chance: §e" + playerBrush.chance() + "%",
107107
"\n§7Left click to increase\n§7Right click to decrease"
108108
));
109-
inv.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
109+
inventory.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
110110
}
111111

112112
// axis
113113
if (brush instanceof DiscBrush) {
114-
inv.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
115-
inv.setItem(12, Items.create(Material.COMPASS, 1,
114+
inventory.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
115+
inventory.setItem(12, Items.create(Material.COMPASS, 1,
116116
"§6Axis: §e" + playerBrush.axis(), "\n§7Click to change"
117117
));
118-
inv.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
118+
inventory.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
119119
}
120120

121121

122122
// thickness
123123
if (brush instanceof OverlayBrush || brush instanceof UnderlayBrush) {
124-
inv.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
125-
inv.setItem(12, Items.create(Material.BOOK, 1,
124+
inventory.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
125+
inventory.setItem(12, Items.create(Material.BOOK, 1,
126126
"§6Layer Thickness: §e" + playerBrush.thickness(),
127127
"\n§7Left click to increase\n§7Right click to decrease"
128128
));
129-
inv.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
129+
inventory.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
130130
}
131131

132132
// angle settings
133133
if (brush instanceof AngleBrush) {
134-
inv.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
135-
inv.setItem(12, Items.create(Material.DAYLIGHT_DETECTOR, 1,
134+
inventory.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
135+
inventory.setItem(12, Items.create(Material.DAYLIGHT_DETECTOR, 1,
136136
"§6Angle Check Distance: §e" + playerBrush.angleDistance(),
137137
"\n§7Left click to increase\n§7Right click to decrease"
138138
));
139-
inv.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
139+
inventory.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
140140

141-
inv.setItem(4, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
142-
inv.setItem(13, Items.create(Material.BLAZE_ROD, 1,
141+
inventory.setItem(4, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
142+
inventory.setItem(13, Items.create(Material.BLAZE_ROD, 1,
143143
"§6Maximum Angle: §e" + playerBrush.angleHeightDifference() + "°",
144144
"\n§7Left click to increase\n§7Right click to decrease\n§7Shift click to change by 15"
145145
));
146-
inv.setItem(22, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
146+
inventory.setItem(22, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
147147
}
148148

149149
// fracture settings
150150
if (brush instanceof FractureBrush) {
151-
inv.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
152-
inv.setItem(12, Items.create(Material.DAYLIGHT_DETECTOR, 1,
151+
inventory.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
152+
inventory.setItem(12, Items.create(Material.DAYLIGHT_DETECTOR, 1,
153153
"§6Fracture Check Distance: §e" + playerBrush.fractureDistance(),
154154
"\n§7Left click to increase\n§7Right click to decrease"
155155
));
156-
inv.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
156+
inventory.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
157157
}
158158

159159
// angle settings
160160
if (brush instanceof GradientBrush) {
161-
inv.setItem(4, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
162-
inv.setItem(13, Items.create(Material.MAGMA_CREAM, 1,
161+
inventory.setItem(4, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
162+
inventory.setItem(13, Items.create(Material.MAGMA_CREAM, 1,
163163
"§6Mixing Strength: §e" + playerBrush.mixingStrength() + "%",
164164
"\n§7Left click to increase\n§7Right click to decrease"
165165
));
166-
inv.setItem(22, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
166+
inventory.setItem(22, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
167167
}
168168

169169
if (brush instanceof SplatterBrush || brush instanceof PaintBrush || brush instanceof GradientBrush) {
170-
inv.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
171-
inv.setItem(12, Items.create(Material.BLAZE_POWDER, 1,
170+
inventory.setItem(3, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
171+
inventory.setItem(12, Items.create(Material.BLAZE_POWDER, 1,
172172
"§6Falloff Strength: §e" + playerBrush.falloffStrength() + "%",
173173
"\n§7Left click to increase\n§7Right click to decrease"
174174
));
175-
inv.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
175+
inventory.setItem(21, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
176176
}
177177

178178

179179
// Size
180-
inv.setItem(5, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
181-
inv.setItem(14, Items.create(Material.BROWN_MUSHROOM, 1,
180+
inventory.setItem(5, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
181+
inventory.setItem(14, Items.create(Material.BROWN_MUSHROOM, 1,
182182
"§6Brush Size: §e" + playerBrush.size(),
183183
"\n§7Left click to increase\n§7Right click to decrease\n§7Shift click to change by 10"
184184
));
185-
inv.setItem(23, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
185+
inventory.setItem(23, Items.create(Material.WHITE_STAINED_GLASS_PANE, 1, "§7", ""));
186186

187187
// Mask toggle
188188
if (playerBrush.maskEnabled()) {
189-
inv.setItem(6, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
190-
inv.setItem(15, Items.create(Material.JACK_O_LANTERN, 1,
189+
inventory.setItem(6, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
190+
inventory.setItem(15, Items.create(Material.JACK_O_LANTERN, 1,
191191
"§6Mask",
192192
"§a§lEnabled\n\n§7Click to toggle"
193193
));
194-
inv.setItem(24, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
194+
inventory.setItem(24, Items.create(Material.LIME_STAINED_GLASS_PANE, 1, "§7", ""));
195195
} else {
196-
inv.setItem(6, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
197-
inv.setItem(15, Items.create(Material.CARVED_PUMPKIN, 1, "§6Mask", "§c§lDisabled\n\n§7Click to toggle"));
198-
inv.setItem(24, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
196+
inventory.setItem(6, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
197+
inventory.setItem(15, Items.create(Material.CARVED_PUMPKIN, 1, "§6Mask", "§c§lDisabled\n\n§7Click to toggle"));
198+
inventory.setItem(24, Items.create(Material.RED_STAINED_GLASS_PANE, 1, "§7", ""));
199199
}
200200

201201
// Surface Mode toggle
202-
addSurfaceModeSwitch(inv, playerBrush);
202+
addSurfaceModeSwitch(inventory, playerBrush);
203203

204204
// Place Block
205205
for (int x = 37; x <= 41; x++) {
206-
inv.setItem(x, Items.create(Material.YELLOW_STAINED_GLASS_PANE, 1, "§7", ""));
206+
inventory.setItem(x, Items.create(Material.YELLOW_STAINED_GLASS_PANE, 1, "§7", ""));
207207
}
208208
for (int x = 46; x <= 50; x++) {
209-
inv.setItem(x, Items.create(Material.BARRIER, 1, "§cEmpty Slot", "\n§7Click with a block to set"));
209+
inventory.setItem(x, Items.create(Material.BARRIER, 1, "§cEmpty Slot", "\n§7Click with a block to set"));
210210
}
211211
int x = 46;
212212
int size = playerBrush.blocks().size();
213213
int chance = size == 0 ? 0 : 100 / size;
214214
for (Material material : playerBrush.blocks()) {
215215
if (chance > 64) {
216-
inv.setItem(x, Items.create(material, 1,
216+
inventory.setItem(x, Items.create(material, 1,
217217
"§aSlot " + (x - 45) + " §7" + chance + "%",
218218
"\n§7Left click with a block to change\n§7Right click to clear"
219219
));
220220
} else {
221-
inv.setItem(x, Items.create(material, chance,
221+
inventory.setItem(x, Items.create(material, chance,
222222
"§aSlot " + (x - 45) + " §7" + chance + "%",
223223
"\n§7Left click with a block to change\n§7Right click to clear"
224224
));
@@ -227,8 +227,8 @@ public static void update(@NotNull Inventory inv, @NotNull PlayerBrush playerBru
227227
}
228228

229229
// Mask Block
230-
inv.setItem(43, Items.create(Material.YELLOW_STAINED_GLASS_PANE, 1, "§7", ""));
231-
inv.setItem(52, Items.create(playerBrush.mask(), 1, "§6Current Mask", "\n§7Left click with a block to change"));
230+
inventory.setItem(43, Items.create(Material.YELLOW_STAINED_GLASS_PANE, 1, "§7", ""));
231+
inventory.setItem(52, Items.create(playerBrush.mask(), 1, "§6Current Mask", "\n§7Left click with a block to change"));
232232
}
233233

234234
private static void addSurfaceModeSwitch(Inventory inv, PlayerBrush playerBrush) {

0 commit comments

Comments
 (0)