Minor formatting improvements

This commit is contained in:
cervinakuy committed 2021-07-10 21:29:17 -07:00
1 parent 2d3ac714df
commit dcce649dad
4 files changed
+15 -16

No files matched your search

@@ -17,15 +17,15 @@ import java.util.Map;
public class Kit {
private String name;
private final String name;
private String permission;
private Cooldown cooldown;
private int level;
private int health;
private Map<Integer, ItemStack> inventory;
private List<PotionEffect> effects;
private List<Ability> abilities;
private final Map<Integer, ItemStack> inventory;
private final List<PotionEffect> effects;
private final List<Ability> abilities;
private ItemStack helmet;
private ItemStack chestplate;
@@ -23,12 +23,12 @@ import java.util.*;
public class Kits {
private Game plugin;
private Arena arena;
private Resources resources;
private Resource messages;
private final Game plugin;
private final Arena arena;
private final Resources resources;
private final Resource messages;
private Map<String, String> kits;
private final Map<String, String> kits;
public Kits(Game plugin, Arena arena) {
this.arena = arena;
@@ -22,6 +22,8 @@ public class Leaderboards {
registerCache("kills", 25);
registerCache("deaths", 25);
registerCache("level", 25);
// TODO: implement PriorityQueue to manage cached Leaderboards... currently you're basically recreating it lol...
}
private void registerCache(String key, int size) {
@@ -4,7 +4,6 @@ import com.cryptomorin.xseries.XSound;
import com.planetgallium.kitpvp.Game;
import com.planetgallium.kitpvp.game.Arena;
import com.planetgallium.kitpvp.util.Resource;
import com.planetgallium.kitpvp.util.Resources;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -14,15 +13,13 @@ import com.planetgallium.kitpvp.util.Toolkit;
public class HitListener implements Listener {
private Arena arena;
private Resources resources;
private Resource config;
private XSound.Record hitSound;
private final Arena arena;
private final Resource config;
private final XSound.Record hitSound;
public HitListener(Game plugin) {
this.arena = plugin.getArena();
this.resources = plugin.getResources();
this.config = resources.getConfig();
this.config = plugin.getResources().getConfig();
String soundString = config.getString("Combat.HitSound.Sound") + ", 1, " + config.getInt("Combat.HitSound.Pitch");
this.hitSound = XSound.parse(null, Bukkit.getWorlds().get(0).getSpawnLocation(), soundString, false).join();