Initial commit
This commit is contained in:
3
Plugins/Old/Essentials/.idea/.gitignore
generated
vendored
Normal file
3
Plugins/Old/Essentials/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
8
Plugins/Old/Essentials/.idea/artifacts/Essentials.xml
generated
Normal file
8
Plugins/Old/Essentials/.idea/artifacts/Essentials.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="Essentials">
|
||||
<output-path>$USER_HOME$/Downloads/Exports</output-path>
|
||||
<root id="archive" name="Essentials.jar">
|
||||
<element id="module-output" name="Essentials" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
||||
11
Plugins/Old/Essentials/.idea/libraries/spigot_1_15_2.xml
generated
Normal file
11
Plugins/Old/Essentials/.idea/libraries/spigot_1_15_2.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="spigot-1.15.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../Spigot Versions/spigot-1.15.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../Spigot Versions/spigot-1.15.2.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
6
Plugins/Old/Essentials/.idea/misc.xml
generated
Normal file
6
Plugins/Old/Essentials/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
Plugins/Old/Essentials/.idea/modules.xml
generated
Normal file
8
Plugins/Old/Essentials/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Essentials.iml" filepath="$PROJECT_DIR$/Essentials.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
13
Plugins/Old/Essentials/Essentials.iml
Normal file
13
Plugins/Old/Essentials/Essentials.iml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Spigot Versions" level="project" />
|
||||
<orderEntry type="library" name="spigot-1.15.2" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
name: Essentials
|
||||
api-version: 1.15
|
||||
version: 1.15.2
|
||||
main: de.craftix.essentials.general.Main
|
||||
|
||||
commands:
|
||||
ec:
|
||||
invsee:
|
||||
@@ -0,0 +1,27 @@
|
||||
package de.craftix.essentials.commands;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class EcCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String s, String[] args) {
|
||||
|
||||
if (sender instanceof Player){
|
||||
if (!sender.hasPermission("essentials.ec")) return true;
|
||||
Player p = (Player)sender;
|
||||
if (args.length == 0){
|
||||
p.openInventory(p.getEnderChest());
|
||||
}else if (args.length == 1){
|
||||
Player t = Bukkit.getPlayer(args[0]);
|
||||
if (t == null) return true;
|
||||
p.openInventory(t.getEnderChest());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package de.craftix.essentials.commands;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class InvseeCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String s, String[] args) {
|
||||
|
||||
if (sender instanceof Player){
|
||||
if (!sender.hasPermission("essentials.invsee")) return true;
|
||||
Player p = (Player)sender;
|
||||
if (args.length == 1){
|
||||
Player t = Bukkit.getPlayer(args[0]);
|
||||
if (t == null) return true;
|
||||
if (t.getName().equals(p.getName())) return true;
|
||||
p.openInventory(t.getInventory());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package de.craftix.essentials.general;
|
||||
|
||||
import de.craftix.essentials.commands.EcCommand;
|
||||
import de.craftix.essentials.commands.InvseeCommand;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
getCommand("ec").setExecutor(new EcCommand());
|
||||
getCommand("invsee").setExecutor(new InvseeCommand());
|
||||
}
|
||||
}
|
||||
8
Plugins/Old/Essentials/src/plugin.yml
Normal file
8
Plugins/Old/Essentials/src/plugin.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
name: Essentials
|
||||
api-version: 1.15
|
||||
version: 1.15.2
|
||||
main: de.craftix.essentials.general.Main
|
||||
|
||||
commands:
|
||||
ec:
|
||||
invsee:
|
||||
Reference in New Issue
Block a user