-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add events for towns and nations' level changing.
- Loading branch information
Showing
5 changed files
with
214 additions
and
3 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
Towny/src/main/java/com/palmergames/bukkit/towny/event/nation/NationLevelDecreaseEvent.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,36 @@ | ||
package com.palmergames.bukkit.towny.event.nation; | ||
|
||
import org.bukkit.Bukkit; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
import com.palmergames.bukkit.towny.object.Nation; | ||
|
||
public class NationLevelDecreaseEvent extends Event { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
private final Nation nation; | ||
|
||
public NationLevelDecreaseEvent(Nation nation) { | ||
super(!Bukkit.getServer().isPrimaryThread()); | ||
this.nation = nation; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
/** | ||
* The nation which has had its Nation_Level decrease. | ||
* | ||
* @return nation which has had its Nation_Level decrease. | ||
*/ | ||
public Nation getNation() { | ||
return nation; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Towny/src/main/java/com/palmergames/bukkit/towny/event/nation/NationLevelIncreaseEvent.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,36 @@ | ||
package com.palmergames.bukkit.towny.event.nation; | ||
|
||
import org.bukkit.Bukkit; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
import com.palmergames.bukkit.towny.object.Nation; | ||
|
||
public class NationLevelIncreaseEvent extends Event { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
private final Nation nation; | ||
|
||
public NationLevelIncreaseEvent(Nation nation) { | ||
super(!Bukkit.getServer().isPrimaryThread()); | ||
this.nation = nation; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
/** | ||
* The nation which has had its Nation_Level increase. | ||
* | ||
* @return nation which has had its Nation_Level increase. | ||
*/ | ||
public Nation getNation() { | ||
return nation; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Towny/src/main/java/com/palmergames/bukkit/towny/event/town/TownLevelDecreaseEvent.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,36 @@ | ||
package com.palmergames.bukkit.towny.event.town; | ||
|
||
import org.bukkit.Bukkit; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
import com.palmergames.bukkit.towny.object.Town; | ||
|
||
public class TownLevelDecreaseEvent extends Event { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
private final Town town; | ||
|
||
public TownLevelDecreaseEvent(Town town) { | ||
super(!Bukkit.getServer().isPrimaryThread()); | ||
this.town = town; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
/** | ||
* The town which has had its Town_Level decrease. | ||
* | ||
* @return town which has had its Town_Level decrease. | ||
*/ | ||
public Town getTown() { | ||
return town; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Towny/src/main/java/com/palmergames/bukkit/towny/event/town/TownLevelIncreaseEvent.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,36 @@ | ||
package com.palmergames.bukkit.towny.event.town; | ||
|
||
import org.bukkit.Bukkit; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
import com.palmergames.bukkit.towny.object.Town; | ||
|
||
public class TownLevelIncreaseEvent extends Event { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
private final Town town; | ||
|
||
public TownLevelIncreaseEvent(Town town) { | ||
super(!Bukkit.getServer().isPrimaryThread()); | ||
this.town = town; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
/** | ||
* The town which has had its Town_Level increase. | ||
* | ||
* @return town which has had its Town_Level increase. | ||
*/ | ||
public Town getTown() { | ||
return town; | ||
} | ||
} |
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