mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Final touches
This commit is contained in:
parent
d516879a5f
commit
f19b715968
@ -124,7 +124,7 @@ public class PlayerManager {
|
||||
}
|
||||
|
||||
this.players.put(player.getName().toLowerCase(), jPlayer);
|
||||
|
||||
jPlayer.setPlayer(player);
|
||||
AutoJoinJobs(player);
|
||||
jPlayer.onConnect();
|
||||
jPlayer.reloadHonorific();
|
||||
@ -186,7 +186,7 @@ public class PlayerManager {
|
||||
* @return the player job info of the player
|
||||
*/
|
||||
public JobsPlayer getJobsPlayer(Player player) {
|
||||
return this.playersCache.get(player.getName().toLowerCase());
|
||||
return getJobsPlayer(player.getName().toLowerCase());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -252,10 +252,11 @@ public class JobsPlayer {
|
||||
|
||||
private Double getPlayerBoost(String JobName, BoostType type) {
|
||||
double Boost = 1.0;
|
||||
if (player.hasPermission("jobs.boost." + JobName + "." + type.getName().toLowerCase()) ||
|
||||
player.hasPermission("jobs.boost." + JobName + ".all") ||
|
||||
player.hasPermission("jobs.boost.all.all") ||
|
||||
player.hasPermission("jobs.boost.all." + type.getName().toLowerCase())) {
|
||||
|
||||
if (Perm.hasPermission(player, "jobs.boost." + JobName + "." + type.getName().toLowerCase()) ||
|
||||
Perm.hasPermission(player, "jobs.boost." + JobName + ".all") ||
|
||||
Perm.hasPermission(player, "jobs.boost.all.all") ||
|
||||
Perm.hasPermission(player, "jobs.boost.all." + type.getName().toLowerCase())) {
|
||||
Boost = Jobs.getGCManager().Boost.get(type);
|
||||
}
|
||||
return Boost;
|
||||
|
@ -117,6 +117,8 @@ public abstract class JobsDAO {
|
||||
|
||||
protected abstract boolean createDefaultLogBase();
|
||||
|
||||
protected abstract boolean createDefaultArchiveBase();
|
||||
|
||||
protected abstract boolean dropDataBase(String name);
|
||||
|
||||
/**
|
||||
|
@ -707,7 +707,6 @@ public class JobsDAOMySQL extends JobsDAO {
|
||||
executeSQL("ALTER TABLE `" + getPrefix() + "archive` DROP COLUMN `player_uuid`, DROP COLUMN `username`;");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -742,7 +741,8 @@ public class JobsDAOMySQL extends JobsDAO {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean createDefaultArchiveBase() {
|
||||
@Override
|
||||
protected boolean createDefaultArchiveBase() {
|
||||
try {
|
||||
executeSQL("CREATE TABLE `" + getPrefix()
|
||||
+ "archive` (`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `userid` int, `job` varchar(20), `experience` int, `level` int);");
|
||||
|
@ -818,7 +818,8 @@ public class JobsDAOSQLite extends JobsDAO {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean createDefaultArchiveBase() {
|
||||
@Override
|
||||
protected boolean createDefaultArchiveBase() {
|
||||
try {
|
||||
executeSQL("CREATE TABLE `" + getPrefix()
|
||||
+ "archive` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `userid` int, `job` varchar(20), `experience` int, `level` int);");
|
||||
|
Loading…
Reference in New Issue
Block a user