Skip to content

Commit

Permalink
update 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
CASELOAD7000 authored Oct 4, 2024
1 parent 7f42f82 commit e635d42
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.caseload</groupId>
<artifactId>KnockbackSync</artifactId>
<version>1.3</version>
<version>1.3.2</version>
<packaging>jar</packaging>

<name>KnockbackSync</name>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/me/caseload/knockbacksync/KnockbackSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public final class KnockbackSync extends JavaPlugin {
private boolean toggled;
private boolean runnable;
private boolean updateAvailable;
private boolean notifyUpdate;

private long runnableInterval;
private long combatTimer;
Expand Down Expand Up @@ -58,7 +59,8 @@ public void onEnable() {
runnable = getConfig().getBoolean("runnable.enabled", true);
runnableInterval = getConfig().getLong("runnable.interval", 5L);
combatTimer = getConfig().getLong("runnable.timer", 30L);
spikeThreshold = getConfig().getLong("spike_threshold", 25L);
spikeThreshold = getConfig().getLong("spike_threshold", 20L);
notifyUpdate = getConfig().getBoolean("notify_updates", true);

if (runnable)
new PingRunnable().runTaskTimerAsynchronously(this, 0L, runnableInterval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
PlayerDataManager.addPlayerData(player.getUniqueId(), new PlayerData(player));

if (KnockbackSync.getInstance().isUpdateAvailable() && player.hasPermission("knockbacksync.update"))
if (KnockbackSync.getInstance().isUpdateAvailable() && KnockbackSync.getInstance().isNotifyUpdate() && player.hasPermission("knockbacksync.update"))
player.sendMessage(ChatColor.translateAlternateColorCodes(
'&',
"&6An updated version of &eKnockbackSync &6is now available for download at: &bhttps://github.com/CASELOAD7000/knockback-sync/releases/latest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class PlayerData {
private final Player player;

// Please read the GitHub FAQ before adjusting.
private static final long PING_OFFSET = 20;
private static final long PING_OFFSET = 25;

@NotNull
private final Map<Integer, Long> timeline = new HashMap<>();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runnable:
# The minimum change in ping required for it to be considered a lag spike.
# If the difference between the latest and previous ping is greater than or equal to
# the threshold, the previous ping value is used to avoid calculation inaccuracies.
spike_threshold: 25
spike_threshold: 20

enable_message: "&aSuccessfully enabled KnockbackSync."
disable_message: "&cSuccessfully disabled KnockbackSync."
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: KnockbackSync
version: '1.3'
version: '1.3.2'
main: me.caseload.knockbacksync.KnockbackSync
api-version: '1.18'
authors: [ Caseload ]
Expand Down

0 comments on commit e635d42

Please sign in to comment.