Welcome, I need to solve the problem you make a mini game and you make a counter to start playing onBlockPlace and onBlockBreak $ event-> setCancelled (true) I want to work after missing the end of time is thus $ event-> setCancelled () I'm not good in English
Ok, you should have a timer, the when you cancel an Event is because it was triggered, it's like when you press a button, it does something, and to make it do that thing again, you need to press it again... Events are called when a certain action is triggered, so you can use an if/else switch according to the timer: (Supposing that the timer is reverse-counting 30 seconds and the game start when the timer finishes.... PHP: $timer = 30//Code that manages the timerif ($times > 0) { $event->setCancelled(true);} What will this do? it will only block the Event (Do not let that action, that now it's a block break) if the Timer haven't finished (the game haven't started) I'm trying to be as explanatory as possible, if you need more help, feel free to ask me again
Oh BTW: if you want to see those things on action, checkout my work on Github: https://github.com/LegendOfMCPE/EssentialsPE/blob/master/src/EssentialsPE/Events/EventHandler.php
I mean, if you can't even make use of such a detailed tutorial post made by @iksaku, how could you even make a plugin?
What is novice? And if you don't know how to code, just request the plugin. This forum is to help you with the API, not to make you plugins. If you just want the plugins, go to the requests forum.