mirror of
https://github.com/plexusorg/Module-TFMExtras.git
synced 2024-11-01 01:37:09 +00:00
Removes "ultimate" jumppads mode
This commit is contained in:
parent
d2b524c259
commit
8be2a48778
@ -20,7 +20,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
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)
|
@CommandPermissions(permission = "plex.tfmextras.jumppads", source = RequiredCommandSource.ANY)
|
||||||
public class JumpPadsCommand extends PlexCommand
|
public class JumpPadsCommand extends PlexCommand
|
||||||
{
|
{
|
||||||
@ -126,7 +126,7 @@ public class JumpPadsCommand extends PlexCommand
|
|||||||
{
|
{
|
||||||
if (args.length == 1)
|
if (args.length == 1)
|
||||||
{
|
{
|
||||||
return Arrays.asList("none", "normal", "enhanced", "extreme", "ultimate");
|
return Arrays.asList("none", "normal", "enhanced", "extreme");
|
||||||
}
|
}
|
||||||
else if (args.length == 2)
|
else if (args.length == 2)
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,5 @@ public enum Mode
|
|||||||
{
|
{
|
||||||
NORMAL,
|
NORMAL,
|
||||||
ENHANCED,
|
ENHANCED,
|
||||||
EXTREME,
|
EXTREME
|
||||||
ULTIMATE
|
|
||||||
}
|
}
|
||||||
|
@ -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)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
|
Loading…
Reference in New Issue
Block a user