Skip to content

Multiplayer raid experience with higher omen levels, more raiders, more waves and higher rewards!

License

Notifications You must be signed in to change notification settings

solarrabbit99/LargeRaids

Repository files navigation

LargeRaids

Codacy Badge License Spigot Downloads Commit Activity Discord

LargeRaids is a vanilla Spigot game experience enhancement plugin for raids, which are added to the game in the Village & Pillage Update. It expands the raid's mechanism to accommodate for the multiplayer environment with higher difficulty, higher bad omen levels, more raiders, more waves and higher rewards.

Server Requirements

  • Version: 1.14.4, 1.15.2, 1.16.5, 1.17.1, 1.18.1

Statistics

Installation

If you wish to install the repository locally, you might want to first install the remapped jars for versions 1.17.1 and 1.18 via BuildTools. Afterwhich, follow these steps to ensure that the project builds correctly.

  1. Open up Terminal
  2. Change to any desired directories for cloning the repository
  3. Run git clone https://github.com/zhenghanlee/LargeRaids.git
  4. Run cd ./LargeRaids to head into the project directory
  5. Run mvn install to install the project locally and build the jar file (named LargeRaids.jar) in target folder

Using the API

The API for the plugin has a separate repository. The instructions are duplicated here for your convenience.

Maven Repository

You can add the project as your dependency by including the JitPack repository in your pom.xml:

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>

Then after add the dependency like so (replace VERSION with the version provided by the jitpack badge located at the start of this document):

<dependency>
	<groupId>com.github.zhenghanlee</groupId>
	<artifactId>LargeRaids-API</artifactId>
	<version>VERSION</version>
</dependency>

Gradle Repository

You can add the project as your dependency by including the JitPack repository:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Then after add the dependency like so (replace VERSION with the version provided by the jitpack badge located at the start of this document):

dependencies {
	    implementation 'com.github.zhenghanlee:LargeRaids-API:VERSION'
}

Example Usage

Getting the Plugin

Plugin plugin = Bukkit.getPluginManager().getPlugin("LargeRaids");
if (plugin != null) {
    LargeRaids lr = (LargeRaids) plugin;
    // Rest of the operations here
}

Getting Corresponding LargeRaid

A LargeRaid object can be obtained from either a Bukkit's Location or Bukkit's Raid instance.

RaidManager raidManager = lr.getRaidManager(); // where lr is a LargeRaids instance
Optional<LargeRaid> raid = raidManager.getLargeRaid(location);

Getting Player Kills

We can get the number of kills a player have in a large raid when it finishes (or any time of the raid) as follows:

@EventHandler
public void onRaidFinish(RaidFinishEvent evt) {
    Raid raid = evt.getRaid(); // Vanilla raid
    if (raid.getStatus() != RaidStatus.VICTORY)
        return;
    Optional<LargeRaid> largeRaid = raidManager.getLargeRaid(raid);
    if (!largeRaid.isPresent()) // No corresponding LargeRaid instance
        return;
    Optional<Integer> killCount = largeRaid.map(LargeRaid::getPlayerKills)
            .map(map -> map.get(player.getUniqueId()));
    if (!killCount.isPresent()) // Player is not a hero of this raid
        return;
    // Perform operations with the kill count (e.g. rewarding players based on kill count)
}

About

Multiplayer raid experience with higher omen levels, more raiders, more waves and higher rewards!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages