mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-03 23:08:07 +01:00
check if same job by its name, just to be on safe side
if multiserver enabled, load player data after some delay.
This commit is contained in:
parent
27cf6147a6
commit
2e0ea7a596
@ -123,7 +123,7 @@ public class Job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSame(Job job) {
|
public boolean isSame(Job job) {
|
||||||
return this.equals(job);
|
return this.getName().equalsIgnoreCase(job.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getPointBoost() {
|
public double getPointBoost() {
|
||||||
|
@ -156,12 +156,21 @@ public class JobsListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(final PlayerJoinEvent event) {
|
||||||
|
|
||||||
// make sure plugin is enabled
|
// make sure plugin is enabled
|
||||||
if (!plugin.isEnabled())
|
if (!plugin.isEnabled())
|
||||||
return;
|
return;
|
||||||
Jobs.getPlayerManager().playerJoin(event.getPlayer());
|
if (!Jobs.getGCManager().MultiServerCompatability())
|
||||||
|
Jobs.getPlayerManager().playerJoin(event.getPlayer());
|
||||||
|
else
|
||||||
|
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Jobs.getPlayerManager().playerJoin(event.getPlayer());
|
||||||
|
}
|
||||||
|
}, 10L);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @EventHandler(priority = EventPriority.MONITOR)
|
// @EventHandler(priority = EventPriority.MONITOR)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: Jobs
|
name: Jobs
|
||||||
description: Jobs Plugin for the BukkitAPI
|
description: Jobs Plugin for the BukkitAPI
|
||||||
main: com.gamingmesh.jobs.Jobs
|
main: com.gamingmesh.jobs.Jobs
|
||||||
version: 3.6.1
|
version: 3.6.2
|
||||||
author: phrstbrn
|
author: phrstbrn
|
||||||
depend: [Vault]
|
depend: [Vault]
|
||||||
softdepend: [MythicMobs, McMMO]
|
softdepend: [MythicMobs, McMMO]
|
||||||
|
Loading…
Reference in New Issue
Block a user