-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from VolmitSoftware/Development
Development
- Loading branch information
Showing
37 changed files
with
380 additions
and
33 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
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
49 changes: 49 additions & 0 deletions
49
src/main/java/com/volmit/adapt/content/event/AdaptAdaptationEvent.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,49 @@ | ||
/*------------------------------------------------------------------------------ | ||
- Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers | ||
- Copyright (c) 2022 Arcane Arts (Volmit Software) | ||
- | ||
- 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 <https://www.gnu.org/licenses/>. | ||
-----------------------------------------------------------------------------*/ | ||
|
||
package com.volmit.adapt.content.event; | ||
|
||
import com.volmit.adapt.api.adaptation.Adaptation; | ||
import com.volmit.adapt.api.skill.Skill; | ||
import com.volmit.adapt.api.world.AdaptPlayer; | ||
import com.volmit.adapt.api.world.PlayerSkillLine; | ||
|
||
public class AdaptAdaptationEvent extends AdaptPlayerEvent { | ||
private final Skill<?> skill; | ||
private final PlayerSkillLine playerSkill; | ||
private final Adaptation<?> adaptation; | ||
|
||
public AdaptAdaptationEvent(boolean async, AdaptPlayer player, Adaptation<?> adaptation) { | ||
super(async, player); | ||
this.adaptation = adaptation; | ||
this.playerSkill = player.getSkillLine(adaptation.getSkill().getId()); | ||
this.skill = adaptation.getSkill(); | ||
} | ||
|
||
public Skill<?> getSkill() { | ||
return skill; | ||
} | ||
|
||
public Adaptation<?> getAdaptation() { | ||
return adaptation; | ||
} | ||
|
||
public PlayerSkillLine getPlayerSkill() { | ||
return playerSkill; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/com/volmit/adapt/content/event/AdaptAdaptationUseEvent.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,28 @@ | ||
/*------------------------------------------------------------------------------ | ||
- Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers | ||
- Copyright (c) 2022 Arcane Arts (Volmit Software) | ||
- | ||
- 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 <https://www.gnu.org/licenses/>. | ||
-----------------------------------------------------------------------------*/ | ||
|
||
package com.volmit.adapt.content.event; | ||
|
||
import com.volmit.adapt.api.adaptation.Adaptation; | ||
import com.volmit.adapt.api.world.AdaptPlayer; | ||
|
||
public class AdaptAdaptationUseEvent extends AdaptAdaptationEvent { | ||
public AdaptAdaptationUseEvent(boolean async, AdaptPlayer player, Adaptation<?> adaptation) { | ||
super(async, player, adaptation); | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
src/main/java/com/volmit/adapt/content/event/AdaptEvent.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 @@ | ||
/*------------------------------------------------------------------------------ | ||
- Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers | ||
- Copyright (c) 2022 Arcane Arts (Volmit Software) | ||
- | ||
- 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 <https://www.gnu.org/licenses/>. | ||
-----------------------------------------------------------------------------*/ | ||
|
||
package com.volmit.adapt.content.event; | ||
|
||
import com.volmit.adapt.Adapt; | ||
import com.volmit.adapt.api.world.AdaptServer; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class AdaptEvent extends Event implements Cancellable { | ||
private boolean canceled; | ||
private static final HandlerList handlers = new HandlerList(); | ||
|
||
|
||
public AdaptEvent(boolean async) { | ||
super(async); | ||
canceled = false; | ||
} | ||
|
||
public AdaptServer getServer() { | ||
return Adapt.instance.getAdaptServer(); | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return canceled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean b) { | ||
canceled = b; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/com/volmit/adapt/content/event/AdaptPlayerEvent.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,34 @@ | ||
/*------------------------------------------------------------------------------ | ||
- Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers | ||
- Copyright (c) 2022 Arcane Arts (Volmit Software) | ||
- | ||
- 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 <https://www.gnu.org/licenses/>. | ||
-----------------------------------------------------------------------------*/ | ||
|
||
package com.volmit.adapt.content.event; | ||
|
||
import com.volmit.adapt.api.world.AdaptPlayer; | ||
|
||
public class AdaptPlayerEvent extends AdaptEvent { | ||
private final AdaptPlayer player; | ||
|
||
public AdaptPlayerEvent(boolean async, AdaptPlayer player) { | ||
super(async); | ||
this.player = player; | ||
} | ||
|
||
public AdaptPlayer getPlayer() { | ||
return player; | ||
} | ||
} |
Oops, something went wrong.