mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-21 18:25:12 +01:00
Merge remote-tracking branch 'origin/master'
Conflicts: src/main/java/us/tastybento/bskyblock/database/ASBDatabase.java src/main/java/us/tastybento/bskyblock/database/IslandsManager.java src/main/java/us/tastybento/bskyblock/database/PlayersManager.java src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabase.java src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabase.java src/main/java/us/tastybento/bskyblock/database/sqlite/SQLiteDatabase.java
This commit is contained in:
commit
ed114a4333
10
README.md
10
README.md
@ -2,14 +2,16 @@ BSkyBlock
|
||||
==========
|
||||
[![Build Status](https://travis-ci.org/tastybento/bskyblock.svg?branch=master)](https://travis-ci.org/tastybento/bskyblock)
|
||||
|
||||
A Skyblock Bukkit plugin for Minecraft derived from BSkyBlock!
|
||||
|
||||
A Skyblock Bukkit plugin for Minecraft derived from the well-known ASkyBlock!
|
||||
This is a survival game where the player starts with an island in the sky.
|
||||
|
||||
BSkyBlock (Better SkyBlock) represents a turning point on ASkyBlock's history : Tastybento and Poslovitch thought and designed together this complete rewrite in order to provide a whole new way to play Skyblock.
|
||||
|
||||
**Discover today BSkyBlock, its gameplay overhaul, and enjoy the Skyblock revival!**
|
||||
|
||||
Bugs and Feature requests
|
||||
=========================
|
||||
File bug and feature requests here: https://github.com/tastybento/BSkyBlock-Bugs-N-Features/issues
|
||||
|
||||
File bug and feature requests here: https://github.com/tastybento/bskyblock/issues
|
||||
|
||||
Note for developers
|
||||
===================
|
||||
|
@ -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);
|
||||
|
||||
|
@ -4,7 +4,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
|
||||
public class AdminCommand extends ASBCommand{
|
||||
public class AdminCommand extends BSBCommand{
|
||||
|
||||
public AdminCommand(BSkyBlock plugin) {
|
||||
super(plugin);
|
||||
|
4
src/main/java/us/tastybento/bskyblock/commands/ASBCommand.java → src/main/java/us/tastybento/bskyblock/commands/BSBCommand.java
Executable file → Normal file
4
src/main/java/us/tastybento/bskyblock/commands/ASBCommand.java → src/main/java/us/tastybento/bskyblock/commands/BSBCommand.java
Executable file → Normal file
@ -21,10 +21,10 @@ import us.tastybento.bskyblock.util.Util;
|
||||
*
|
||||
* @author Poslovitch
|
||||
*/
|
||||
public abstract class ASBCommand implements CommandExecutor, TabCompleter{
|
||||
public abstract class BSBCommand implements CommandExecutor, TabCompleter{
|
||||
private Map<String, CommandArgumentHandler> arguments;
|
||||
|
||||
protected ASBCommand(BSkyBlock plugin){
|
||||
protected BSBCommand(BSkyBlock plugin){
|
||||
arguments = new HashMap<String, CommandArgumentHandler>();
|
||||
|
||||
// Automatically register the help argument
|
@ -18,7 +18,7 @@ import us.tastybento.bskyblock.util.VaultHelper;
|
||||
* @author Tastybento
|
||||
* @author Poslovitch
|
||||
*/
|
||||
public class IslandCommand extends ASBCommand{
|
||||
public class IslandCommand extends BSBCommand{
|
||||
private BSkyBlock plugin;
|
||||
|
||||
public IslandCommand(BSkyBlock plugin) {
|
||||
|
4
src/main/java/us/tastybento/bskyblock/config/ASBLocale.java → src/main/java/us/tastybento/bskyblock/config/BSBLocale.java
Executable file → Normal file
4
src/main/java/us/tastybento/bskyblock/config/ASBLocale.java → src/main/java/us/tastybento/bskyblock/config/BSBLocale.java
Executable file → Normal 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);
|
@ -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;
|
||||
|
||||
|
@ -11,9 +11,9 @@ import us.tastybento.bskyblock.database.objects.Island;
|
||||
import us.tastybento.bskyblock.database.objects.Players;
|
||||
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;
|
||||
}
|
||||
}
|
@ -16,8 +16,8 @@ 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 HashMap<UUID, Island> islandsByUUID;
|
||||
// 2D islandGrid of islands, x,z
|
||||
@ -30,7 +30,7 @@ public class IslandsManager {
|
||||
|
||||
public IslandsManager(BSkyBlock plugin){
|
||||
this.plugin = plugin;
|
||||
database = ASBDatabase.getDatabase();
|
||||
database = BSBDatabase.getDatabase();
|
||||
islands = new HashMap<Location, Island>();
|
||||
islandsByUUID = new HashMap<UUID, Island>();
|
||||
spawn = null;
|
||||
|
@ -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>>();
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ import us.tastybento.bskyblock.util.VaultHelper;
|
||||
public class PlayersManager{
|
||||
|
||||
private BSkyBlock plugin;
|
||||
private ASBDatabase database;
|
||||
private BSBDatabase database;
|
||||
|
||||
private HashMap<UUID, Players> playerCache;
|
||||
|
||||
@ -31,7 +31,7 @@ public class PlayersManager{
|
||||
*/
|
||||
public PlayersManager(BSkyBlock plugin){
|
||||
this.plugin = plugin;
|
||||
database = ASBDatabase.getDatabase();
|
||||
database = BSBDatabase.getDatabase();
|
||||
playerCache = new HashMap<UUID, Players>();
|
||||
}
|
||||
|
||||
|
@ -6,11 +6,11 @@ import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import us.tastybento.bskyblock.database.ASBDatabase;
|
||||
import us.tastybento.bskyblock.database.BSBDatabase;
|
||||
import us.tastybento.bskyblock.database.objects.Island;
|
||||
import us.tastybento.bskyblock.database.objects.Players;
|
||||
|
||||
public class FlatFileDatabase extends ASBDatabase{
|
||||
public class FlatFileDatabase extends BSBDatabase{
|
||||
|
||||
@Override
|
||||
public UUID getUUID(String name, boolean adminCheck) {
|
||||
|
@ -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.BSBDatabase;
|
||||
import us.tastybento.bskyblock.database.objects.Island;
|
||||
import us.tastybento.bskyblock.database.objects.Players;
|
||||
|
||||
public class MySQLDatabase extends ASBDatabase{
|
||||
public class MySQLDatabase extends BSBDatabase{
|
||||
|
||||
@Override
|
||||
public Players loadPlayerData(UUID uuid) {
|
||||
|
@ -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.BSBDatabase;
|
||||
import us.tastybento.bskyblock.database.objects.Island;
|
||||
import us.tastybento.bskyblock.database.objects.Players;
|
||||
|
||||
public class SQLiteDatabase extends ASBDatabase{
|
||||
public class SQLiteDatabase extends BSBDatabase{
|
||||
|
||||
@Override
|
||||
public Players loadPlayerData(UUID uuid) {
|
||||
|
Loading…
Reference in New Issue
Block a user