mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-22 10:36:00 +01:00
Remove unused fields, imports, warning suppressions.
Just a bit of spring cleaning!
This commit is contained in:
parent
299a16ca8c
commit
c9b0f85bee
@ -859,7 +859,6 @@ public class ArenaImpl implements Arena
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void revivePlayer(Player p) {
|
||||
removePermissionAttachments(p);
|
||||
removePotionEffects(p);
|
||||
|
@ -264,10 +264,6 @@ public class MobArena extends JavaPlugin
|
||||
return lastFailureCause;
|
||||
}
|
||||
|
||||
public File getPluginFile() {
|
||||
return getFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
if (config == null) {
|
||||
|
@ -5,7 +5,6 @@ import com.garbagemule.MobArena.things.Thing;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -14,16 +13,10 @@ import java.util.Set;
|
||||
|
||||
public class RewardManager
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private MobArena plugin;
|
||||
@SuppressWarnings("unused")
|
||||
private Arena arena;
|
||||
private Map<Player,List<Thing>> players;
|
||||
private Set<Player> rewarded;
|
||||
|
||||
public RewardManager(Arena arena) {
|
||||
this.plugin = arena.getPlugin();
|
||||
this.arena = arena;
|
||||
this.players = new HashMap<>();
|
||||
this.rewarded = new HashSet<>();
|
||||
}
|
||||
@ -39,12 +32,7 @@ public class RewardManager
|
||||
}
|
||||
players.get(p).add(thing);
|
||||
}
|
||||
|
||||
public List<Thing> getRewards(Player p) {
|
||||
List<Thing> rewards = players.get(p);
|
||||
return (rewards == null ? new ArrayList<>(1) : Collections.unmodifiableList(rewards));
|
||||
}
|
||||
|
||||
|
||||
public void grantRewards(Player p) {
|
||||
if (rewarded.contains(p)) return;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.garbagemule.MobArena.util.config;
|
||||
|
||||
import com.garbagemule.MobArena.ConfigError;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
|
Loading…
Reference in New Issue
Block a user