Skip to content

Commit

Permalink
fix home command issue
Browse files Browse the repository at this point in the history
say we have the scenario of /home 1 on smp1 and /home 2 on smp2
if the player were to do /home while on smp2, they would be sent to the 2nd home in vanilla; without this fix, they're sent to home on smp1.
  • Loading branch information
triphora committed Jul 16, 2021
1 parent 3459911 commit 9df65bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn_mappings=14
loader_version=0.11.6
fabric_version=0.37.0+1.17
# Mod Properties
mod_version=2.1.3
mod_version=2.1.4
# Dependencies
modmenu_version=2.0.2
lombok_version=1.18.20
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private static ActionResult handleResidenceHomeCommand(ClientPlayerEntity player
int num = 1;
String loc = "";

if (args != null) {
if (args.size() != 0) {
if (args.size() == 1) {
if (NumberUtils.isParsable(args.get(0))) {
num = Integer.parseInt(args.get(0));
Expand All @@ -34,7 +34,7 @@ private static ActionResult handleResidenceHomeCommand(ClientPlayerEntity player
loc = args.get(1);
}
}
}
} else return ActionResult.PASS;

String resName = Util.getPlayer().getEntityName() + (num > 1 ? "-" + num : ""); // FIXME: this is what causes #33

Expand Down

0 comments on commit 9df65bb

Please sign in to comment.