Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore delay on first join #221

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<dependency>
<groupId>com.github.WhipDevelopment</groupId>
<artifactId>CrashClaim</artifactId>
<version>-75abe3b665-1</version>
<version>c697d3e</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private static void updater(Player p) {
//RTP on first join
private static void rtpOnFirstJoin(Player p) {
if (getPl().getSettings().isRtpOnFirstJoin_Enabled() && !p.hasPlayedBefore())
HelperRTP.tp(p, Bukkit.getConsoleSender(), Bukkit.getWorld(getPl().getSettings().getRtpOnFirstJoin_World()), null, RTP_TYPE.JOIN); //Console is sender to override delays
HelperRTP.tp(p, Bukkit.getConsoleSender(), Bukkit.getWorld(getPl().getSettings().getRtpOnFirstJoin_World()), null, RTP_TYPE.JOIN, true, true);
}

private static BetterRTP getPl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@

import net.william278.husktowns.api.BukkitHuskTownsAPI;
import org.bukkit.Location;
import org.bukkit.plugin.java.JavaPlugin;

public class RTP_HuskTowns implements RegionPluginCheck {

private final BukkitHuskTownsAPI huskTownsAPI;

public RTP_HuskTowns(JavaPlugin plugin) {
this.huskTownsAPI = BukkitHuskTownsAPI.getInstance();
}

@Override
public boolean check(Location loc) {
boolean result = true;
if (REGIONPLUGINS.HUSKTOWNS.isEnabled()) {
try {
result = !huskTownsAPI.getClaimAt(loc).isPresent();
result = !BukkitHuskTownsAPI.getInstance().getClaimAt(loc).isPresent();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down