Skip to content

Commit

Permalink
0.1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaytak committed Oct 11, 2024
1 parent 6e500c8 commit c09cd6a
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 5 deletions.
Binary file modified .gradle/8.8/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/8.8/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/8.8/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/8.8/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/8.8/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'com.jaytak'
version = '0.1.19'
version = '0.1.22'

repositories {
mavenCentral()
Expand Down
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions build/resources/main/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Player Message Configuration:
# Plugin Title:
PlayerTitle: "§2§l[§r§2Player Promote§2§l]§r "
# Message to show to new players, set this to DISABLED to stop this message from appearing at all:
NewPlayerMessage: "This is the first time you have joined. Please read the rules at spawn and you can promote yourself to player once you have agreed to the rules."
# Message to show to the player when they have successfully been promoted:
PromoteMessage: "You have been promoted to the Player group! GLHF!"
# Message to show to the player when they are already in a higher group then the default group:
AlreadyPromotedMessage: "You are already in the group Player, or higher."

# Groups:
# Inital group the player will join in (this should be left at the default unless you have changed it):
DefaultGroup: "default"
# The group you would like the player to be promoted to:
PromoteToGroup: "group.player"
2 changes: 1 addition & 1 deletion build/resources/main/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: PlayerPromote
version: '0.1.19'
version: '0.1.22'
main: com.jaytak.playerPromote.PlayerPromote
api-version: '1.21'
commands:
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
6 changes: 4 additions & 2 deletions src/main/java/com/jaytak/playerPromote/PlayerPromote.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public final class PlayerPromote extends JavaPlugin implements Listener {
@Override
public void onEnable() {
// Plugin startup logic
getServer().getPluginManager().registerEvents(this, this);
saveDefaultConfig();
loadConfig();
this.getCommand("agree").setExecutor(new AgreeCommand());
Expand All @@ -50,8 +51,9 @@ public void onDisable() {

@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
if (!event.getPlayer().hasPlayedBefore() && !Objects.equals(newPlayerMessage, "DISABLED")) {
event.getPlayer().sendMessage(newPlayerMessage);
getLogger().info("Player Joined! " + event.getPlayer().getName());
if (!event.getPlayer().hasPlayedBefore() && newPlayerMessage != null && !newPlayerMessage.equals("DISABLED")) {
event.getPlayer().sendMessage(playerTitle + newPlayerMessage);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: PlayerPromote
version: '0.1.19'
version: '0.1.22'
main: com.jaytak.playerPromote.PlayerPromote
api-version: '1.21'
commands:
Expand Down

0 comments on commit c09cd6a

Please sign in to comment.