Permalink
Browse files

Clear invite map when deleting home.

  • Loading branch information...
1 parent bb23498 commit 05d76b2342a83106bf1e5ac063b0eb64bb73f589 @ks07 committed Mar 24, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/main/java/uk/co/ks07/uhome/HomeList.java
View
7 src/main/java/uk/co/ks07/uhome/HomeList.java
@@ -295,6 +295,13 @@ public boolean playerCanSet(Player player) {
public ExitStatus deleteHome(String owner, String name, Logger log) {
if (this.homeExists(owner, name)) {
Home warp = homeList.get(owner.toLowerCase()).get(name);
+
+ if (warp.hasInvitees()) {
+ for (String invitee : warp.getInvitees()) {
+ this.inviteList.get(owner).remove(warp);
+ }
+ }
+
homeList.get(owner.toLowerCase()).remove(name);
WarpDataSource.deleteWarp(warp, log);
return ExitStatus.SUCCESS;

0 comments on commit 05d76b2

Please sign in to comment.