Code Monkey home page Code Monkey logo

inputexecutor's Introduction

What is it?

InputExecutor is a simple and lightweight plugin which has a unique way of asking player input using a AnvilGUI.
The input can then be used to execute a server command.

Example:

Take for example the /shop search [filter] command from EconomyShopGUI-Premium.
There would be multiple ways of letting players know about this command:

  • Either by simply telling players "Use command /shop search [filter] to search items"
  • OR by creating a simple input-request and linking it to an NPC:


Using the latter method it is easier for the player.
They do not have to remember the command nor the arguments, they just click the NPC and the rest will follow thru the input-request.

How to use?

We will take the example from above into place.
The full command of the NPC above is input player:<p> request:'§9§lEnter search filter' command:'p:shop search %input%', lets take a closer look at the command arguments.

  • player:<p> - This will open the input-request for the given player. In this case it will be the player clicking the NPC.
  • request:'§9§lEnter search filter' - The question to ask the player
  • command:'p:shop search %input%' - The command executed as the console when the player enters the input.
    • You may use the following placeholders:
      • %input% - Replaced with the input the player has entered inside the AnvilGUI
      • %player% - Replaced with the player name which has entered the input
    • Aditionally you can start the command with p: to execute the command as the player instead of console.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.