First commit
This commit is contained in:
commit
0c4601070f
11
.classpath
Normal file
11
.classpath
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-10">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Spigot API"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/bin/
|
17
.project
Normal file
17
.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>MarwCore</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
17
Export to JAR.jardesc
Normal file
17
Export to JAR.jardesc
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<jardesc>
|
||||
<jar path="/home/erik/Dokumenty/Java/marwland/build/Untitled.jar"/>
|
||||
<options buildIfNeeded="true" compress="true" descriptionLocation="/MarwCore/Export to JAR.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
||||
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
||||
<selectedProjects/>
|
||||
<manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
|
||||
<sealing sealJar="false">
|
||||
<packagesToSeal/>
|
||||
<packagesToUnSeal/>
|
||||
</sealing>
|
||||
</manifest>
|
||||
<selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
|
||||
<file path="/MarwCore/plugin.yml"/>
|
||||
<javaElement handleIdentifier="=MarwCore/src"/>
|
||||
</selectedElements>
|
||||
</jardesc>
|
8
plugin.yml
Normal file
8
plugin.yml
Normal file
@ -0,0 +1,8 @@
|
||||
name: MarwCore
|
||||
main: cz.marwland.mc.core.MarwCore
|
||||
version: 1.0
|
||||
api-version: 1.12
|
||||
commands:
|
||||
first:
|
||||
description: First command.
|
||||
usage: /first
|
19
src/cz/marwland/mc/core/EventListener.java
Normal file
19
src/cz/marwland/mc/core/EventListener.java
Normal file
@ -0,0 +1,19 @@
|
||||
package cz.marwland.mc.core;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerLoginEvent;
|
||||
|
||||
public class EventListener implements Listener {
|
||||
private final MarwCore plugin;
|
||||
|
||||
public EventListener(MarwCore plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void normalLogin(PlayerLoginEvent event) {
|
||||
plugin.getServer().broadcastMessage("Welcome " + event.getPlayer().getDisplayName() + "!");
|
||||
}
|
||||
|
||||
}
|
19
src/cz/marwland/mc/core/MarwCore.java
Normal file
19
src/cz/marwland/mc/core/MarwCore.java
Normal file
@ -0,0 +1,19 @@
|
||||
package cz.marwland.mc.core;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import cz.marwland.mc.core.cmd.First;
|
||||
|
||||
public class MarwCore extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
getCommand("first").setExecutor(new First(this));
|
||||
getServer().getPluginManager().registerEvents(new EventListener(this), this);
|
||||
getLogger().info("Enabled!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
}
|
||||
}
|
22
src/cz/marwland/mc/core/cmd/First.java
Normal file
22
src/cz/marwland/mc/core/cmd/First.java
Normal file
@ -0,0 +1,22 @@
|
||||
package cz.marwland.mc.core.cmd;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import cz.marwland.mc.core.MarwCore;
|
||||
|
||||
public class First implements CommandExecutor {
|
||||
private final MarwCore plugin;
|
||||
|
||||
public First(MarwCore plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
plugin.getLogger().info("Hello?");
|
||||
sender.sendMessage("henlo");
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user