Advanced Portals

Advanced Portals

307k Downloads

Console Command

ak521 opened this issue ยท 18 comments

commented

How do I set up a console command?

CommandLevels: hk

is what I have but player is still executing command. https://www.spigotmc.org/threads/advanced-portals-console-command.324784/

commented

Copied from post made a second ago on the linked forum to help fix this issue if others have it

The issue is that you haven't added the flag to make the command run as the server. If the config changed it so all commands were done as server it would cause a lot of other issues.

you want to create a portal with the tag command:"#effect @player strength 8" or change the data you have in the file you listed above to

portalArgs:
    command:
      '1': #effect @player strength 8
commented

[Server] INFO ak521 issued server command: /# effect ak521 strength 8
healing:
world: PvP
triggerblock: AIR
destination: strength
pos1:
X: 54
Y: 84
Z: 55
pos2:
X: 52
Y: 82
Z: 55
portalArgs:
command:
'1': '#effect @player strength 8'

If it do it without the '' after '1'
cmd doesn't execute

commented
commented

@ak521 I need to enable some sorta email notifications or on my phone a bit more for here and spigot. Anyway what does it do or what does it do in the server console log?

commented

If that log is correct then you have put a space between # and effect by mistake

commented

Nothing. # will just close everything after it, no?

commented

Close?

commented

IF there is a space after it yes xD because it would be like doing / effect in the console. Make sure the flags for command portals are enabled in the main config

commented

void, everything will not work after it

commented
commented
# Advanced Portals Config

# To set this file back to its default state just delete it and reload the server or restart it!



# Set to true if you want the normal axes to work normally but the ones gived with /portals selector or wand will still work though
# It can be usefull if people with permission want to use an iron axe on a survival server
UseOnlyServerMadeAxe: false

# Preferably an item and not a block but it shouldnt matter
AxeItemId: IRON_AXE

# Will be implemented so you can give yourself the portal block and build manually with it so its easier to make portals with the portal block.
CanBuildPortalBlock: true

# Defines if portals protect themselves
PortalProtection: true

# How many blocks around the portals will be protected from griefing or destruction
PortalProtectionRadius: 5

# What the default trigger block is for portals if nothing is defined.
DefaultPortalTriggerBlock: AIR

# This stops all water flowing inside a portal area(can be disabled if something like world edit is handelling the water flow or you dont want it active)
#    you want to 
StopWaterFlow: true

# This must be a placeable block or it will not work and may even crash
ShowSelectionBlockID: STAINED_GLASS
ShowSelectionBlockData: 14

# WarpEffect
# 0 = disabled(no particles)
# 1 = Eye of ender explode effect(loads of portal particles)
# adding more soon and may create some custom ones
WarpParticles: 0

# WarpSound generally suggested to keep the same as warpeffect but can usually be used for just the sound and no particle effects
# 0 = disabled(no sound)
# 1 = Enderman Warp Sound
# adding more soon
WarpSound: 0

# In case you want to show the bungee attempting warp message
ShowBungeeWarpMessage: false

# This changes how long the show seletion lasts in seconds

ShowSelectionShowDuration: 10

# If a player is riding a entity, warp the entity too?(unless its a bungee portal or any non teleporting portal)
WarpRiddenEntity: true


# Where to display the message 0 = disabled(replaces PortalWarpMessages), 1 = in chat and 2 = action bar(1.8 and above only, anything lower will print the message that would
#  generally on the action bar in the chat without a prefix or extra chat formatting)
WarpMessageDisplay: 0

# Use plugin name in the warp messages
UseWarpPrefix: false

# If this is true a custom prefix can be used, (not fully coded yet!!)

UseCustomPrefix: true

CustomPrefix: '&8[&6Portals&8]'

CustomPrefixFail: '&8[&6Portals&8]'

BlockSpectatorMode: false

PortalCooldown: 5 # How long after trying to enter a portal until the player can try to enter another. 0 or lower to deactivate.
ThrowbackAmount: 0.7 # How fast to throw them back, 0 or lower to disable throwback

# Letters are flags. Include them to activate. n always disables everything, remove if you want it to work.
# Lettering may not make too much sense but meh its useful. Examples are "ocpk" or "cop" (doesnt matter order)
#
# Remember enabling this means potentially admins could leave a portal lying around which could let them reop themselves.
# If you think this may be an issue use a permission plugin and specifically give the users you trust permissions.
#
# n Disabled none, best just put this to really make sure the fact none are here is specified. It disables any others too
# o Admin Heighten Enabled      Permission advancedportals.createportal.commandlevel.op
# p Perm Heighten Enabled    Permission advancedportals.createportal.commandlevel.perms
# c Console Heighten Enabled    Permission advancedportals.createportal.commandlevel.console
# h Ops can create admin commands without special perms
# e Ops can create all perm commands without special perms
# k Ops can create console commands without special perms
#
CommandLevels: hk
# 
#  ExamplePortal:
#    world: it will be the world name
#    triggerblock: LAVA # will only be used if the hastriggerblock is true and can be id or text
#    pos1: # dont mess with the data here, if you do it may stop the portal from working.
#      X:
#      Y:
#      Z:
#    pos2:
#      X:
#      Y:
#      Z:
#    destination:
#      issetpoint: true # if this was false point name would not be used and the coordinates would be saved here, it just adds more customisation.
#      pointname: examplepoint # if issetpoint is false this wont be here and tppos will be.
#      tppos:
#        X:
#        Y:
#        Z:


test:
  world: PvP
  triggerblock: AIR
  destination: leaping
  pos1:
    X: 59
    Y: 84
    Z: -38
  pos2:
    X: 55
    Y: 80
    Z: -38
healing:
  world: PvP
  triggerblock: AIR
  destination: strength
  pos1:
    X: 54
    Y: 84
    Z: 55
  pos2:
    X: 52
    Y: 82
    Z: 55
  portalArgs:
    command:
      '1': #effect @player strength 8
strength:
  world: PvP
  triggerblock: AIR
  destination: speed
  pos1:
    X: 12
    Y: 83
    Z: 20
  pos2:
    X: 12
    Y: 80
    Z: 14
  portalArgs:
    command: {}

am testing the "healing" portal right now.

commented

Which version are you using?

commented

Whoops, you forgot c to enable console command portals
CommandLevels: ochk

o and c enable the individual ones, h and k allow them to also be made by ops. I should really make it so they both enable it

commented

Also # is used for comments in yml files. you need the line to be

'1': '#effect @player strength 8'

or else the file reader sees it as

  portalArgs:
    command:
      '1':
commented

[Server] INFO ak521 issued server command: /#effect ak521 strength 8
using version 0.0.39
config: https://pastebin.com/LbcMT6LZ
portal: https://pastebin.com/AqxGxhcD
@sekwah41
:l

commented

Try with this version. I swear it was working the other day when I tried it

Advanced Portals.zip

commented

This works!
[Server] INFO Portal command: #effect ak521 strength 8
[Server] INFO Portal command: effect ak521 strength 8
[Server] INFO Given Strength (ID 5) * 0 to ak521 for 8 seconds
@sekwah41

commented

I need to remove the log into xD