Skip to content

Commit

Permalink
Use PlayerComponent.CONSOLE for console punishments (#80)
Browse files Browse the repository at this point in the history
* Use PlayerComponent.CONSOLE for console punishments

Signed-off-by: BT (calcastor/mame) <[email protected]>

* Add annotations deps

Signed-off-by: BT (calcastor/mame) <[email protected]>

---------

Signed-off-by: BT (calcastor/mame) <[email protected]>
  • Loading branch information
calcastor authored Jan 2, 2025
1 parent b632f4f commit cbc8709
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
14 changes: 14 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>22.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.incendo</groupId>
<artifactId>cloud-annotations</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.bukkit.entity.Player;
import org.jetbrains.annotations.Nullable;
import tc.oc.pgm.util.Audience;
import tc.oc.pgm.util.UsernameFormatUtils;
import tc.oc.pgm.util.named.NameStyle;
import tc.oc.pgm.util.player.PlayerComponent;
import tc.oc.pgm.util.text.TemporalComponent;
Expand Down Expand Up @@ -174,7 +173,7 @@ public boolean kick(boolean silent) {
.kickPlayer(formatPunishmentScreen(
getConfig(),
isConsole()
? UsernameFormatUtils.CONSOLE_NAME
? PlayerComponent.CONSOLE
: PlayerComponent.player(getIssuerId(), NameStyle.FANCY),
silent));
return true;
Expand Down
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,21 @@
<version>1.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>22.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.incendo</groupId>
<artifactId>cloud-annotations</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
Expand Down

0 comments on commit cbc8709

Please sign in to comment.