-
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.
- Added SuccessfulHomeTeleportEvent, fired when you teleport to your home - Added MavenPublisher plugin, and its required components
- Loading branch information
TheDutchMC
committed
Jul 1, 2020
1 parent
cebe31a
commit d5d1132
Showing
4 changed files
with
76 additions
and
2 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
57 changes: 57 additions & 0 deletions
57
src/main/java/nl/thedutchmc/dutchyhome/SuccessfulHomeTeleportEvent.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,57 @@ | ||
package nl.thedutchmc.dutchyhome; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
public class SuccessfulHomeTeleportEvent extends Event implements Cancellable { | ||
|
||
private static final HandlerList HANDLERS_LIST = new HandlerList(); | ||
private boolean isCancelled = false; | ||
|
||
private Player player; | ||
private Location locationBeforeHomeTp; | ||
|
||
public SuccessfulHomeTeleportEvent(Player player, Location locationBeforeHomeTp) { | ||
this.player = player; | ||
this.locationBeforeHomeTp = locationBeforeHomeTp; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return isCancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean isCancelled) { | ||
this.isCancelled = isCancelled; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return HANDLERS_LIST; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return HANDLERS_LIST; | ||
} | ||
|
||
public Player getPlayer() { | ||
return player; | ||
} | ||
|
||
public void setPlayer(Player player) { | ||
this.player = player; | ||
} | ||
|
||
public Location getLocationBeforeHomeTp() { | ||
return locationBeforeHomeTp; | ||
} | ||
|
||
public void setLocationBeforeHomeTp(Location locationBeforeHomeTp) { | ||
this.locationBeforeHomeTp = locationBeforeHomeTp; | ||
} | ||
|
||
} |
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