mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-22 11:59:42 +00:00
3.3.5
This commit is contained in:
1 parent
f6f3721e08
commit
93090e9aa6
63 files changed
+167
-133
No files matched your search
@@ -113,6 +113,7 @@ Forge/Fabric/NeoForge类服务器
|
||||
3.3.0:删除登录接口改用cookie
|
||||
3.3.1:修复控制台权限
|
||||
3.3.2:修复folia卡死问题
|
||||
3.3.5:修复tab补全出现的问题
|
||||
```
|
||||
|
||||
## 配置文件说明
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
public abstract class ACommand implements ICommand {
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ public class CommandBan extends ACommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index || (args.length == index + 1 && args[index].isEmpty())) {
|
||||
List<String> list = new ArrayList<>();
|
||||
if (PlayMusic.nowPlayMusic != null) {
|
||||
|
||||
@@ -18,7 +18,7 @@ public class CommandBanPlayer implements ICommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index || (args.length == index + 1 && args[index].isEmpty())) {
|
||||
return AllMusic.side.getPlayerList();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CommandCancel implements ICommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == 1 || (args.length == 2 && args[1].isEmpty())) {
|
||||
List<String> list = new ArrayList<>();
|
||||
List<SongInfoObj> list1 = PlayMusic.getList();
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CommandDelete extends ACommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == 1 || (args.length == 2 && args[1].isEmpty())) {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (int a = 0; a < PlayMusic.getListSize(); a++) {
|
||||
|
||||
+11
-12
@@ -26,6 +26,7 @@ public class CommandEX {
|
||||
this.add("hud");
|
||||
this.add("push");
|
||||
}};
|
||||
|
||||
/**
|
||||
* 管理员的指令
|
||||
*/
|
||||
@@ -153,12 +154,11 @@ public class CommandEX {
|
||||
if (args[0].contains("id=") && !args[0].contains("/?userid")) {
|
||||
if (args[0].contains("&uct2")) {
|
||||
musicID = Function.getString(args[0], "id=", "&uct2");
|
||||
}
|
||||
else if (args[0].contains("&user"))
|
||||
} else if (args[0].contains("&user"))
|
||||
musicID = Function.getString(args[0], "id=", "&user");
|
||||
else
|
||||
musicID = Function.getString(args[0], "id=", null);
|
||||
} else if (args[0].contains("song/")) {
|
||||
} else if (args[0].contains("song/")) {
|
||||
if (args[0].contains("/?userid"))
|
||||
musicID = Function.getString(args[0], "song/", "/?userid");
|
||||
else
|
||||
@@ -206,14 +206,13 @@ public class CommandEX {
|
||||
AllMusic.side.sendMessage(sender, AllMusic.getMessage().addMusic.noID);
|
||||
}
|
||||
|
||||
private static boolean isAdmin(String name)
|
||||
{
|
||||
private static boolean isAdmin(String name) {
|
||||
for (String item : AllMusic.getConfig().adminList) {
|
||||
if (item.equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,11 +262,11 @@ public class CommandEX {
|
||||
* @param arg 参数
|
||||
* @return 指令列表
|
||||
*/
|
||||
public static List<String> getTabList(String name, String[] arg) {
|
||||
public static List<String> getTabList(Object sender, String name, String[] arg) {
|
||||
List<String> arguments = new ArrayList<>();
|
||||
if (arg.length == 0) {
|
||||
arguments.addAll(normal);
|
||||
if (AllMusic.side.checkPermission(name)) {
|
||||
if (AllMusic.side.checkPermission(sender)) {
|
||||
arguments.addAll(admin);
|
||||
}
|
||||
if (AllMusic.getSearch(name) != null) {
|
||||
@@ -276,7 +275,7 @@ public class CommandEX {
|
||||
} else {
|
||||
if (arg[0] == null || arg[0].isEmpty() || arg.length == 1) {
|
||||
arguments.addAll(normal);
|
||||
if (AllMusic.side.checkPermission(name)) {
|
||||
if (AllMusic.side.checkPermission(sender)) {
|
||||
arguments.addAll(admin);
|
||||
}
|
||||
if (arg[0] == null || arg[0].isEmpty()) {
|
||||
@@ -287,12 +286,12 @@ public class CommandEX {
|
||||
} else {
|
||||
ICommand command = CommandEX.commandList.get(arg[0]);
|
||||
if (command != null) {
|
||||
arguments.addAll(command.tab(name, arg, 1));
|
||||
arguments.addAll(command.tab(sender, name, arg, 1));
|
||||
}
|
||||
if (AllMusic.side.checkPermission(name)) {
|
||||
if (AllMusic.side.checkPermission(sender)) {
|
||||
command = CommandEX.commandAdminList.get(arg[0]);
|
||||
if (command != null) {
|
||||
arguments.addAll(command.tab(name, arg, 1));
|
||||
arguments.addAll(command.tab(sender, name, arg, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ public class CommandHud extends ACommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index + 1) {
|
||||
return hudlist;
|
||||
} else {
|
||||
ICommand command = commandList.get(args[index]);
|
||||
if (command != null) {
|
||||
return command.tab(name, args, index + 1);
|
||||
return command.tab(player, name, args, index + 1);
|
||||
}
|
||||
}
|
||||
return Collections.emptyList();
|
||||
@@ -76,7 +76,7 @@ public class CommandHud extends ACommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index + 1) {
|
||||
return tf;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class CommandHudSet extends AHudCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index + 1) {
|
||||
List<String> list = new ArrayList<>(hud);
|
||||
if (type == HudType.PIC) {
|
||||
@@ -78,7 +78,7 @@ public class CommandHudSet extends AHudCommand {
|
||||
} else {
|
||||
ICommand command = commandList.get(args[index]);
|
||||
if (command != null) {
|
||||
return command.tab(name, args, index + 1);
|
||||
return command.tab(player, name, args, index + 1);
|
||||
}
|
||||
}
|
||||
return Collections.emptyList();
|
||||
@@ -104,7 +104,7 @@ public class CommandHudSet extends AHudCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index + 1) {
|
||||
return tf;
|
||||
}
|
||||
@@ -181,7 +181,7 @@ public class CommandHudSet extends AHudCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index + 1) {
|
||||
return dir;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ public class CommandHudSet extends AHudCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index + 1) {
|
||||
return tf;
|
||||
}
|
||||
@@ -263,7 +263,7 @@ public class CommandHudSet extends AHudCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index + 1) {
|
||||
return tf;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class CommandPush extends ACommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == 1 || (args.length == 2 && args[1].isEmpty())) {
|
||||
List<String> list = new ArrayList<>();
|
||||
List<SongInfoObj> list1 = PlayMusic.getList();
|
||||
|
||||
@@ -38,7 +38,7 @@ public class CommandSelect extends ACommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(String name, String[] args, int index) {
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == 1 || (args.length == 2 && args[1].isEmpty())) {
|
||||
List<String> list = new ArrayList<>();
|
||||
SearchPageObj obj = AllMusic.getSearch(name);
|
||||
|
||||
@@ -6,5 +6,5 @@ public interface ICommand {
|
||||
|
||||
void execute(Object sender, String name, String[] args);
|
||||
|
||||
List<String> tab(String name, String[] args, int index);
|
||||
List<String> tab(Object sender, String name, String[] args, int index);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
// id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -61,11 +61,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 8
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 1.8
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 1.8
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
ServerCommandSource item = context.getSource();
|
||||
|
||||
String input = context.getInput();
|
||||
String[] temp = input.split(" ");
|
||||
String[] arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
// id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -61,11 +61,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 17
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 17
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
@@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.18.2
|
||||
yarn_mappings=1.18.2+build.4
|
||||
loader_version=0.15.11
|
||||
loader_version=0.16.10
|
||||
fabric_kotlin_version=1.10.19+kotlin.1.9.23
|
||||
|
||||
# Mod Properties
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
// id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -61,11 +61,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 17
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 17
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
@@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.19.2
|
||||
yarn_mappings=1.19.2+build.28
|
||||
loader_version=0.15.11
|
||||
loader_version=0.16.10
|
||||
fabric_kotlin_version=1.10.19+kotlin.1.9.23
|
||||
|
||||
# Mod Properties
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
// id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -61,11 +61,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 17
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 17
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
@@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.19.3
|
||||
yarn_mappings=1.19.3+build.5
|
||||
loader_version=0.15.11
|
||||
loader_version=0.16.10
|
||||
fabric_kotlin_version=1.10.19+kotlin.1.9.23
|
||||
|
||||
# Mod Properties
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
// id "org.jetbrains.kotlin.jvm" version "1.9.+"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -61,11 +61,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 17
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 17
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
@@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.20.1
|
||||
yarn_mappings=1.20.1+build.10
|
||||
loader_version=0.15.11
|
||||
loader_version=0.16.10
|
||||
fabric_kotlin_version=1.10.19+kotlin.1.9.23
|
||||
|
||||
# Mod Properties
|
||||
@@ -14,4 +14,4 @@ maven_group = com.coloryr.allmusic.server
|
||||
archives_base_name =[fabric-1.20]AllMusic_Server
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.92.1+1.20.1
|
||||
fabric_version=0.92.3+1.20.1
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.8-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
// id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -61,11 +61,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 17
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 17
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
@@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.20.2
|
||||
yarn_mappings=1.20.2+build.4
|
||||
loader_version=0.15.11
|
||||
loader_version=0.16.10
|
||||
fabric_kotlin_version=1.10.19+kotlin.1.9.23
|
||||
|
||||
# Mod Properties
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.8-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
// id "org.jetbrains.kotlin.jvm" version "1.9.23"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -61,11 +61,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 17
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 17
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
@@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.20.6
|
||||
yarn_mappings=1.20.6+build.1
|
||||
loader_version=0.15.11
|
||||
loader_version=0.16.10
|
||||
fabric_kotlin_version=1.10.19+kotlin.1.9.23
|
||||
|
||||
# Mod Properties
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.8-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "2.0.0"
|
||||
// id "org.jetbrains.kotlin.jvm" version "2.0.0"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -56,11 +56,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 21
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 21
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 21
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
@@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.21
|
||||
yarn_mappings=1.21+build.1
|
||||
loader_version=0.15.11
|
||||
loader_version=0.16.10
|
||||
fabric_kotlin_version=1.11.0+kotlin.2.0.0
|
||||
|
||||
# Mod Properties
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.9-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "org.jetbrains.kotlin.jvm" version "2.1.0"
|
||||
// id "org.jetbrains.kotlin.jvm" version "2.1.0"
|
||||
}
|
||||
|
||||
def getVersionFromFile() {
|
||||
@@ -56,11 +56,11 @@ tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 21
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = 21
|
||||
}
|
||||
}
|
||||
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = 21
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -22,7 +22,7 @@ public class CommandFolia implements CommandExecutor, TabExecutor {
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
if (command.getName().equalsIgnoreCase("music")) {
|
||||
return CommandEX.getTabList(sender.getName(), args);
|
||||
return CommandEX.getTabList(sender, sender.getName(), args);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class CommandForge extends CommandBase {
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos targetPos) {
|
||||
return CommandEX.getTabList(sender.getName(), args);
|
||||
return CommandEX.getTabList(sender, sender.getName(), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,6 +45,8 @@ public class CommandForge implements Command<CommandSource>, Predicate<CommandSo
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSource> context, SuggestionsBuilder builder) {
|
||||
CommandSource source = context.getSource();
|
||||
|
||||
String input = context.getInput();
|
||||
String[] temp = input.split(" ");
|
||||
String[] arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandForge implements Command<CommandSource>, Predicate<CommandSo
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(source, source.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -45,6 +45,8 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -45,6 +45,8 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -45,6 +45,8 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -25,7 +25,7 @@ public class CommandForge extends CommandBase {
|
||||
|
||||
@Override
|
||||
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args) {
|
||||
return CommandEX.getTabList(sender.getCommandSenderName(), args);
|
||||
return CommandEX.getTabList(sender, sender.getCommandSenderName(), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
+3
-1
@@ -45,6 +45,8 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
+3
-1
@@ -45,6 +45,8 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -53,7 +55,7 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
+3
-1
@@ -46,6 +46,8 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||
var item = context.getSource();
|
||||
|
||||
var input = context.getInput();
|
||||
var temp = input.split(" ");
|
||||
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
|
||||
@@ -54,7 +56,7 @@ public class CommandForge implements Command<CommandSourceStack>, Predicate<Comm
|
||||
if (input.endsWith(" "))
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
|
||||
|
||||
List<String> results = CommandEX.getTabList(context.getSource().getTextName(), arg);
|
||||
List<String> results = CommandEX.getTabList(item, item.getTextName(), arg);
|
||||
|
||||
for (String s : results) {
|
||||
builder.suggest(s);
|
||||
|
||||
@@ -24,7 +24,7 @@ public class CommandBukkit implements CommandExecutor, TabExecutor {
|
||||
@Override
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, Command command, @NotNull String alias, @NotNull String[] args) {
|
||||
if (command.getName().equalsIgnoreCase("music")) {
|
||||
return CommandEX.getTabList(sender.getName().toLowerCase(Locale.ROOT), args);
|
||||
return CommandEX.getTabList(sender, sender.getName().toLowerCase(Locale.ROOT), args);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ public class CommandBC extends Command implements TabExecutor {
|
||||
}
|
||||
|
||||
public Iterable<String> onTabComplete(CommandSender sender, String[] args) {
|
||||
return CommandEX.getTabList(sender.getName(), args);
|
||||
return CommandEX.getTabList(sender, sender.getName(), args);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class CommandVelocity implements SimpleCommand {
|
||||
if (invocation.source() instanceof Player) {
|
||||
Player player = (Player) invocation.source();
|
||||
String name = player.getUsername();
|
||||
return CommandEX.getTabList(name, args);
|
||||
return CommandEX.getTabList(player, name, args);
|
||||
}
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user