@@ -191,23 +191,23 @@ public void isAffordableFor(final IUser user, final CompletableFuture<Boolean> f
191191 }
192192
193193 if (getMoney () != null && getMoney ().signum () > 0 && !user .canAfford (getMoney ())) {
194- future .completeExceptionally (new ChargeException (user . playerTl ( "notEnoughMoney" , NumberUtil .displayCurrency (getMoney (), ess ) )));
194+ future .completeExceptionally (new ChargeException ("notEnoughMoney" , NumberUtil .displayCurrency (getMoney (), ess )));
195195 return ;
196196 }
197197
198198 if (getItemStack () != null && !Inventories .containsAtLeast (user .getBase (), itemStack , itemStack .getAmount ())) {
199- future .completeExceptionally (new ChargeException (user . playerTl ( "missingItems" , getItemStack ().getAmount (), ess .getItemDb ().name (getItemStack () ))));
199+ future .completeExceptionally (new ChargeException ("missingItems" , getItemStack ().getAmount (), ess .getItemDb ().name (getItemStack ())));
200200 return ;
201201 }
202202
203203 final BigDecimal money ;
204204 if (command != null && !command .isEmpty () && (money = getCommandCost (user )).signum () > 0 && !user .canAfford (money )) {
205- future .completeExceptionally (new ChargeException (user . playerTl ( "notEnoughMoney" , NumberUtil .displayCurrency (money , ess ) )));
205+ future .completeExceptionally (new ChargeException ("notEnoughMoney" , NumberUtil .displayCurrency (money , ess )));
206206 return ;
207207 }
208208
209209 if (exp != null && exp > 0 && SetExpFix .getTotalExperience (user .getBase ()) < exp ) {
210- future .completeExceptionally (new ChargeException (user . playerTl ( "notEnoughExperience" ) ));
210+ future .completeExceptionally (new ChargeException ("notEnoughExperience" ));
211211 }
212212 }
213213
@@ -285,7 +285,7 @@ public void charge(final IUser user, final CompletableFuture<Boolean> future) {
285285 ess .getLogger ().log (Level .INFO , "charging user " + user .getName () + " money " + getMoney ().toPlainString ());
286286 }
287287 if (!user .canAfford (getMoney ()) && getMoney ().signum () > 0 ) {
288- future .completeExceptionally (new ChargeException (user . playerTl ( "notEnoughMoney" , NumberUtil .displayCurrency (getMoney (), ess ) )));
288+ future .completeExceptionally (new ChargeException ("notEnoughMoney" , NumberUtil .displayCurrency (getMoney (), ess )));
289289 return ;
290290 }
291291 user .takeMoney (getMoney ());
@@ -295,7 +295,7 @@ public void charge(final IUser user, final CompletableFuture<Boolean> future) {
295295 ess .getLogger ().log (Level .INFO , "charging user " + user .getName () + " itemstack " + getItemStack ().toString ());
296296 }
297297 if (!Inventories .containsAtLeast (user .getBase (), getItemStack (), getItemStack ().getAmount ())) {
298- future .completeExceptionally (new ChargeException (user . playerTl ( "missingItems" , getItemStack ().getAmount (), getItemStack ().getType ().toString ().toLowerCase (Locale .ENGLISH ).replace ("_" , " " ) )));
298+ future .completeExceptionally (new ChargeException ("missingItems" , getItemStack ().getAmount (), getItemStack ().getType ().toString ().toLowerCase (Locale .ENGLISH ).replace ("_" , " " )));
299299 return ;
300300 }
301301 Inventories .removeItemAmount (user .getBase (), getItemStack (), getItemStack ().getAmount ());
@@ -304,7 +304,7 @@ public void charge(final IUser user, final CompletableFuture<Boolean> future) {
304304 if (command != null ) {
305305 final BigDecimal cost = getCommandCost (user );
306306 if (!user .canAfford (cost ) && cost .signum () > 0 ) {
307- future .completeExceptionally (new ChargeException (user . playerTl ( "notEnoughMoney" , NumberUtil .displayCurrency (cost , ess ) )));
307+ future .completeExceptionally (new ChargeException ("notEnoughMoney" , NumberUtil .displayCurrency (cost , ess )));
308308 return ;
309309 }
310310 user .takeMoney (cost );
@@ -315,7 +315,7 @@ public void charge(final IUser user, final CompletableFuture<Boolean> future) {
315315 }
316316 final int experience = SetExpFix .getTotalExperience (user .getBase ());
317317 if (experience < getExperience () && getExperience () > 0 ) {
318- future .completeExceptionally (new ChargeException (user . playerTl ( "notEnoughExperience" ) ));
318+ future .completeExceptionally (new ChargeException ("notEnoughExperience" ));
319319 return ;
320320 }
321321 SetExpFix .setTotalExperience (user .getBase (), experience - getExperience ());
0 commit comments