mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
Load sample plugin for now
This commit is contained in:
parent
a799b1463b
commit
8274655360
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
/jarjar
|
||||||
|
/build
|
||||||
|
/build.xml
|
||||||
|
/manifest.mf
|
||||||
|
/nbproject
|
||||||
|
/dist
|
@ -40,6 +40,13 @@ public class MinecraftServer
|
|||||||
new cn(this);
|
new cn(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CraftBukkit: Decompiler might miss this method, your IDE won't complain but you
|
||||||
|
// can't run without it!
|
||||||
|
public static boolean a(MinecraftServer minecraftserver)
|
||||||
|
{
|
||||||
|
return minecraftserver.o;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean d() {
|
private boolean d() {
|
||||||
cl localcl = new cl(this);
|
cl localcl = new cl(this);
|
||||||
|
|
||||||
|
@ -1,16 +1,22 @@
|
|||||||
|
|
||||||
package org.bukkit.craftbukkit;
|
package org.bukkit.craftbukkit;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
import net.minecraft.server.*;
|
import net.minecraft.server.*;
|
||||||
|
import org.bukkit.plugin.InvalidPluginException;
|
||||||
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
import org.bukkit.plugin.java.JavaPluginLoader;
|
||||||
|
|
||||||
public class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
private final String serverName = "CraftBucket";
|
private final String serverName = "Craftbukkit";
|
||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
private final HashMap<String, Player> playerCache = new HashMap<String, Player>();
|
private final HashMap<String, Player> playerCache = new HashMap<String, Player>();
|
||||||
|
private final PluginManager pluginManager = new PluginManager(this);
|
||||||
|
|
||||||
protected final MinecraftServer console;
|
protected final MinecraftServer console;
|
||||||
protected final hl server;
|
protected final hl server;
|
||||||
@ -20,6 +26,16 @@ public class CraftServer implements Server {
|
|||||||
|
|
||||||
console = instance;
|
console = instance;
|
||||||
server = console.f;
|
server = console.f;
|
||||||
|
|
||||||
|
pluginManager.RegisterInterface(JavaPluginLoader.class);
|
||||||
|
|
||||||
|
try {
|
||||||
|
pluginManager.loadPlugin(new File("sample.jar"));
|
||||||
|
} catch (InvalidPluginException ex) {
|
||||||
|
Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, "(Did you extract the lib folder?)", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@ -48,4 +64,7 @@ public class CraftServer implements Server {
|
|||||||
return players;
|
return players;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PluginManager getPluginManager() {
|
||||||
|
return pluginManager;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user