Skip to content

fix: rtp on death on custom worlds #247

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

Open
wants to merge 1 commit 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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public WorldCustom(World world) {
BetterRTP.debug("- UseWorldBorder: " + this.useWorldborder);
}
}
if (test.get("RTPOnDeath") != null) {
if (test.get("RTPOnDeath").getClass() == Boolean.class) {
RTPOnDeath = Boolean.parseBoolean(test.get("RTPOnDeath").toString());
BetterRTP.debug("- RTPOnDeath: " + this.RTPOnDeath);
}
}
if (test.get("CenterX") != null) {
if (test.get("CenterX").getClass() == Integer.class) {
centerX = Integer.parseInt((test.get("CenterX")).toString());
Expand Down Expand Up @@ -203,7 +209,8 @@ public long getCooldown() {
return cooldown;
}

@Override public boolean getRTPOnDeath() {
@Override
public boolean getRTPOnDeath() {
return RTPOnDeath;
}

Expand Down Expand Up @@ -268,7 +275,8 @@ public void setCooldown(long value) {
this.cooldown = value;
}

@Override public void setRTPOnDeath(boolean bool) {
RTPOnDeath = bool;
@Override
public void setRTPOnDeath(boolean value) {
this.RTPOnDeath = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void load() {
if (BetterRTP.getInstance().getSettings().isDebug()) {
Logger log = BetterRTP.getInstance().getLogger();
log.info("- UseWorldBorder: " + this.useWorldborder);
log.info("- RTPOnDeath: " + this.RTPOnDeath);
log.info("- CenterX: " + this.centerX);
log.info("- CenterZ: " + this.centerZ);
log.info("- MaxRadius: " + this.maxRad);
Expand Down Expand Up @@ -151,7 +152,8 @@ public long getCooldown() {
return BetterRTP.getInstance().getCooldowns().getDefaultCooldownTime();
}

@Override public boolean getRTPOnDeath() {
@Override
public boolean getRTPOnDeath() {
return RTPOnDeath;
}
}