forked from Upstream/mmocore
Fixed action bar time out
This commit is contained in:
parent
568ead3eca
commit
0fa680ae2f
@ -36,7 +36,7 @@ public class HideActionBarCommandTreeNode extends CommandTreeNode {
|
|||||||
return CommandResult.FAILURE;
|
return CommandResult.FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
long lastUsed = System.currentTimeMillis() - PlayerActivity.ACTION_BAR_MESSAGE.getTimeOut() + amount * 50;
|
final long lastUsed = System.currentTimeMillis() - PlayerActivity.ACTION_BAR_MESSAGE.getTimeOut() + amount * 50;
|
||||||
PlayerData.get(player).setLastActivity(PlayerActivity.ACTION_BAR_MESSAGE, lastUsed);
|
PlayerData.get(player).setLastActivity(PlayerActivity.ACTION_BAR_MESSAGE, lastUsed);
|
||||||
return CommandResult.SUCCESS;
|
return CommandResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class ActionBarManager extends BukkitRunnable {
|
|||||||
|
|
||||||
public void reload(ConfigurationSection config) {
|
public void reload(ConfigurationSection config) {
|
||||||
enabled = config.getBoolean("enabled", false);
|
enabled = config.getBoolean("enabled", false);
|
||||||
timeOut = config.getInt("", 60);
|
timeOut = config.getInt("time-out", 60);
|
||||||
updateTicks = config.getInt("ticks-to-update", 5);
|
updateTicks = config.getInt("ticks-to-update", 5);
|
||||||
barFormat = config.getString("format", "<No Action Bar Format Found>");
|
barFormat = config.getString("format", "<No Action Bar Format Found>");
|
||||||
|
|
||||||
@ -43,7 +43,6 @@ public class ActionBarManager extends BukkitRunnable {
|
|||||||
Placeholders holders = getActionBarPlaceholders(data);
|
Placeholders holders = getActionBarPlaceholders(data);
|
||||||
data.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(
|
data.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(
|
||||||
holders.apply(data.getPlayer(), data.getProfess().hasActionBar() ? data.getProfess().getActionBar() : barFormat)));
|
holders.apply(data.getPlayer(), data.getProfess().hasActionBar() ? data.getProfess().getActionBar() : barFormat)));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ action-bar:
|
|||||||
# (This doesn't change any other action bars provided by MMOCore.)
|
# (This doesn't change any other action bars provided by MMOCore.)
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
# The amount of milliseconds the bar will be
|
# The amount of ticks the bar will be
|
||||||
# faded out when displaying other action bars.
|
# faded out when displaying other action bars.
|
||||||
time-out: 60
|
time-out: 60
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user