Skip to content
Snippets Groups Projects
Commit ac7e95e8 authored by Zandor Smith's avatar Zandor Smith :computer:
Browse files

+ Main files.

parent 8797a5f2
No related branches found
No related tags found
No related merge requests found
pom.xml 0 → 100644
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zandor300</groupId>
<artifactId>InventoryLock</artifactId>
<version>1.8-1.0.0</version>
<name>InventoryLock</name>
<repositories>
<repository>
<id>MavenPi</id>
<url>http://play.zsinfo.nl/maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<type>jar</type>
<version>1.8-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<type>jar</type>
<version>1.8-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.zandor300</groupId>
<artifactId>ZSUtilities</artifactId>
<type>jar</type>
<version>1.8-1.0.4.3</version>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-alpha-6</version>
</extension>
</extensions>
</build>
<distributionManagement>
<repository>
<id>MavenPi-FTP</id>
<url>ftp://192.168.1.18/var/www/maven</url>
</repository>
</distributionManagement>
</project>
\ No newline at end of file
/**
* Copyright 2015 Zandor Smith
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.zandor300.inventorylock;
import com.zandor300.inventorylock.commands.InventoryLockCommand;
import com.zandor300.inventorylock.listener.PlayerListener;
import com.zandor300.zsutilities.commandsystem.CommandManager;
import com.zandor300.zsutilities.utilities.Chat;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.mcstats.Metrics;
import java.io.IOException;
import java.util.ArrayList;
/**
* @author Zandor Smith
* @since 1.0.0
*/
public class InventoryLock extends JavaPlugin {
private static Chat chat = new Chat("InventoryLock", ChatColor.RED);
private static InventoryLock plugin;
private static ArrayList<Integer> lockedSlots = new ArrayList<Integer>();
public static Chat getChat() {
return chat;
}
public static InventoryLock getPlugin() {
return plugin;
}
public static ArrayList<Integer> getLockedSlots() {
return lockedSlots;
}
@Override
public void onEnable() {
chat.sendConsoleMessage("Setting things up...");
saveDefaultConfig();
this.getConfig().options().copyDefaults(true);
plugin = this;
PluginManager pm = Bukkit.getPluginManager();
chat.sendConsoleMessage("Sending metrics...");
try {
new Metrics(this).start();
chat.sendConsoleMessage("Submitted stats to MCStats.org.");
} catch (IOException e) {
chat.sendConsoleMessage("Couldn't submit stats to MCStats.org...");
}
chat.sendConsoleMessage("Getting locked slots...");
for(Object locked : this.getConfig().getList("locked"))
lockedSlots.add(Integer.valueOf(locked.toString()));
chat.sendConsoleMessage("Saved locked slots.");
chat.sendConsoleMessage("Registering events...");
pm.registerEvents(new PlayerListener(), this);
chat.sendConsoleMessage("Registered events.");
CommandManager cm = new CommandManager();
cm.registerCommand(new InventoryLockCommand(), this);
chat.sendConsoleMessage("Everything is setup!");
chat.sendConsoleMessage("Enabled.");
}
}
/**
* Copyright 2015 Zandor Smith
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.zandor300.inventorylock.commands;
import com.zandor300.inventorylock.InventoryLock;
import com.zandor300.zsutilities.commandsystem.Command;
import org.bukkit.command.CommandSender;
/**
* @author Zandor Smith
* @since 1.0.0
*/
public class InventoryLockCommand extends Command {
public InventoryLockCommand() {
super("inventorylock", "Get info.");
}
@Override
public void execute(CommandSender sender, String[] strings) {
InventoryLock.getChat().sendMessage(sender, "InventoryLock 1.0.0 by Zandor300");
}
}
/**
* Copyright 2015 Zandor Smith
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.zandor300.inventorylock.listener;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
/**
* @author Zandor Smith
* @since 1.0.0
*/
public class PlayerListener implements Listener {
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
}
}
locked:
- 0
- 1
- 2
- 36
- 37
- 38
- 39
\ No newline at end of file
name: InventoryLock
main: com.zandor300.inventorylock.InventoryLock
version: 1.0.0
author: Zandor300
depend: [ZSUtilities]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment