Uploaded image for project: 'SpigotPlugins'
  1. SpigotPlugins
  2. PLUG-457

A Problem Of Console Command

XMLWordPrintable

    • 1.16.5
    • ClickRailSpawnCar -By me
    • Yes

      Hello there. I have a problem about Command.

      We all know that

      Player player = event.getPlayer();
      player.perforcommand(“summon ~ ~ ~ minecraft:sth”); 
      

      If Player has no OP
      It will be unworkable
      But how do we get the console to use commands instead of players?
      It seems unworkable
      Beacuse I tried

      Player console = (Player)Bukkit.getServer().getConsoleSender();
      Player console = (Player)Bukkit.getServer();
      

      It can build successful but it's unworked at game.
      I need your help please
      Beacuse I have to go to school tomorrow
      I need solve it at once

            Unassigned Unassigned
            X_huihui X_huihui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: