Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for TureBentzin

MiniGame, that can be used as a standalone MiniGame or an SMP - easy setup via ServicesManager

Report EffectSteal?

EffectSteal

Attention: EffectSteal does not function automatically as a MiniGame or SMP!

What is EffectSteal?

EffectSteal is a plugin that provides you with Gameplay functionality that can be utilized for a MiniGame or for an SMP. If you want to explain quickly what EffectSteal does, you can say that whenever a player kills another player, the killer will be granted a "good" effect and the victim will be granted a "bad" effect. Through the principle of how EffectSteal is designed, it is not possible to have a bad and a good effect at the same time. You can think about it like a number. If this number is 0 then you have no effects if it is positive, then this is the number of good effects you have. If it is negative then this resembles the number of bad effects you have. So if you have 3 negative effects and you kill someone, then your number will increase and one bad effect will be removed. If you have 2 positive effects, and you kill someone, then you will get a third positive effect. The same thing applies to the victim of the kill. If you have 2 good effects and you get killed, then one of them is removed. If you have 1 bad effect and you get killed, then you will receive a second one.

So EffecSteal provides you a very competitive Gameplay that can be used to create some interesting MiniGames or SMPs. It can be used in a small Arena or over a whole World. A match can be 10 minutes or 10 Days. All of this can be realized by following the steps below:

To get this running in the way you want it is necessary to follow some steps:

  1. You should create a new Plugin to run alongside EffectSteal on your paper server. This Plugin needs to depend on "EffectSteal"
  2. Now you should revive the "EffectStealService" from the ServicesManager. I suggest building some check if EffectSteal is really installed - but depending on your shading an Exception will be thrown anyway because of the missing class!
        EffectStealService service = Bukkit.getServicesManager().load(EffectStealService.class);
        if (service == null) {
            try {
                throw new ClassNotFoundException("EffectSteal is not installed!");
            } catch (ClassNotFoundException e) {
                throw new RuntimeException(e);
            }
        }
  1. Now you can set up EffectSteal via the "service" object as desired. If you want to start your Game then please use the service.startNewGame(long) method. The parameter describes the point in time the game is planned to end.

  2. (Optional) If you want to customize your EffectSteal more then you might want to use the custom Events that are provided with EffectSteal: Example:

import net.juligames.effectsteal.event.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.jetbrains.annotations.NotNull;

/**
 * @author Ture Bentzin
 * 01.11.2022
 */
public class EffectStealManagerListener implements Listener {
    
    @EventHandler
    public void onGameStart(@NotNull GameStartEvent startEvent) {
        //your code goes here
    }

    @EventHandler
    public void onTimerTick(@NotNull TimerTickEvent tickEvent) {
        //your code goes here
    }

    @EventHandler
    public void onEffectSteal(@NotNull EffectStealActionEvent stealActionEvent) {
        //your code goes here
    }

    @EventHandler
    public void onGameKilled(@NotNull GameKilledEvent gameKilledEvent) {
        //your code goes here
    }

    @EventHandler
    public void onGameEnd(@NotNull GameEndEvent gameEndEvent) {
        //your code goes here
    }
}

Information

CategoryGames
Published onJanuary 7, 2023
LicenseUnspecified
Downloads505
Stars1
Watchers0

Pinned Versions

Members

Avatar for Bommels05

Bommels05

Editor