Merge branch 'master' of git@github.com:headhunter45/Metropolis.git
Conflicts: Metropolis/src/main/java/com/majinnaibu/bukkitplugins/metropolis/MetropolisPlugin.java Metropolis/src/main/java/com/majinnaibu/bukkitplugins/metropolis/commands/MetropolisHomeMoveCommand.java Metropolis/src/main/resources/plugin.yml
This commit is contained in:
@@ -37,7 +37,6 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- WorldEdit -->
|
<!-- WorldEdit -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -64,7 +63,7 @@
|
|||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>majinnaibu-repository</id>
|
<id>majinnaibu-repository</id>
|
||||||
<url>ftp://www.majinnaibu.com/majinnaibu/repo</url>
|
<url>ftp://repo.majinnaibu.com</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.majinnaibu.bukkitplugins.metropolis.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.majinnaibu.bukkitplugins.metropolis.MetropolisPlugin;
|
||||||
|
|
||||||
|
public class MetropolisHomeAcquire implements CommandExecutor {
|
||||||
|
MetropolisPlugin _plugin;
|
||||||
|
|
||||||
|
public MetropolisHomeAcquire(MetropolisPlugin plugin){
|
||||||
|
_plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||||
|
if(!(sender instanceof Player)){
|
||||||
|
sender.sendMessage("This command can only be used by players");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = (Player) sender;
|
||||||
|
|
||||||
|
if(_plugin.getNumPlots(player.getName()) >= _plugin.getMaxPlots(player.getName())){
|
||||||
|
sender.sendMessage("You cannot have any more plots");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_plugin.assignPlot(player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,20 +3,47 @@ package com.majinnaibu.bukkitplugins.metropolis.commands;
|
|||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.majinnaibu.bukkitplugins.metropolis.MetropolisPlugin;
|
import com.majinnaibu.bukkitplugins.metropolis.MetropolisPlugin;
|
||||||
|
import com.majinnaibu.bukkitplugins.metropolis.Plot;
|
||||||
|
|
||||||
public class MetropolisPlotGoCommand implements CommandExecutor {
|
public class MetropolisPlotGoCommand implements CommandExecutor {
|
||||||
|
MetropolisPlugin _plugin;
|
||||||
|
|
||||||
public MetropolisPlotGoCommand(MetropolisPlugin metropolisPlugin) {
|
public MetropolisPlotGoCommand(MetropolisPlugin plugin) {
|
||||||
// TODO Auto-generated constructor stub
|
_plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender arg0, Command arg1, String arg2,
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||||
String[] arg3) {
|
Player player = null;
|
||||||
// TODO Auto-generated method stub
|
Plot plot = null;
|
||||||
return false;
|
|
||||||
|
if(sender instanceof Player){
|
||||||
|
player = (Player) sender;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(args.length == 1 && player != null){
|
||||||
|
plot = _plugin.getPlot(args[0]);
|
||||||
|
}else if(args.length >= 2){
|
||||||
|
player = _plugin.getPlayer(args[1]);
|
||||||
|
plot = _plugin.getPlot(args[0]);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(plot == null || player == null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String errorMessage = _plugin.teleportPlayerToPlot(player, plot);
|
||||||
|
if(errorMessage != null){
|
||||||
|
sender.sendMessage(errorMessage);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ public class MetropolisPlotReserveCommand implements CommandExecutor {
|
|||||||
|
|
||||||
public MetropolisPlotReserveCommand(MetropolisPlugin metropolisPlugin) {
|
public MetropolisPlotReserveCommand(MetropolisPlugin metropolisPlugin) {
|
||||||
_plugin = metropolisPlugin;
|
_plugin = metropolisPlugin;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plot:
|
plot:
|
||||||
sizeX: 24
|
sizeX: 32
|
||||||
sizeZ: 24
|
sizeY: 256
|
||||||
sizeZ: 32
|
sizeZ: 32
|
||||||
ovvsetX: 0
|
ovvsetX: 0
|
||||||
offsetY: 0
|
offsetY: 0
|
||||||
@@ -9,7 +9,7 @@ plot:
|
|||||||
maxPerPlayer: 1
|
maxPerPlayer: 1
|
||||||
initial: 1
|
initial: 1
|
||||||
floor:
|
floor:
|
||||||
generate: true
|
generate: true
|
||||||
clearSpaceAbove: 66
|
clearSpaceAbove: 66
|
||||||
material: 2
|
material: 2
|
||||||
supports:
|
supports:
|
||||||
|
|||||||
Reference in New Issue
Block a user