This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div v-for="(parent, id) in form.text" :key="id"> | |
<template if="parent.type === 'item'"> | |
<div class="card mt-5"> | |
<div class="card-body pt-0"> | |
<div class="row"> | |
<div class="col-sm-6"> | |
<div class="form-group"> | |
<input class="form-control" placeholder="Name" v-model="parent.name"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function onBlockPlaceEvent(BlockPlaceEvent $event) | |
{ | |
$event->getBlock()->setMetadata("test", new ProtectMeta($this->plugin)); | |
} | |
public function onBlockBreakEvent(BlockBreakEvent $event) | |
{ | |
if ($event->getBlock()->hasMetadata("test")) { | |
$event->getPlayer()->sendMessage("BlockBreak"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace ProtectHub; | |
use pocketmine\metadata\MetadataValue; | |
class ProtectMeta extends MetadataValue | |
{ | |
public function __construct(Plugin $owningPlugin) |