File tree Expand file tree Collapse file tree 3 files changed +4
-31
lines changed
eternalcore-core/src/main/java/com/eternalcode/core
configuration/implementation Expand file tree Collapse file tree 3 files changed +4
-31
lines changed Original file line number Diff line number Diff line change 6
6
import com .eternalcode .core .feature .automessage .AutoMessageSettings ;
7
7
import com .eternalcode .core .feature .catboy .CatBoySettings ;
8
8
import com .eternalcode .core .feature .chat .ChatSettings ;
9
- import com .eternalcode .core .feature .heal .HealConfiguration ;
10
9
import com .eternalcode .core .feature .helpop .HelpOpSettings ;
11
10
import com .eternalcode .core .feature .jail .JailSettings ;
12
11
import com .eternalcode .core .feature .randomteleport .RandomTeleportSettingsImpl ;
@@ -145,9 +144,6 @@ public static class Homes extends OkaeriConfig {
145
144
};
146
145
}
147
146
148
- @ Bean
149
- public HealConfiguration heal = new HealConfiguration ();
150
-
151
147
@ Comment ({ " " , "# Awesome sounds" })
152
148
@ Bean
153
149
public Sounds sound = new Sounds ();
Original file line number Diff line number Diff line change 1
1
package com .eternalcode .core .feature .heal ;
2
2
3
3
import com .eternalcode .annotations .scan .command .DescriptionDocs ;
4
- import com .eternalcode .core .configuration .implementation .PluginConfiguration ;
5
4
import com .eternalcode .core .injector .annotations .Inject ;
6
5
import com .eternalcode .core .notice .NoticeService ;
7
6
import com .eternalcode .core .util .PotionEffectUtil ;
18
17
class HealCommand {
19
18
20
19
private final NoticeService noticeService ;
21
- private final HealConfiguration healConfiguration ;
22
20
23
21
@ Inject
24
- HealCommand (NoticeService noticeService , PluginConfiguration pluginConfiguration ) {
22
+ HealCommand (NoticeService noticeService ) {
25
23
this .noticeService = noticeService ;
26
- this .healConfiguration = pluginConfiguration .heal ;
27
24
}
28
25
29
26
@ Execute
@@ -69,11 +66,10 @@ private void heal(Player player) {
69
66
player .setRemainingAir (player .getMaximumAir ());
70
67
71
68
for (PotionEffect effect : player .getActivePotionEffects ()) {
72
- if (healConfiguration .removeOnlyNegativeEffects ) {
73
- if (!PotionEffectUtil .isNegativeEffect (effect .getType ())) {
74
- continue ;
75
- }
69
+ if (!PotionEffectUtil .isNegativeEffect (effect .getType ())) {
70
+ continue ;
76
71
}
72
+
77
73
player .removePotionEffect (effect .getType ());
78
74
}
79
75
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments