-
Notifications
You must be signed in to change notification settings - Fork 35
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 #319 from SkytAsul/develop
release/1.0.3
- Loading branch information
Showing
98 changed files
with
4,218 additions
and
3,452 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
target/ | ||
.settings/ | ||
/integrations/jars/ | ||
.flattened-pom.xml |
This file was deleted.
Oops, something went wrong.
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
12 changes: 6 additions & 6 deletions
12
api/src/main/java/fr/skytasul/quests/api/events/accounts/PlayerAccountEvent.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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
package fr.skytasul.quests.api.events.accounts; | ||
|
||
import fr.skytasul.quests.api.players.PlayerAccount; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Event; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
import fr.skytasul.quests.api.players.PlayerAccount; | ||
|
||
public abstract class PlayerAccountEvent extends Event { | ||
|
||
protected final @NotNull PlayerAccount account; | ||
|
||
protected PlayerAccountEvent(@NotNull PlayerAccount account) { | ||
this.account = account; | ||
} | ||
|
||
public boolean isAccountCurrent() { | ||
return account.isCurrent(); | ||
} | ||
|
||
public @Nullable Player getPlayer() { | ||
if (!account.isCurrent()) | ||
throw new IllegalStateException("Account is not currently used"); | ||
throw new IllegalStateException("Account " + account.debugName() + " is not currently used"); | ||
|
||
return account.getPlayer(); | ||
} | ||
|
||
public @NotNull PlayerAccount getPlayerAccount() { | ||
return account; | ||
} | ||
|
||
} |
Oops, something went wrong.