Changed ASB classes prefix to BSB

This commit is contained in:
Poslovitch 2017-05-21 08:03:17 +02:00
parent 7e8ffea32b
commit 3e381ec1f6
10 changed files with 27 additions and 27 deletions

View File

@ -7,9 +7,9 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import us.tastybento.bskyblock.config.ASBLocale;
import us.tastybento.bskyblock.config.BSBLocale;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.database.ASBDatabase;
import us.tastybento.bskyblock.database.BSBDatabase;
import us.tastybento.bskyblock.database.IslandsManager;
import us.tastybento.bskyblock.database.OfflineHistoryMessages;
import us.tastybento.bskyblock.database.PlayersManager;
@ -23,7 +23,7 @@ import us.tastybento.bskyblock.util.VaultHelper;
public class BSkyBlock extends JavaPlugin{
private static BSkyBlock plugin;
private HashMap<String, ASBLocale> locales = new HashMap<String, ASBLocale>();
private HashMap<String, BSBLocale> locales = new HashMap<String, BSBLocale>();
// Databases
private PlayersManager playersManager;
@ -116,7 +116,7 @@ public class BSkyBlock extends JavaPlugin{
@Override
public String getValue() {
return ASBDatabase.getDatabase().toString();
return BSBDatabase.getDatabase().toString();
}
});
}
@ -133,7 +133,7 @@ public class BSkyBlock extends JavaPlugin{
* Returns an HashMap of locale identifier and the related object
* @return the locales
*/
public HashMap<String, ASBLocale> getLocales(){
public HashMap<String, BSBLocale> getLocales(){
return locales;
}
@ -141,7 +141,7 @@ public class BSkyBlock extends JavaPlugin{
* Returns the default locale
* @return the default locale
*/
public ASBLocale getLocale(){
public BSBLocale getLocale(){
return locales.get(Settings.defaultLanguage);
}
@ -150,7 +150,7 @@ public class BSkyBlock extends JavaPlugin{
* @param sender - CommandSender to get the locale
* @return if sender is a player, the player's locale, otherwise the default locale
*/
public ASBLocale getLocale(CommandSender sender){
public BSBLocale getLocale(CommandSender sender){
if(sender instanceof Player) return getLocale(((Player) sender).getUniqueId());
else return getLocale();
}
@ -160,7 +160,7 @@ public class BSkyBlock extends JavaPlugin{
* @param player - Player to get the locale
* @return the locale for this player
*/
public ASBLocale getLocale(UUID player){
public BSBLocale getLocale(UUID player){
String locale = getPlayers().getPlayer(player).getLocale();
if(locale.isEmpty() || !locales.containsKey(locale)) return locales.get(Settings.defaultLanguage);

View File

@ -15,7 +15,7 @@ import us.tastybento.bskyblock.BSkyBlock;
* @author Tastybento
* @author Poslovitch
*/
public class ASBLocale {
public class BSBLocale {
private BSkyBlock plugin;
@ -29,7 +29,7 @@ public class ASBLocale {
* @param plugin
* @param localeName - name of the yaml file that will be used
*/
public ASBLocale(BSkyBlock plugin, String localeID){
public BSBLocale(BSkyBlock plugin, String localeID){
this.plugin = plugin;
this.localeID = localeID;
getLocale(localeID);

View File

@ -3,7 +3,7 @@ package us.tastybento.bskyblock.config;
import java.util.HashMap;
import java.util.List;
import us.tastybento.bskyblock.database.ASBDatabase.DatabaseType;
import us.tastybento.bskyblock.database.BSBDatabase.DatabaseType;
import us.tastybento.bskyblock.database.OfflineHistoryMessages.HistoryMessageType;
import us.tastybento.bskyblock.database.objects.Island.SettingsFlag;

View File

@ -11,9 +11,9 @@ import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.objects.APlayer;
import us.tastybento.bskyblock.database.sqlite.SQLiteDatabase;
public abstract class ASBDatabase {
public abstract class BSBDatabase {
public static ASBDatabase getDatabase(){
public static BSBDatabase getDatabase(){
for(DatabaseType type : DatabaseType.values()){
if(type == Settings.databaseType) return type.database;
}
@ -34,9 +34,9 @@ public abstract class ASBDatabase {
MYSQL(new MySQLDatabase()),
SQLITE(new SQLiteDatabase());
ASBDatabase database;
BSBDatabase database;
DatabaseType(ASBDatabase database){
DatabaseType(BSBDatabase database){
this.database = database;
}
}

View File

@ -12,7 +12,7 @@ import us.tastybento.bskyblock.database.objects.Island;
public class IslandsManager {
private BSkyBlock plugin;
private ASBDatabase database;
private BSBDatabase database;
private HashMap<Location, Island> islands;
private Island spawn;
@ -22,7 +22,7 @@ public class IslandsManager {
public IslandsManager(BSkyBlock plugin){
this.plugin = plugin;
database = ASBDatabase.getDatabase();
database = BSBDatabase.getDatabase();
islands = new HashMap<Location, Island>();
spawn = null;
}

View File

@ -18,14 +18,14 @@ import us.tastybento.bskyblock.config.Settings;
*/
public class OfflineHistoryMessages {
private BSkyBlock plugin;
private ASBDatabase database;
private BSBDatabase database;
// Offline Messages
private HashMap<UUID, List<String>> messages;
public OfflineHistoryMessages(BSkyBlock plugin){
this.plugin = plugin;
database = ASBDatabase.getDatabase();
database = BSBDatabase.getDatabase();
messages = new HashMap<UUID, List<String>>();
}

View File

@ -10,13 +10,13 @@ import us.tastybento.bskyblock.database.objects.APlayer;
public class PlayersManager{
private BSkyBlock plugin;
private ASBDatabase database;
private BSBDatabase database;
private HashMap<UUID, APlayer> players;
public PlayersManager(BSkyBlock plugin){
this.plugin = plugin;
database = ASBDatabase.getDatabase();
database = BSBDatabase.getDatabase();
players = new HashMap<UUID, APlayer>();
}

View File

@ -4,11 +4,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import us.tastybento.bskyblock.database.ASBDatabase;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.BSBDatabase;
import us.tastybento.bskyblock.database.objects.APlayer;
public class FlatFileDatabase extends ASBDatabase{
public class FlatFileDatabase extends BSBDatabase{
@Override
public APlayer loadPlayerData(UUID uuid) {

View File

@ -4,11 +4,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import us.tastybento.bskyblock.database.ASBDatabase;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.BSBDatabase;
import us.tastybento.bskyblock.database.objects.APlayer;
public class MySQLDatabase extends ASBDatabase{
public class MySQLDatabase extends BSBDatabase{
@Override
public APlayer loadPlayerData(UUID uuid) {

View File

@ -4,11 +4,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import us.tastybento.bskyblock.database.ASBDatabase;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.BSBDatabase;
import us.tastybento.bskyblock.database.objects.APlayer;
public class SQLiteDatabase extends ASBDatabase{
public class SQLiteDatabase extends BSBDatabase{
@Override
public APlayer loadPlayerData(UUID uuid) {