Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

Rewrite NPC Plugin #21

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
name: NPC
author: alvin0319
main: alvin0319\NPC\NPCPlugin
version: 1.0.10
main: alvin0319\NPC\NPCLoader
version: 2.0.0
api: 3.0.0

mcpe-protocol: 408

commands:
npc:
description: NPC command.
permission: npc.command

permissions:
npc.command:
default: op
description: Allow to control command npc.
mcpe-protocol: 408
9 changes: 0 additions & 9 deletions resources/config.yml

This file was deleted.

22 changes: 0 additions & 22 deletions resources/eng.yml

This file was deleted.

22 changes: 0 additions & 22 deletions resources/kor.yml

This file was deleted.

123 changes: 0 additions & 123 deletions src/alvin0319/NPC/EventListener.php

This file was deleted.

31 changes: 31 additions & 0 deletions src/alvin0319/NPC/NPCLoader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);

namespace alvin0319\NPC;

use pocketmine\plugin\PluginBase;

class NPCLoader extends PluginBase{
/** @var NPCLoader */
private static $instance;

public function onLoad() : void{
self::$instance = $this;
}

public function onEnable() : void{
}

public function onDisable() : void{
self::$instance = null;
}

private function findGeometryName(array $decodedJsonData) : ?string{
if(isset($decodedJsonData["geometryName"])){
return $decodedJsonData["geometryName"];
}
if(isset($decodedJsonData["minecraft:geometry"][0]["description"]["identifier"]))
return $decodedJsonData["minecraft:geometry"][0]["description"]["identifier"];
return null;
}
}
Loading