-
-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability for nations to sanction towns, preventing them from j…
…oining the nation via invite or join. (#7129) * Add the ability for nations to sanction towns, preventing them from joining the nation via invite or join. Closes #6544. * Forgot a lang string. * Add admin command * Can't forget about the name blacklist! * Fix lang strings, add ability to /n sanctiontown list [nation], add events.
- Loading branch information
Showing
13 changed files
with
282 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...y/src/main/java/com/palmergames/bukkit/towny/event/nation/NationSanctionTownAddEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.palmergames.bukkit.towny.event.nation; | ||
|
||
import com.palmergames.bukkit.towny.event.CancellableTownyEvent; | ||
import com.palmergames.bukkit.towny.object.Nation; | ||
import com.palmergames.bukkit.towny.object.Town; | ||
|
||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class NationSanctionTownAddEvent extends CancellableTownyEvent { | ||
private static final HandlerList HANDLER_LIST = new HandlerList(); | ||
|
||
private final Nation nation; | ||
private final Town town; | ||
|
||
public NationSanctionTownAddEvent(Nation nation, Town town) { | ||
this.nation = nation; | ||
this.town = town; | ||
} | ||
|
||
public Nation getNation() { | ||
return nation; | ||
} | ||
|
||
public Town getTown() { | ||
return town; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return HANDLER_LIST; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public HandlerList getHandlers() { | ||
return HANDLER_LIST; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...rc/main/java/com/palmergames/bukkit/towny/event/nation/NationSanctionTownRemoveEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.palmergames.bukkit.towny.event.nation; | ||
|
||
import com.palmergames.bukkit.towny.event.CancellableTownyEvent; | ||
import com.palmergames.bukkit.towny.object.Nation; | ||
import com.palmergames.bukkit.towny.object.Town; | ||
|
||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class NationSanctionTownRemoveEvent extends CancellableTownyEvent { | ||
private static final HandlerList HANDLER_LIST = new HandlerList(); | ||
|
||
private final Nation nation; | ||
private final Town town; | ||
|
||
public NationSanctionTownRemoveEvent(Nation nation, Town town) { | ||
this.nation = nation; | ||
this.town = town; | ||
} | ||
|
||
public Nation getNation() { | ||
return nation; | ||
} | ||
|
||
public Town getTown() { | ||
return town; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return HANDLER_LIST; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public HandlerList getHandlers() { | ||
return HANDLER_LIST; | ||
} | ||
} |
Oops, something went wrong.