Initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package net.crankedpvp.staff.managers;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.Getter;
|
||||
import net.crankedpvp.staff.StaffPlugin;
|
||||
import net.crankedpvp.staff.struct.StaffMode;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class StaffManager {
|
||||
|
||||
private final StaffPlugin plugin;
|
||||
public StaffManager(StaffPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
this.playersInStaffMode = Maps.newConcurrentMap();
|
||||
}
|
||||
|
||||
@Getter
|
||||
private final Map<Player, StaffMode> playersInStaffMode;
|
||||
|
||||
public StaffMode getStaffModeFromPlayer(Player player) {
|
||||
return this.playersInStaffMode.get(player);
|
||||
}
|
||||
|
||||
public boolean isPlayerInStaffMode(Player player) {
|
||||
return playersInStaffMode.containsKey(player);
|
||||
}
|
||||
|
||||
public void removePlayerFromStaffMode(Player player) {
|
||||
this.playersInStaffMode.remove(player);
|
||||
}
|
||||
|
||||
public void putPlayerInStaffMode(Player player, StaffMode staffMode) {
|
||||
this.playersInStaffMode.put(player, staffMode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user