Skip to content

Commit 9df65bb

Browse files
committed
fix home command issue
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.
1 parent 3459911 commit 9df65bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ yarn_mappings=14
77
loader_version=0.11.6
88
fabric_version=0.37.0+1.17
99
# Mod Properties
10-
mod_version=2.1.3
10+
mod_version=2.1.4
1111
# Dependencies
1212
modmenu_version=2.0.2
1313
lombok_version=1.18.20

src/main/java/dev/frydae/emcutils/listeners/CommandListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ private static ActionResult handleResidenceHomeCommand(ClientPlayerEntity player
2121
int num = 1;
2222
String loc = "";
2323

24-
if (args != null) {
24+
if (args.size() != 0) {
2525
if (args.size() == 1) {
2626
if (NumberUtils.isParsable(args.get(0))) {
2727
num = Integer.parseInt(args.get(0));
@@ -34,7 +34,7 @@ private static ActionResult handleResidenceHomeCommand(ClientPlayerEntity player
3434
loc = args.get(1);
3535
}
3636
}
37-
}
37+
} else return ActionResult.PASS;
3838

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

0 commit comments

Comments
 (0)