-
Notifications
You must be signed in to change notification settings - Fork 83
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
1 parent
0da5d76
commit a3590ff
Showing
11 changed files
with
282 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ public enum Cause { | |
COMMAND, | ||
DUNGEON_FINISHED, | ||
GROUP_IS_EMPTY, | ||
LOST, | ||
CUSTOM | ||
|
||
} | ||
|
90 changes: 90 additions & 0 deletions
90
core/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupScoreEvent.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,90 @@ | ||
/* | ||
* Copyright (C) 2012-2016 Frank Baumann | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.github.dre2n.dungeonsxl.event.dgroup; | ||
|
||
import io.github.dre2n.dungeonsxl.player.DGroup; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.HandlerList; | ||
|
||
/** | ||
* @author Daniel Saukel | ||
*/ | ||
public class DGroupScoreEvent extends DGroupEvent implements Cancellable { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
private boolean cancelled; | ||
|
||
private Player scorer; | ||
private DGroup loserGroup; | ||
|
||
public DGroupScoreEvent(DGroup dGroup, Player scorer, DGroup loserGroup) { | ||
super(dGroup); | ||
this.scorer = scorer; | ||
this.loserGroup = loserGroup; | ||
} | ||
|
||
/** | ||
* @return the creator | ||
*/ | ||
public Player getScorer() { | ||
return scorer; | ||
} | ||
|
||
/** | ||
* @param scorer | ||
* the scoerer to set | ||
*/ | ||
public void setCreator(Player scorer) { | ||
this.scorer = scorer; | ||
} | ||
|
||
/** | ||
* @return the group that lost a score to the scorers | ||
*/ | ||
public DGroup getLoserGroup() { | ||
return loserGroup; | ||
} | ||
|
||
/** | ||
* @param loserGroup | ||
* the group that lost a score to the scorers to set | ||
*/ | ||
public void setLoserGroup(DGroup loserGroup) { | ||
this.loserGroup = loserGroup; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancelled) { | ||
this.cancelled = cancelled; | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...src/main/java/io/github/dre2n/dungeonsxl/event/dplayer/instance/DInstancePlayerEvent.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 @@ | ||
/* | ||
* Copyright (C) 2012-2016 Frank Baumann | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.github.dre2n.dungeonsxl.event.dplayer.instance; | ||
|
||
import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerEvent; | ||
import io.github.dre2n.dungeonsxl.player.DInstancePlayer; | ||
|
||
/** | ||
* @author Daniel Saukel | ||
*/ | ||
public abstract class DInstancePlayerEvent extends DPlayerEvent { | ||
|
||
public DInstancePlayerEvent(DInstancePlayer dPlayer) { | ||
super(dPlayer); | ||
} | ||
|
||
@Override | ||
public DInstancePlayer getDPlayer() { | ||
return (DInstancePlayer) dPlayer; | ||
} | ||
|
||
public void setDPlayer(DInstancePlayer dPlayer) { | ||
this.dPlayer = dPlayer; | ||
} | ||
|
||
} |
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
54 changes: 54 additions & 0 deletions
54
...n/java/io/github/dre2n/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEscapeEvent.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,54 @@ | ||
/* | ||
* Copyright (C) 2012-2016 Frank Baumann | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.github.dre2n.dungeonsxl.event.dplayer.instance.edit; | ||
|
||
import io.github.dre2n.dungeonsxl.player.DEditPlayer; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.HandlerList; | ||
|
||
/** | ||
* @author Daniel Saukel | ||
*/ | ||
public class DEditPlayerEscapeEvent extends DEditPlayerEvent implements Cancellable { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
private boolean cancelled; | ||
|
||
public DEditPlayerEscapeEvent(DEditPlayer dPlayer) { | ||
super(dPlayer); | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancelled) { | ||
this.cancelled = cancelled; | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...rc/main/java/io/github/dre2n/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEvent.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 @@ | ||
/* | ||
* Copyright (C) 2012-2016 Frank Baumann | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.github.dre2n.dungeonsxl.event.dplayer.instance.edit; | ||
|
||
import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerEvent; | ||
import io.github.dre2n.dungeonsxl.player.DEditPlayer; | ||
|
||
/** | ||
* @author Daniel Saukel | ||
*/ | ||
public abstract class DEditPlayerEvent extends DPlayerEvent { | ||
|
||
public DEditPlayerEvent(DEditPlayer dPlayer) { | ||
super(dPlayer); | ||
} | ||
|
||
@Override | ||
public DEditPlayer getDPlayer() { | ||
return (DEditPlayer) dPlayer; | ||
} | ||
|
||
public void setDPlayer(DEditPlayer dPlayer) { | ||
this.dPlayer = dPlayer; | ||
} | ||
|
||
} |
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
40 changes: 40 additions & 0 deletions
40
...rc/main/java/io/github/dre2n/dungeonsxl/event/dplayer/instance/game/DGamePlayerEvent.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 @@ | ||
/* | ||
* Copyright (C) 2012-2016 Frank Baumann | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.github.dre2n.dungeonsxl.event.dplayer.instance.game; | ||
|
||
import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerEvent; | ||
import io.github.dre2n.dungeonsxl.player.DGamePlayer; | ||
|
||
/** | ||
* @author Daniel Saukel | ||
*/ | ||
public abstract class DGamePlayerEvent extends DPlayerEvent { | ||
|
||
public DGamePlayerEvent(DGamePlayer dPlayer) { | ||
super(dPlayer); | ||
} | ||
|
||
@Override | ||
public DGamePlayer getDPlayer() { | ||
return (DGamePlayer) dPlayer; | ||
} | ||
|
||
public void setDPlayer(DGamePlayer dPlayer) { | ||
this.dPlayer = dPlayer; | ||
} | ||
|
||
} |
Oops, something went wrong.