forked from Team-Inceptus/Novaconomy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
api/src/main/java/us/teaminceptus/novaconomy/api/events/corporation/CorporationBanEvent.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,40 @@ | ||
package us.teaminceptus.novaconomy.api.events.corporation; | ||
|
||
import org.bukkit.event.Cancellable; | ||
import org.jetbrains.annotations.NotNull; | ||
import us.teaminceptus.novaconomy.api.business.Business; | ||
import us.teaminceptus.novaconomy.api.corporation.Corporation; | ||
|
||
/** | ||
* Called before a Corporation bans a member. | ||
*/ | ||
public class CorporationBanEvent extends CorporationEvent implements Cancellable { | ||
|
||
private final Business banned; | ||
private boolean cancelled; | ||
|
||
public CorporationBanEvent(@NotNull Corporation corporation, @NotNull Business banned) { | ||
super(corporation); | ||
if (banned == null) throw new IllegalArgumentException("banned cannot be null"); | ||
this.banned = banned; | ||
} | ||
|
||
/** | ||
* Gets the business that was banned. | ||
* @return The business that was banned. | ||
*/ | ||
@NotNull | ||
public Business getBanned() { | ||
return banned; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancel) { | ||
this.cancelled = cancel; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...src/main/java/us/teaminceptus/novaconomy/api/events/corporation/CorporationKickEvent.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,40 @@ | ||
package us.teaminceptus.novaconomy.api.events.corporation; | ||
|
||
import org.bukkit.event.Cancellable; | ||
import org.jetbrains.annotations.NotNull; | ||
import us.teaminceptus.novaconomy.api.business.Business; | ||
import us.teaminceptus.novaconomy.api.corporation.Corporation; | ||
|
||
/** | ||
* Called before a Business is kicked from a Corporation. This is also called if the Business leaves on its own. | ||
*/ | ||
public class CorporationKickEvent extends CorporationEvent implements Cancellable { | ||
|
||
private final Business kicked; | ||
private boolean cancelled; | ||
|
||
public CorporationKickEvent(@NotNull Corporation corporation, @NotNull Business kicked) { | ||
super(corporation); | ||
if (kicked == null) throw new IllegalArgumentException("kicked cannot be null"); | ||
this.kicked = kicked; | ||
} | ||
|
||
/** | ||
* Gets the business that was kicked. | ||
* @return The business that was kicked. | ||
*/ | ||
@NotNull | ||
public Business getKicked() { | ||
return kicked; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancelled) { | ||
this.cancelled = cancelled; | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...rc/main/java/us/teaminceptus/novaconomy/api/events/corporation/CorporationUnbanEvent.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,41 @@ | ||
package us.teaminceptus.novaconomy.api.events.corporation; | ||
|
||
import org.bukkit.event.Cancellable; | ||
import org.jetbrains.annotations.NotNull; | ||
import us.teaminceptus.novaconomy.api.business.Business; | ||
import us.teaminceptus.novaconomy.api.corporation.Corporation; | ||
|
||
/** | ||
* Called before a Business is unbanned from a Corporation. | ||
*/ | ||
public class CorporationUnbanEvent extends CorporationEvent implements Cancellable { | ||
|
||
private final Business unbanned; | ||
private boolean cancelled; | ||
|
||
public CorporationUnbanEvent(@NotNull Corporation corporation, @NotNull Business unbanned) { | ||
super(corporation); | ||
if (unbanned == null) throw new IllegalArgumentException("unbanned cannot be null"); | ||
this.unbanned = unbanned; | ||
} | ||
|
||
/** | ||
* Gets the business that was banned. | ||
* @return The business that was banned. | ||
*/ | ||
@NotNull | ||
public Business getUnbanned() { | ||
return unbanned; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancel) { | ||
this.cancelled = cancel; | ||
} | ||
|
||
} |