4
4
import com .eternalcode .combat .fight .drop .DropSettings ;
5
5
import com .eternalcode .combat .fight .effect .FightEffectSettings ;
6
6
import com .eternalcode .combat .fight .pearl .FightPearlSettings ;
7
- import com .eternalcode .combat . notification . Notification ;
8
- import com .eternalcode .combat . notification . implementation . ActionBarNotification ;
7
+ import com .eternalcode .multification . bukkit . notice . BukkitNotice ;
8
+ import com .eternalcode .multification . notice . Notice ;
9
9
import eu .okaeri .configs .OkaeriConfig ;
10
10
import eu .okaeri .configs .annotation .Comment ;
11
11
import org .bukkit .Material ;
12
+ import org .bukkit .Sound ;
13
+ import org .bukkit .SoundCategory ;
12
14
import org .bukkit .entity .EntityType ;
13
15
import org .bukkit .event .entity .EntityDamageEvent ;
14
16
@@ -21,13 +23,13 @@ public class PluginConfig extends OkaeriConfig {
21
23
@ Comment ("# Do you want to change the plugin settings?" )
22
24
public Settings settings = new Settings ();
23
25
24
- @ Comment ({" " , "# Ender pearl settings" })
26
+ @ Comment ({ " " , "# Ender pearl settings" })
25
27
public FightPearlSettings pearl = new FightPearlSettings ();
26
28
27
- @ Comment ({" " , "# Custom effects settings" })
29
+ @ Comment ({ " " , "# Custom effects settings" })
28
30
public FightEffectSettings effect = new FightEffectSettings ();
29
31
30
- @ Comment ({" " , "# Set a custom way for a player's items to drop on death (if in combat)" })
32
+ @ Comment ({ " " , "# Set a custom way for a player's items to drop on death (if in combat)" })
31
33
public DropSettings dropSettings = new DropSettings ();
32
34
33
35
public static class Settings extends OkaeriConfig {
@@ -53,7 +55,7 @@ public static class Settings extends OkaeriConfig {
53
55
})
54
56
public double blockedRegionKnockMultiplier = 1 ;
55
57
56
- @ Comment ({"# Should the player be prevented from entering regions with WorldGuard flag PVP set to DENY " })
58
+ @ Comment ({ "# Should the player be prevented from entering regions with WorldGuard flag PVP set to DENY " })
57
59
public boolean shouldPreventPvpRegions = true ;
58
60
59
61
@ Comment ("# Set the radius of the blocked region if you aren't using WorldGuard basen on default spawn region!" )
@@ -62,7 +64,7 @@ public static class Settings extends OkaeriConfig {
62
64
@ Comment ("# Release attacker after victim dies?" )
63
65
public boolean shouldReleaseAttacker = true ;
64
66
65
- @ Comment ({"# If you want to exclude admins from combat, " ,
67
+ @ Comment ({ "# If you want to exclude admins from combat, " ,
66
68
"# Setting this to true - admins cannot be tagged and will not tag other players on hit" ,
67
69
"# Setting this to false - admins can be tagged and can tag other players on hit"
68
70
})
@@ -150,7 +152,7 @@ public enum BlockPlacingMode {
150
152
151
153
}
152
154
153
- @ Comment ({" " , "# Do you want to change the plugin messages?" })
155
+ @ Comment ({ " " , "# Do you want to change the plugin messages?" })
154
156
public Messages messages = new Messages ();
155
157
156
158
public static class Messages extends OkaeriConfig {
@@ -168,85 +170,88 @@ public static class Messages extends OkaeriConfig {
168
170
"# BossBar colors: https://javadoc.io/static/net.kyori/adventure-api/4.14.0/net/kyori/adventure/bossbar/BossBar.Color.html" ,
169
171
"# BossBar overlays: https://javadoc.io/static/net.kyori/adventure-api/4.14.0/net/kyori/adventure/bossbar/BossBar.Overlay.html"
170
172
})
171
- public Notification combatNotification = new ActionBarNotification ("&dCombat ends in: &f{TIME}" );
173
+ public Notice combatNotification = BukkitNotice .builder ()
174
+ .actionBar ("&dCombat ends in: &f{TIME}" )
175
+ .sound (Sound .ENTITY_EXPERIENCE_ORB_PICKUP , SoundCategory .PLAYERS , 2.0F , 1.0F )
176
+ .build ();
172
177
173
178
@ Comment ("# Message sent when the player does not have permission to perform a command" )
174
- public String noPermission = "&cYou don't have permission to perform this command!" ;
179
+ public Notice noPermission = Notice . chat ( "&cYou don't have permission \" {PERMISSION} \" to perform this command!" ) ;
175
180
176
181
@ Comment ("# Message sent when the specified player could not be found" )
177
- public String playerNotFound = "&cThe specified player could not be found!" ;
182
+ public Notice playerNotFound = Notice . chat ( "&cThe specified player could not be found!" ) ;
178
183
179
184
@ Comment ("# Message sent when the player enters combat" )
180
- public String playerTagged = "&cYou are in combat, do not leave the server!" ;
185
+ public Notice playerTagged = Notice . chat ( "&cYou are in combat, do not leave the server!" ) ;
181
186
182
187
@ Comment ("# Message sent when the player leaves combat" )
183
- public String playerUntagged = "&aYou are no longer in combat! You can safely leave the server." ;
188
+ public Notice playerUntagged = Notice . chat ( "&aYou are no longer in combat! You can safely leave the server." ) ;
184
189
185
190
@ Comment ("# This is broadcast when the player is in combat and logs out" )
186
- public String playerLoggedOutDuringCombat = "&c{PLAYER} logged off during the fight!" ;
191
+ public Notice playerLoggedOutDuringCombat = Notice . chat ( "&c{PLAYER} logged off during the fight!" ) ;
187
192
188
193
@ Comment ({
189
194
"# Message sent when the player is in combat and tries to use a disabled command" ,
190
195
"# you can configure the list of disabled commands in the blockedCommands section of the config.yml file"
191
196
})
192
- public String commandDisabledDuringCombat = "&cUsing this command during combat is prohibited!" ;
197
+ public Notice commandDisabledDuringCombat = Notice . chat ( "&cUsing this command during combat is prohibited!" ) ;
193
198
194
199
@ Comment ("# Message sent when player tries to use a command with invalid arguments" )
195
- public String invalidCommandUsage = "&7Correct usage: &e{USAGE}" ;
200
+ public Notice invalidCommandUsage = Notice . chat ( "&7Correct usage: &e{USAGE}" ) ;
196
201
197
202
@ Comment ("# Message sent when player tries to open inventory, but the inventory open is blocked" )
198
- public String inventoryBlockedDuringCombat = "&cYou cannot open this inventory during combat!" ;
203
+ public Notice inventoryBlockedDuringCombat = Notice . chat ( "&cYou cannot open this inventory during combat!" ) ;
199
204
200
- @ Comment ({"# Message sent when player tries to place a block, but the block place is blocked" ,
201
- "# Placeholder {Y} is replaced with the Y coordinate set in the config" ,
202
- "# Placeholder {MODE} is replaced with the mode set in the config" })
203
- public String blockPlacingBlockedDuringCombat = "&cYou cannot place {MODE} {Y} coordinate during combat!" ;
205
+ @ Comment ({ "# Message sent when player tries to place a block, but the block place is blocked" ,
206
+ "# Placeholder {Y} is replaced with the Y coordinate set in the config" ,
207
+ "# Placeholder {MODE} is replaced with the mode set in the config" })
208
+ public Notice blockPlacingBlockedDuringCombat = Notice . chat ( "&cYou cannot place {MODE} {Y} coordinate during combat!" ) ;
204
209
205
210
@ Comment ("# Message sent when player tries to enter a region" )
206
- public String cantEnterOnRegion = "&cYou can't enter this region during combat!" ;
211
+ public Notice cantEnterOnRegion = Notice . chat ( "&cYou can't enter this region during combat!" ) ;
207
212
208
213
public static class AdminMessages extends OkaeriConfig {
209
214
@ Comment ("# Message sent when console tries to use a command that is only for players" )
210
- public String onlyForPlayers = "&cThis command is only available to players!" ;
215
+ public Notice onlyForPlayers = Notice . chat ( "&cThis command is only available to players!" ) ;
211
216
212
217
@ Comment ("# Message sent to admin when they tag a player" )
213
- public String adminTagPlayer = "&7You have tagged &e{PLAYER}" ;
218
+ public Notice adminTagPlayer = Notice . chat ( "&7You have tagged &e{PLAYER}" ) ;
214
219
215
220
@ Comment ("# Message sent when a player is tagged by an admin" )
216
- public String adminTagMultiplePlayers = "&7You have tagged &e{FIRST_PLAYER}&7 and &e{SECOND_PLAYER}&7." ;
221
+ public Notice adminTagMultiplePlayers = Notice . chat ( "&7You have tagged &e{FIRST_PLAYER}&7 and &e{SECOND_PLAYER}&7." ) ;
217
222
218
223
@ Comment ("# Message sent to admin when they remove a player from combat" )
219
- public String adminUntagPlayer = "&7You have removed &e{PLAYER}&7 from the fight." ;
224
+ public Notice adminUntagPlayer = Notice . chat ( "&7You have removed &e{PLAYER}&7 from the fight." ) ;
220
225
221
226
@ Comment ("# Message sent when the player is not in combat" )
222
- public String adminPlayerNotInCombat = "&cThis player is not in combat!" ;
227
+ public Notice adminPlayerNotInCombat = Notice . chat ( "&cThis player is not in combat!" ) ;
223
228
224
229
@ Comment ("# Message sent when the player is in combat" )
225
- public String playerInCombat = "&c{PLAYER} is currently in combat!" ;
230
+ public Notice playerInCombat = Notice . chat ( "&c{PLAYER} is currently in combat!" ) ;
226
231
227
232
@ Comment ("# Message sent when a player is not in combat" )
228
- public String playerNotInCombat = "&a{PLAYER} is not currently in combat." ;
233
+ public Notice playerNotInCombat = Notice . chat ( "&a{PLAYER} is not currently in combat." ) ;
229
234
230
235
@ Comment ("# Message sent when an admin tries to tag themselves" )
231
- public String adminCannotTagSelf = "&cYou cannot tag yourself!" ;
236
+ public Notice adminCannotTagSelf = Notice . chat ( "&cYou cannot tag yourself!" ) ;
232
237
233
238
@ Comment ("# Message sent when an admin disables the ability to get tagged for some time" )
234
- public String adminTagOutSelf = "&7Successfully disabled tag for Yourself! You will be taggable after &e{TIME} " ;
239
+ public Notice adminTagOutSelf = Notice . chat ( "&7Successfully disabled tag for Yourself! You will be taggable after &e{TIME} " ) ;
235
240
236
241
@ Comment ("# Message sent when an admin disables the ability to get tagged for some time for other player" )
237
- public String adminTagOut = "&7Successfully disabled tag for &e{PLAYER}! They will be taggable after &e{TIME} " ;
242
+ public Notice adminTagOut = Notice . chat ( "&7Successfully disabled tag for &e{PLAYER}! They will be taggable after &e{TIME} " ) ;
238
243
239
244
@ Comment ("# Message sent to the player whom the ability to get tagged for some time has been disabled" )
240
- public String playerTagOut = "&7You will be taggable in &e{TIME} !" ;
245
+ public Notice playerTagOut = Notice . chat ( "&7You will be taggable in &e{TIME} !" ) ;
241
246
242
247
@ Comment ("# Message sent when an admin reenables the ability to get tagged for the player" )
243
- public String adminTagOutOff = "&7Successfully enabled tag for &e{PLAYER}!" ;
248
+ public Notice adminTagOutOff = Notice . chat ( "&7Successfully enabled tag for &e{PLAYER}!" ) ;
244
249
245
250
@ Comment ("# Message sent to the player whom the ability to get tagged has been reenabled" )
246
- public String playerTagOutOff = "&7You are now taggable!" ;
251
+ public Notice playerTagOutOff = Notice . chat ( "&7You are now taggable!" ) ;
247
252
248
253
@ Comment ("# Message sent when player cannot be tagged because they have enabled tag-out" )
249
- public String adminTagOutCanceled = "&cCannot tag this player due to tag-out!" ;
254
+ public Notice adminTagOutCanceled = Notice . chat ( "&cCannot tag this player due to tag-out!" ) ;
250
255
}
251
256
}
252
257
}
0 commit comments