-
Notifications
You must be signed in to change notification settings - Fork 1
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 #134 from Nookure/dev
realase/v1.4.4
- Loading branch information
Showing
46 changed files
with
1,192 additions
and
610 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 |
---|---|---|
|
@@ -49,7 +49,7 @@ jobs: | |
cp -r NookureStaff/NookureStaff-API/build/docs/javadoc javadocs/javadocs/NookureStaff/ | ||
ls javadocs/javadocs/NookureStaff | ||
cd javadocs | ||
git config --global user.email [email protected] | ||
git config --global user.email [email protected] | ||
git config --global user.name Angelillo15 | ||
git add . | ||
git commit -m "Update javadocs" | ||
|
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
14 changes: 14 additions & 0 deletions
14
...taff-API/src/main/java/com/nookure/staff/api/annotation/staff/StaffChatAsDefaultBool.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,14 @@ | ||
package com.nookure.staff.api.annotation.staff; | ||
|
||
import com.google.inject.BindingAnnotation; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target({ElementType.FIELD, ElementType.PARAMETER}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@BindingAnnotation | ||
public @interface StaffChatAsDefaultBool { | ||
} |
14 changes: 14 additions & 0 deletions
14
NookureStaff-API/src/main/java/com/nookure/staff/api/annotation/staff/StaffModeBool.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,14 @@ | ||
package com.nookure.staff.api.annotation.staff; | ||
|
||
import com.google.inject.BindingAnnotation; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target({ElementType.FIELD, ElementType.PARAMETER}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@BindingAnnotation | ||
public @interface StaffModeBool { | ||
} |
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: 12 additions & 0 deletions
12
...I/src/main/java/com/nookure/staff/api/config/bukkit/partials/config/StaffChatPartial.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,12 @@ | ||
package com.nookure.staff.api.config.bukkit.partials.config; | ||
|
||
import org.spongepowered.configurate.objectmapping.ConfigSerializable; | ||
import org.spongepowered.configurate.objectmapping.meta.Comment; | ||
import org.spongepowered.configurate.objectmapping.meta.Setting; | ||
|
||
@ConfigSerializable | ||
public class StaffChatPartial { | ||
@Setting | ||
@Comment("If this is enabled, the staff chat will be logged in the console.") | ||
public boolean logStaffChatInConsole = true; | ||
} |
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
127 changes: 127 additions & 0 deletions
127
NookureStaff-API/src/main/java/com/nookure/staff/api/database/model/StaffStateModel.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,127 @@ | ||
package com.nookure.staff.api.database.model; | ||
|
||
import com.google.auto.value.AutoBuilder; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.UUID; | ||
|
||
/** | ||
* The StaffStateModel class. | ||
* <p> | ||
* This class is used to represent the state of a staff member. | ||
* It contains the UUID of the player, whether the player is in staff mode, and whether the player is vanished. | ||
* This class is immutable, in order to change the state of a player, a new instance of the StaffStateModel must be created. | ||
*/ | ||
public record StaffStateModel( | ||
@NotNull UUID uuid, | ||
boolean staffMode, | ||
boolean vanished, | ||
boolean staffChatEnabled | ||
) { | ||
/** | ||
* Constructor for the StaffStateModel. | ||
* | ||
* @param uuid The UUID of the player. | ||
*/ | ||
public StaffStateModel(UUID uuid) { | ||
this(uuid, false, false, false); | ||
} | ||
|
||
/** | ||
* Builder for the StaffStateModel. | ||
*/ | ||
@AutoBuilder(ofClass = StaffStateModel.class) | ||
public abstract static class Builder { | ||
/** | ||
* Returns a new instance of the StaffStateModel Builder. | ||
* | ||
* @return A new instance of the StaffStateModel Builder. | ||
*/ | ||
public static Builder builder() { | ||
return new AutoBuilder_StaffStateModel_Builder(); | ||
} | ||
|
||
/** | ||
* Returns a new instance of the StaffStateModel Builder. | ||
* | ||
* @param staffStateModel The StaffStateModel to copy. | ||
* @return A new instance of the StaffStateModel Builder. | ||
*/ | ||
public static Builder builder(StaffStateModel staffStateModel) { | ||
return builder() | ||
.uuid(staffStateModel.uuid()) | ||
.staffMode(staffStateModel.staffMode()) | ||
.staffChatEnabled(staffStateModel.staffChatEnabled()) | ||
.vanished(staffStateModel.vanished()); | ||
} | ||
|
||
/** | ||
* Sets the UUID of the player. | ||
* | ||
* @param uuid The UUID of the player. | ||
* @return The Builder instance. | ||
*/ | ||
public abstract Builder uuid(@NotNull UUID uuid); | ||
|
||
/** | ||
* Sets whether the player is in staff mode. | ||
* | ||
* @param staffMode Whether the player is in staff mode. | ||
* @return The Builder instance. | ||
*/ | ||
public abstract Builder staffMode(boolean staffMode); | ||
|
||
/** | ||
* Sets whether the player is vanished. | ||
* | ||
* @param vanished Whether the player is vanished. | ||
* @return The Builder instance. | ||
*/ | ||
public abstract Builder vanished(boolean vanished); | ||
|
||
/** | ||
* Sets whether the player is vanished. | ||
* | ||
* @param staffChatEnabled Whether the player is vanished. | ||
* @return The Builder instance. | ||
*/ | ||
public abstract Builder staffChatEnabled(boolean staffChatEnabled); | ||
|
||
/** | ||
* Builds the StaffStateModel. | ||
* | ||
* @return The StaffStateModel. | ||
*/ | ||
public abstract StaffStateModel build(); | ||
} | ||
|
||
public static Builder builder() { | ||
return Builder.builder(); | ||
} | ||
|
||
public static Builder builder(StaffStateModel staffStateModel) { | ||
return Builder.builder(staffStateModel); | ||
} | ||
|
||
public UUID uuid() { | ||
return uuid; | ||
} | ||
|
||
public boolean staffMode() { | ||
return staffMode; | ||
} | ||
|
||
public boolean vanished() { | ||
return vanished; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "StaffStateModel{" + | ||
"uuid=" + uuid + | ||
", staffMode=" + staffMode + | ||
", vanished=" + vanished + | ||
", staffChatEnabled=" + staffChatEnabled + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.