Skip to content
This repository was archived by the owner on Aug 9, 2018. It is now read-only.

Commit ab17c96

Browse files
committed
Created ExamplePlugin
1 parent 538e448 commit ab17c96

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

plugin.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: ExamplePlugin
2+
author: AndreTheGamer
3+
description: Sends message to player
4+
main: SamplePlugin\Main
5+
version: 1..0.0
6+
api: 1.0.0

src/ExamplePlugin/Main.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace ExamplePlugin;
4+
5+
use BukkitPE\plugin\PluginBase;
6+
use BukkitPE\event\Listener;
7+
use BukkitPE\event\player\PlayerJoinEvent;
8+
9+
class Main extends PluginBase implements Listener{
10+
11+
public function onEnable() {
12+
$this->getServer()->getPluginManager()->registerEvents($this, $this);
13+
}
14+
15+
public function onJoin(PlayerJoinEvent $event){
16+
17+
$event->getPlayer()->sendMessage("Welcome to my server");
18+
}
19+
}

0 commit comments

Comments
 (0)