mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
It should be compiled against 1.8
This commit is contained in:
parent
7d35127e6b
commit
0cada339d8
6
pom.xml
6
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>Jobs</groupId>
|
||||
<artifactId>jobs</artifactId>
|
||||
<version>4.10.2</version>
|
||||
<version>4.10.3</version>
|
||||
<name>Jobs</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
@ -162,8 +162,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- <plugin> -->
|
||||
|
@ -331,11 +331,13 @@ public class Jobs extends JavaPlugin {
|
||||
* @return the player manager
|
||||
*/
|
||||
public static PlayerManager getPlayerManager() {
|
||||
if (pManager == null)
|
||||
pManager = new PlayerManager();
|
||||
return pManager;
|
||||
}
|
||||
|
||||
public void setPlayerManager() {
|
||||
pManager = new PlayerManager();
|
||||
|
||||
}
|
||||
|
||||
public static void setRestrictedBlockManager() {
|
||||
@ -567,14 +569,14 @@ public class Jobs extends JavaPlugin {
|
||||
loadAllPlayersData();
|
||||
// add all online players
|
||||
for (Player online : Bukkit.getServer().getOnlinePlayers()) {
|
||||
pManager.playerJoin(online);
|
||||
getPlayerManager().playerJoin(online);
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadAllPlayersData() {
|
||||
long time = System.currentTimeMillis();
|
||||
// Cloning to avoid issues
|
||||
HashMap<UUID, PlayerInfo> temp = new HashMap<>(pManager.getPlayersInfoUUIDMap());
|
||||
HashMap<UUID, PlayerInfo> temp = new HashMap<>(getPlayerManager().getPlayersInfoUUIDMap());
|
||||
HashMap<Integer, List<JobsDAOData>> playersJobs = dao.getAllJobs();
|
||||
HashMap<Integer, PlayerPoints> playersPoints = dao.getAllPoints();
|
||||
HashMap<Integer, HashMap<String, Log>> playersLogs = dao.getAllLogs();
|
||||
@ -585,7 +587,7 @@ public class Jobs extends JavaPlugin {
|
||||
Entry<UUID, PlayerInfo> one = it.next();
|
||||
try {
|
||||
int id = one.getValue().getID();
|
||||
JobsPlayer jPlayer = pManager.getJobsPlayerOffline(
|
||||
JobsPlayer jPlayer = getPlayerManager().getJobsPlayerOffline(
|
||||
one.getValue(),
|
||||
playersJobs.get(id),
|
||||
playersPoints.get(id),
|
||||
@ -594,15 +596,15 @@ public class Jobs extends JavaPlugin {
|
||||
playersLimits.get(id));
|
||||
if (jPlayer == null)
|
||||
continue;
|
||||
pManager.addPlayerToCache(jPlayer);
|
||||
getPlayerManager().addPlayerToCache(jPlayer);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
dao.getMap().clear();
|
||||
if (pManager.getPlayersCache().size() != 0)
|
||||
consoleMsg("&e[Jobs] Preloaded " + pManager.getPlayersCache().size() + " players data in " + ((int) (((System.currentTimeMillis() - time)
|
||||
if (getPlayerManager().getPlayersCache().size() != 0)
|
||||
consoleMsg("&e[Jobs] Preloaded " + getPlayerManager().getPlayersCache().size() + " players data in " + ((int) (((System.currentTimeMillis() - time)
|
||||
/ 1000d) * 100) / 100D));
|
||||
}
|
||||
|
||||
@ -635,7 +637,7 @@ public class Jobs extends JavaPlugin {
|
||||
for (Job job : jobs) {
|
||||
usedSlots.put(job, dao.getSlotsTaken(job));
|
||||
}
|
||||
pManager.reload();
|
||||
getPlayerManager().reload();
|
||||
permissionHandler.registerPermissions();
|
||||
|
||||
// set the system to auto save
|
||||
@ -667,7 +669,7 @@ public class Jobs extends JavaPlugin {
|
||||
if (paymentThread != null)
|
||||
paymentThread.shutdown();
|
||||
|
||||
pManager.saveAll();
|
||||
getPlayerManager().saveAll();
|
||||
|
||||
if (dao != null) {
|
||||
dao.closeConnections();
|
||||
@ -679,7 +681,7 @@ public class Jobs extends JavaPlugin {
|
||||
*/
|
||||
public static void ChangeDatabase() {
|
||||
DBManager.switchDataBase();
|
||||
pManager.reload();
|
||||
getPlayerManager().reload();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -828,7 +830,6 @@ public class Jobs extends JavaPlugin {
|
||||
setPermissionHandler(new PermissionHandler(this));
|
||||
setPluginLogger(getLogger());
|
||||
setJobsClassloader();
|
||||
setPlayerManager();
|
||||
setLanguage();
|
||||
setGUIManager();
|
||||
setExplore();
|
||||
@ -853,7 +854,6 @@ public class Jobs extends JavaPlugin {
|
||||
getServer().getPluginManager().registerEvents(new JobsListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new JobsPaymentListener(this), this);
|
||||
|
||||
|
||||
if (getMcMMOManager().CheckmcMMO())
|
||||
setMcMMOlistener();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user