Coder Social home page Coder Social logo

frago9876543210 / easyforms Goto Github PK

View Code? Open in Web Editor NEW
59.0 12.0 16.0 113 KB

Plugin for pmmp that allow you create GUI in a few clicks.

License: GNU General Public License v3.0

PHP 100.00%
pmmp-plugin pmmp pocktemine pocketmine-plugins minecraft mcpe-plugin gui php7

easyforms's People

Contributors

artulloss avatar frago9876543210 avatar poggit-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easyforms's Issues

error

code:
public function sendInfo(ExonPlayer $player): void{
EasyForm::sendForm($player, new class(C::YELLOW . "---==>" . C::AQUA . $player->getName() . "'s Infomation" . C::YELLOW . "<==---", "", [
new Label(C::LIGHT_PURPLE . "Rank: " . C::GREEN . $player->getRank($player)),
new Label(C::LIGHT_PURPLE . "Title: " . C::GREEN . $player->getTitle($player)),
new Label(C::LIGHT_PURPLE . "Coins: " . C::GREEN . $player->getCoin($player))
]) extends CustomForm{
});
}

error:
Unhandled exception executing command 'info' in info: Argument 2 passed to form\forms\CustomForm::__construct() must be of the type array, string given, called in C:\Users\xxnic\OneDrive\Desktop\Server\plugins\ExonPECore-master\src\ExonCore\commands\InfoCommand.php on line 40
[16:27:53] [Server thread/CRITICAL]: TypeError: "Argument 2 passed to form\forms\CustomForm::__construct() must be of the type array, string given, called in C:\Users\xxnic\OneDrive\Desktop\Server\plugins\ExonPECore-master\src\ExonCore\commands\InfoCommand.php on line 40" (EXCEPTION) in "EasyForms-master/src/form/forms/CustomForm" at line 27

error

[Server thread/CRITICAL]: ErrorException: "Declaration of class@anonymous::onSubmit(CastiaCore\events\Player $player, $response): void should be compatible with Frago9876543210\EasyForms\forms\CustomForm::onSubmit(pocketmine\Player $player, $response): void" (EXCEPTION) in "CastiaCore/src/CastiaCore/events/EventListener" at line 133

Special Symbols missing

$a = 1111;
$b = 2222;
$c = 3333;
$d = 4444;
EasyForms::sendForm($player, new class("Test", "Test for me.\n\n" . 
        "Your Name : " . $a . "-" . $b . "-" . $c . "-" . $d . "\n\n" . 
        "If right Click [Y], or [N].\nSry for my bad eng.", "y", "n") extends ModalForm{
              public function onSubmit(Player $player, $response) : void{
                     if(!$response){
                        $player->sendMessage("§8[ §7§lAlert §r§8] §rThx.");
                        return;
                     }
                     $player->sendMessage("§8[ §7§lAlert §r§8] §rThx2"); 
              }
});

I expected the following.

Test for me.

Your Name : 1111-2222-3333-4444

If right Click [Y], or [N].
Sry for my bad eng.

But this is what we actually received.

Test for me.

Your Name

If right Click Y, or N.
Sry for my bad eng.

Where did the following characters disappear?

[ ] : -

sorry for my bad eng 👍

How to use?

Hello, I have some questions:

  1. in which file path do I have to save a new function?
  2. how can I trigger a function via command e.g. /warp and it opens a menu where I can select a warp
    Please give me a full example.

Crash when click Settings

Hey there,
this is the error after I clicked the Settings button dare to crash "Internal Server Error".

