Skip to content

Commit

Permalink
Add Magical insufficient XP warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo56958 committed Jan 2, 2025
1 parent 67c2d0c commit 44e5511
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
import de.flo56958.minetinker.modifiers.Modifier;
import de.flo56958.minetinker.utils.ChatWriter;
import de.flo56958.minetinker.utils.ConfigurationManager;
import org.bukkit.Bukkit;
import org.bukkit.Color;
import org.bukkit.GameMode;
import org.bukkit.Material;
import de.flo56958.minetinker.utils.LanguageManager;
import org.bukkit.*;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.AbstractArrow;
import org.bukkit.entity.Arrow;
Expand Down Expand Up @@ -128,6 +126,7 @@ public void onShoot(final MTProjectileLaunchEvent event) {
player.getInventory().addItem(arrow.getItem());
}
event.setCancelled(true);
ChatWriter.sendActionBar(player, ChatColor.RED + LanguageManager.getString("Modifier.Magical.NotEnoughXP", player));
return;
}

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/en_US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ Modifier:
Description: "Shoot a magic arrow that is not affected by gravity and flies %amount% of the normal speed! If the arrow hits a target it does %min% to %max% more damage (depending on level)! Costs %xp XP to shoot!"
ModifierItemName: "Magic Arrow"
DescriptionModifierItem: "Modifier-Item for the Magical-Modifier"
NotEnoughXP: "Not enough XP to shoot!"
Melting:
Name: "Melting"
Description: "%amount% extra damage against burning enemies and %amount% less damage taken while on fire!"
Expand Down

0 comments on commit 44e5511

Please sign in to comment.