Merge pull request #2 from plexusorg/ultimatum-for-jp-ultimate

Removes "ultimate" jumppads mode
This commit is contained in:
Telesphoreo 2024-01-27 09:50:16 -06:00 committed by GitHub
commit 346ba909fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 38 deletions

View file

@ -20,7 +20,7 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@CommandParameters(name = "jumppads", usage = "/jumppads <mode> [player]", description = "Enables jump pads for yourself or another player. Mode types available: none, regular, enhanced, extreme, ultimate", aliases = "jp,pads,launchpads")
@CommandParameters(name = "jumppads", usage = "/jumppads <mode> [player]", description = "Enables jump pads for yourself or another player. Mode types available: none, regular, enhanced, extreme", aliases = "jp,pads,launchpads")
@CommandPermissions(permission = "plex.tfmextras.jumppads", source = RequiredCommandSource.ANY)
public class JumpPadsCommand extends PlexCommand
{
@ -126,7 +126,7 @@ public class JumpPadsCommand extends PlexCommand
{
if (args.length == 1)
{
return Arrays.asList("none", "normal", "enhanced", "extreme", "ultimate");
return Arrays.asList("none", "normal", "enhanced", "extreme");
}
else if (args.length == 2)
{

View file

@ -4,6 +4,5 @@ public enum Mode
{
NORMAL,
ENHANCED,
EXTREME,
ULTIMATE
EXTREME
}

View file

@ -100,40 +100,6 @@ public class JumpPadsListener extends PlexListener
}
}
if (mode.equals(Mode.ULTIMATE))
{
blockWrapMap.forEach((b, w) ->
{
if (jumpPads.wool.getValues().contains(b.getType()))
{
if (w.y() == -1)
{
jumpPads.extreme(playerVector.add(new Vector(0.0, jumpPads.SCALAR * jumpPads.STRENGTH, 0.0)));
}
switch (w.x())
{
case (-1):
jumpPads.extreme(playerVector.add(new Vector(-jumpPads.SCALAR * jumpPads.STRENGTH, 0.0, 0.0)));
case (1):
jumpPads.extreme(playerVector.add(new Vector(jumpPads.SCALAR * jumpPads.STRENGTH, 0.0, 0.0)));
}
switch (w.z())
{
case (-1):
jumpPads.extreme(playerVector.add(new Vector(0.0, 0.0, -jumpPads.SCALAR * jumpPads.STRENGTH)));
case (1):
jumpPads.extreme(playerVector.add(new Vector(0.0, 0.0, jumpPads.SCALAR * jumpPads.STRENGTH)));
}
player.setVelocity(playerVector);
}
});
}
}
@EventHandler(priority = EventPriority.HIGHEST)