Here's the error
[12:10:49] [Server thread/CRITICAL]: Error: "Call to undefined method pocketmine\event\server\DataPacketReceiveEvent::getOrigin()" (EXCEPTION) in "plugins/EasyForms_v1.5.0/src/Frago9876543210/EasyForms/EasyForms" at line 47 [12:10:49] [Server thread/DEBUG]: #0 src/pocketmine/plugin/MethodEventExecutor(42): Frago9876543210\EasyForms\EasyForms->onDataPacketReceive(object pocketmine\event\server\DataPacketReceiveEvent) [12:10:49] [Server thread/DEBUG]: #1 src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object Frago9876543210\EasyForms\EasyForms, object pocketmine\event\server\DataPacketReceiveEvent) [12:10:49] [Server thread/DEBUG]: #2 src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\server\DataPacketReceiveEvent) [12:10:49] [Server thread/DEBUG]: #3 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(109): pocketmine\event\Event->call() [12:10:49] [Server thread/DEBUG]: #4 src/pocketmine/network/mcpe/protocol/BatchPacket(127): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\ServerSettingsRequestPacket) [12:10:49] [Server thread/DEBUG]: #5 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(110): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter) [12:10:49] [Server thread/DEBUG]: #6 src/pocketmine/Player(3096): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket) [12:10:49] [Server thread/DEBUG]: #7 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket) [12:10:49] [Server thread/DEBUG]: #8 vendor/pocketmine/raklib/src/server/ServerHandler(99): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[19] 192.168.0.103 42633, object raklib\protocol\EncapsulatedPacket, integer 0) [12:10:49] [Server thread/DEBUG]: #9 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket() [12:10:49] [Server thread/DEBUG]: #10 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process() [12:10:49] [Server thread/DEBUG]: #11 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}() [12:10:49] [Server thread/DEBUG]: #12 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications() [12:10:49] [Server thread/DEBUG]: #13 src/pocketmine/Server(2146): pocketmine\snooze\SleeperHandler->sleepUntil(double 1585656649.7095) [12:10:49] [Server thread/DEBUG]: #14 src/pocketmine/Server(1990): pocketmine\Server->tickProcessor() [12:10:49] [Server thread/DEBUG]: #15 src/pocketmine/Server(1584): pocketmine\Server->start() [12:10:49] [Server thread/DEBUG]: #16 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[34] /storage/emulated/0/PocketMine-MP/, string[42] /storage/emulated/0/PocketMine-MP/plugins/) [12:10:49] [Server thread/DEBUG]: #17 src/pocketmine/PocketMine(296): pocketmine\server() [12:10:49] [Server thread/DEBUG]: #18 (11): require(string[89] phar:///storage/emulated/0/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Pocke)

Need Improvements

How to send the response to a specified api for example i am creating a form for voting of candidates for minecraft government? and the users will vote for the election.

Custom settings API

how would I check to see if a player has perm to toggle on and off "fly" in custom settings

error

code:
public function sendInfo(ExonPlayer $player): void{
EasyForm::sendForm($player, new class(C::YELLOW . "---==>" . C::AQUA . $player->getName() . "'s Infomation" . C::YELLOW . "<==---", "", [
new Label(C::LIGHT_PURPLE . "Rank: " . C::GREEN . $player->getRank($player)),
new Label(C::LIGHT_PURPLE . "Title: " . C::GREEN . $player->getTitle($player)),
new Label(C::LIGHT_PURPLE . "Coins: " . C::GREEN . $player->getCoin($player))
]) extends CustomForm{
});
}

error:
Unhandled exception executing command 'info' in info: Argument 2 passed to form\forms\CustomForm::__construct() must be of the type array, string given, called in C:\Users\xxnic\OneDrive\Desktop\Server\plugins\ExonPECore-master\src\ExonCore\commands\InfoCommand.php on line 40
[16:27:53] [Server thread/CRITICAL]: TypeError: "Argument 2 passed to form\forms\CustomForm::__construct() must be of the type array, string given, called in C:\Users\xxnic\OneDrive\Desktop\Server\plugins\ExonPECore-master\src\ExonCore\commands\InfoCommand.php on line 40" (EXCEPTION) in "EasyForms-master/src/form/forms/CustomForm" at line 27

Изображения с сервера

Есть ли возможность подгружать иконки с сервера, а не по ссылке... Не знаю, с чем связано, но по ссылке что-то долго грузятся иконки

How to make multiple buttons in MenuForm?

Hi there,
I finally figured out how does it work.
I am confusing how to make multiple buttons in Menu Form.
It means "A" button will sendMessage("Hello") ; "B" button will sendMessage("Hi")

I know how to make "two" buttons.
but the two button are showing same message.

Does it possible to implement it?

Thanks a lot.

new class?

EasyForms::sendForm($sender, new class("A small question", "Our server is cool?") extends ModalForm{ public function onSubmit(Player $player, $response) : void{ $player->sendMessage($response ? "Thank you" : "We will try to become better"); } });
new class as my class name or what?

What class to call?

Heyo!

Just help others and myself understand on how to implement this could you add the classes that need to be called, does anything need to be registered, and does it work as a virion?

Thanks!

HELP ME

HOW DO I USE THAT IN MY PLUGINS?

Playars name in drop down

How do i add each player to drop down

        foreach(Ban::getInstance()->getServer()->getOnlinePlayers() as $online){
            $name .=   $online->getName();
        }
            EasyForms::sendForm($player, new class("Ban", [
                new Dropdown("Players", ["{$name}"],0),```

check if player has permission?

i made a MenuForm and i want to send green "Fly" if the player has permission and red if not.
but i cant add if statements

Optimize plugin if you want to be better!

Optimise this plugin if you want be better.

And don't use 10000 functions for a useless code. If you want do good things, re-make this plugin and make them better

Kiss frago <3

Null

Error: "Call to a member function get() on null" (EXCEPTION) in "PluginForms/src/Forms/API/EasyForms" at line 47

I moved this plugin into my plugin as library, but this error occured
what is the matter?

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.