mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 14:28:46 +00:00
downupgrade to java 7...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
6a12579834
commit
5231073a18
12
.classpath
12
.classpath
@ -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>
|
||||||
|
4
pom.xml
4
pom.xml
@ -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>
|
||||||
|
@ -34,12 +34,15 @@ 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() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
YumManager.install(sender, pluginname);
|
YumManager.install(sender, pluginname);
|
||||||
} else {
|
} else {
|
||||||
YumManager.install(sender, pluginname, args[1]);
|
YumManager.install(sender, pluginname, args[1]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage("§c插件已安装在服务器 需要更新请使用yum update " + pluginname + "!");
|
sender.sendMessage("§c插件已安装在服务器 需要更新请使用yum update " + pluginname + "!");
|
||||||
|
@ -33,12 +33,15 @@ 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() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
YumManager.update(sender, plugin);
|
YumManager.update(sender, plugin);
|
||||||
} else {
|
} else {
|
||||||
YumManager.update(sender, plugin, args[1]);
|
YumManager.update(sender, plugin, args[1]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
|
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
|
||||||
|
@ -28,7 +28,9 @@ 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() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
YumManager.plugman.upgrade(sender);
|
YumManager.plugman.upgrade(sender);
|
||||||
} else {
|
} else {
|
||||||
@ -41,6 +43,7 @@ public class CommandUpgrade extends BaseCommand {
|
|||||||
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
|
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user