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"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </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"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

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

View File

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

View File

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

View File

@ -28,17 +28,20 @@ public class CommandUpgrade extends BaseCommand {
@Override @Override
public void execute(final CommandSender sender, final String label, final String[] args) throws CommandException { public void execute(final CommandSender sender, final String label, final String[] args) throws CommandException {
Bukkit.getScheduler().runTaskAsynchronously(main, () -> { Bukkit.getScheduler().runTaskAsynchronously(main, new Runnable() {
if (args.length == 0) { @Override
YumManager.plugman.upgrade(sender); public void run() {
} else { if (args.length == 0) {
final String pluginname = args[0]; YumManager.plugman.upgrade(sender);
final Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname);
sender.sendMessage("§a开始升级插件: " + pluginname);
if (plugin != null) {
YumManager.plugman.upgrade(sender, plugin);
} else { } 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 + "!");
}
} }
} }
}); });