1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 14:05:25 +01:00

Update McMMOlistener.java

This commit is contained in:
montlikadani 2018-08-16 18:05:50 +02:00 committed by GitHub
parent 40c7b05c46
commit 7dd56a2698
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ public class McMMOlistener implements Listener {
private Jobs plugin;
public boolean mcMMOPresent = false;
HashMap<String, HashMap<AbilityType, Long>> map = new HashMap<String, HashMap<AbilityType, Long>>();
HashMap<String, HashMap<AbilityType, Long>> map = new HashMap<>();
public McMMOlistener(Jobs plugin) {
this.plugin = plugin;
@ -61,7 +61,7 @@ public class McMMOlistener implements Listener {
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void OnAbilityOn(McMMOPlayerAbilityActivateEvent event) {
HashMap<AbilityType, Long> InfoMap = new HashMap<AbilityType, Long>();
HashMap<AbilityType, Long> InfoMap = new HashMap<>();
if (map.containsKey(event.getPlayer().getName()))
InfoMap = map.get(event.getPlayer().getName());
InfoMap.put(event.getAbility(), System.currentTimeMillis() + (event.getAbility().getMaxLength() * 1000));