Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/MineValley/CoreAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Snabeldier committed Dec 6, 2024
2 parents 94d9d1f + 55a49e5 commit 94b2323
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
distribution: 'temurin'
cache: 'maven'
java-version: 8
java-version: 21

- name: Set Project Version
run: mvn versions:set -DnewVersion=${{ inputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<smart-api.version>1.61.2</smart-api.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
</properties>

<groupId>minevalley.core</groupId>
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/minevalley/core/api/npc/NPC.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import minevalley.core.api.ChatMenu;
import minevalley.core.api.armorstand.FakeArmorStand;
import minevalley.core.api.users.OnlineUser;
import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.Location;
Expand Down Expand Up @@ -78,13 +79,21 @@ default void zoomIn(OnlineUser user) {
void lookAt(Vector vector);

void sneak();

void unSneak();

boolean isSneaking();

void setSneaking(boolean sneaking);

void ride(FakeArmorStand fakeArmorStand);

void exitVehicle();

FakeArmorStand getRiddenFakeArmorStand();

boolean isRiding();

ItemStack getLeftHand();

NPC setLeftHand(ItemStack itemStack);
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/minevalley/core/api/users/OnlineUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import minevalley.core.api.regions.utils.PlayerLocation;
import minevalley.core.api.users.enums.FractionService;
import minevalley.core.api.users.enums.McVersion;
import minevalley.core.api.users.enums.TabListView;
import minevalley.core.api.users.enums.TeamRank;
import minevalley.core.api.utils.ChatHandler;
import minevalley.core.api.utils.ClickableMessage;
Expand Down Expand Up @@ -114,6 +115,20 @@ public interface OnlineUser extends User {

void sendActionBar(@NonNull String message);

/**
* Sends a tab-list view to this user.
*
* @param view view to be sent
*/
void sendTabListView(@NonNull TabListView view);

/**
* Gets the current tab-list view of this user.
*
* @return current tab-list view
*/
TabListView getTabListView();

/**
* Sends a message to this user like the default player.sendMessage()-method. Without any prefix or color.
*
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/minevalley/core/api/users/enums/TabListView.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package minevalley.core.api.users.enums;

public enum TabListView {

DEFAULT,
DISPOSAL,
MAIL,
MEDIC,
POLICE,
TEAM,
SUPPORT
}

0 comments on commit 94b2323

Please sign in to comment.