Browse Source

Uploaded source

master
Jens F. 3 years ago
commit
3e38749f54
4 changed files with 75 additions and 0 deletions
  1. +5
    -0
      .gitignore
  2. +3
    -0
      manifest.mf
  3. +39
    -0
      src/com/ancient/TestAddon.java
  4. +28
    -0
      src/com/ancient/TestCommand.java

+ 5
- 0
.gitignore View File

@@ -0,0 +1,5 @@
/build/
/dist/
/nbproject/
/test/
/build.xml

+ 3
- 0
manifest.mf View File

@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build


+ 39
- 0
src/com/ancient/TestAddon.java View File

@@ -0,0 +1,39 @@
package com.ancient;

import com.ancient.Addons.AddonInfo;
import com.ancient.Addons.AncientAddon;
import com.ancient.Commands.AncientCommand;

@AddonInfo
(
name = "Testaddon",
id = "testaddon",
author = "M4taiori",
description = "A simple test-addon.",
version = "1.0.0",
versionUrl = "https://server.m4taiori.de/test",
downloadUrl = "https://cloud.m4taiori.de/index.php/s/CPXPtPgKNccfgzC/download"
)
public class TestAddon implements AncientAddon
{

private static TestAddon Instance;
@Override
public void OnEnable() {
Instance = this;
System.out.println( ConsolePrefix + "SPOINK!");
AncientCommand.registerModule( "testaddon", new TestCommand() );
}

@Override
public void OnDisable() {
System.out.println( ConsolePrefix + "SPOINKED!");
}
public static TestAddon getInstance()
{
return Instance;
}
}

+ 28
- 0
src/com/ancient/TestCommand.java View File

@@ -0,0 +1,28 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ancient;

import com.ancient.Commands.CommandModule;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

/**
*
* @author Jens F. | https://m4taiori.de
*/
public class TestCommand implements CommandModule
{

@Override
public boolean onCommand(Player player, Command cmnd, String[] strings)
{
player.sendMessage( TestAddon.ChatPrefix + "§2Test succedded!" );
return true;
}
}

Loading…
Cancel
Save