downupgrade to java 7...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-09-26 22:58:00 +08:00
parent 6a12579834
commit 5231073a18
5 changed files with 42 additions and 23 deletions

View File

@ -16,6 +16,16 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -19,8 +19,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>

View File

@ -34,11 +34,14 @@ public class CommandInstall extends BaseCommand {
final String pluginname = args[0];
final Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname);
if (plugin == null) {
Bukkit.getScheduler().runTaskAsynchronously(main, () -> {
if (args.length < 2) {
YumManager.install(sender, pluginname);
} else {
YumManager.install(sender, pluginname, args[1]);
Bukkit.getScheduler().runTaskAsynchronously(main, new Runnable() {
@Override
public void run() {
if (args.length < 2) {
YumManager.install(sender, pluginname);
} else {
YumManager.install(sender, pluginname, args[1]);
}
}
});
} else {

View File

@ -33,11 +33,14 @@ public class CommandUpdate extends BaseCommand {
final Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname);
sender.sendMessage("§a开始更新插件: " + pluginname);
if (plugin != null) {
Bukkit.getScheduler().runTaskAsynchronously(main, () -> {
if (args.length < 2) {
YumManager.update(sender, plugin);
} else {
YumManager.update(sender, plugin, args[1]);
Bukkit.getScheduler().runTaskAsynchronously(main, new Runnable() {
@Override
public void run() {
if (args.length < 2) {
YumManager.update(sender, plugin);
} else {
YumManager.update(sender, plugin, args[1]);
}
}
});
} else {

View File

@ -28,17 +28,20 @@ public class CommandUpgrade extends BaseCommand {
@Override
public void execute(final CommandSender sender, final String label, final String[] args) throws CommandException {
Bukkit.getScheduler().runTaskAsynchronously(main, () -> {
if (args.length == 0) {
YumManager.plugman.upgrade(sender);
} else {
final String pluginname = args[0];
final Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname);
sender.sendMessage("§a开始升级插件: " + pluginname);
if (plugin != null) {
YumManager.plugman.upgrade(sender, plugin);
Bukkit.getScheduler().runTaskAsynchronously(main, new Runnable() {
@Override
public void run() {
if (args.length == 0) {
YumManager.plugman.upgrade(sender);
} else {
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
final String pluginname = args[0];
final Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname);
sender.sendMessage("§a开始升级插件: " + pluginname);
if (plugin != null) {
YumManager.plugman.upgrade(sender, plugin);
} else {
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
}
}
}
});