@@ -61,30 +61,8 @@ public void onEnable() {
61
61
(user , entityPlayer , networkPlayerInfo , list ) ->
62
62
list .add (createBlacklistRemoval ())
63
63
);
64
-
65
- System .out .println ("Starting..." );
66
64
}
67
65
68
- /* @SubscribeEvent
69
- public void onTick(TickEvent.ClientTickEvent event) {
70
- if (!voiceexist) {
71
- for (LabyModAddon addon : AddonLoader.getAddons()) {
72
- if (addon == null || addon.about == null || addon.about.name == null) {
73
- continue;
74
- }
75
- LabyModAddon voicechat = AddonLoader.getAddonByUUID(UUID.fromString(String.valueOf()));
76
- if (voicechat instanceof VoiceChat && addon.about.name.equals("VoiceChat")) {
77
- voiceChat = (VoiceChat) addon;
78
- System.out.println(PREFIX + "VoiceChat found!");
79
- voiceexist = true;
80
- } else {
81
- System.out.println(PREFIX + "VoiceChat not found!");
82
- voiceexist = false;
83
- }
84
- }
85
- }
86
- } */
87
-
88
66
private UserActionEntry createBlacklistEntry () {
89
67
return new UserActionEntry (
90
68
"Blacklist Player" ,
@@ -97,12 +75,6 @@ public void execute(User user, EntityPlayer entityPlayer, NetworkPlayerInfo netw
97
75
UUID uuid = networkPlayerInfo .getGameProfile ().getId ();
98
76
LabyMod .getInstance ().displayMessageInChat (networkPlayerInfo .getGameProfile ().getId ().toString ());
99
77
VoiceChat voiceChat = (VoiceChat ) AddonLoader .getAddonByUUID (vcUuid8 );
100
- if (isVoiceexist ()) {
101
- Map <UUID , Integer > volume = voiceChat .getPlayerVolumes ();
102
- voiceChat .getPlayerVolumes ().put (uuid , 0 );
103
- volume .put (uuid , 0 );
104
- voiceChat .savePlayersVolumes ();
105
- }
106
78
playersToRender .put (networkPlayerInfo .getGameProfile ().getId (), 0 );
107
79
savePlayersToRender ();
108
80
playersToRenderString .add (networkPlayerInfo .getGameProfile ().getName ());
@@ -200,7 +172,7 @@ protected void fillSettings(List<SettingsElement> subSettings) {
200
172
subSettings .add (new BooleanElement (
201
173
"Enable PlayerHider" ,
202
174
this , new ControlElement .IconData (Material .REDSTONE ),
203
- "enabled" , isModOn () )
175
+ "enabled" , modOn )
204
176
);
205
177
subSettings .add (new BooleanElement (
206
178
"Enable Messages" ,
@@ -217,24 +189,12 @@ protected void fillSettings(List<SettingsElement> subSettings) {
217
189
new ControlElement .IconData (Material .REDSTONE_TORCH_ON ), this .key , integer -> {
218
190
this .key = integer ;
219
191
getConfig ().addProperty ("key" , integer );
220
- saveConfig ();
221
192
});
222
-
223
- // If you know how to make both, THIS and the STRING Value to update simultaniously
224
- // feel free to edit this in, so we can use This
225
- /*
226
- StringElement Blacklistbutton = new StringElement(
227
- "Blacklist", new ControlElement.IconData(Material.COAL_BLOCK),
228
- String.join(",", playersToRenderString), this::AddPlayer);
229
- subSettings.add(new HeaderElement(ModColor.cl('a') + "Seperate them by Comma"));
230
-
231
- */
232
193
subSettings .add (keyElement );
233
194
}
234
195
235
196
public void RemovePlayer (String s ) {
236
197
// remove from the list
237
-
238
198
playersToRenderString .remove (s );
239
199
savePlayersToRenderString ();
240
200
// playersToRenderString.removeIf(player -> player.equals(s));
@@ -248,7 +208,6 @@ public void savePlayersToRender() {
248
208
Integer volume = uuidIntegerEntry .getValue ();
249
209
object .addProperty (uuid , volume );
250
210
}
251
- //labyMod().displayMessageInChat(playersToRender.toString());
252
211
getConfig ().add ("playersToRender" , object );
253
212
saveConfig ();
254
213
}
0 commit comments