Update Fabric to 1.17, fix version placeholder filtering

This commit is contained in:
Luck 2021-08-20 18:46:39 +01:00
parent ba522597a8
commit 93683c3a2f
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
12 changed files with 18 additions and 24 deletions

View File

@ -15,7 +15,7 @@ dependencies {
processResources {
filesMatching('plugin.yml') {
expand 'version': project.ext.fullVersion
expand 'pluginVersion': project.ext.fullVersion
}
}

View File

@ -1,5 +1,5 @@
name: LuckPerms
version: @pluginVersion@
version: ${pluginVersion}
description: A permissions plugin
author: Luck
website: https://luckperms.net

View File

@ -1,6 +1,5 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'java'
}
repositories {
@ -18,7 +17,7 @@ dependencies {
exclude(module: 'adventure-api')
exclude(module: 'adventure-nbt')
}
compileOnly 'me.lucko:commodore:1.9'
compileOnly 'me.lucko:commodore:1.10'
compileOnly('net.milkbowl.vault:VaultAPI:1.7') {
exclude(module: 'bukkit')
}

View File

@ -15,7 +15,7 @@ dependencies {
processResources {
filesMatching('plugin.yml') {
expand 'version': project.ext.fullVersion
expand 'pluginVersion': project.ext.fullVersion
}
}

View File

@ -1,5 +1,5 @@
name: LuckPerms
version: @pluginVersion@
version: ${pluginVersion}
description: A permissions plugin
author: Luck
website: https://luckperms.net

View File

@ -11,7 +11,7 @@ dependencies {
processResources {
filesMatching('plugin.yml') {
expand 'version': project.ext.fullVersion
expand 'pluginVersion': project.ext.fullVersion
}
}

View File

@ -1,5 +1,5 @@
name: LuckPerms
version: @pluginVersion@
version: ${pluginVersion}
description: A permissions plugin
author: Luck
main: me.lucko.luckperms.bungee.loader.BungeeLoaderPlugin

View File

@ -2,7 +2,7 @@ import net.fabricmc.loom.task.RemapJarTask
plugins {
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'fabric-loom' version '0.6-SNAPSHOT'
id 'fabric-loom' version '0.9.+'
}
archivesBaseName = 'luckperms'
@ -12,16 +12,11 @@ repositories {
mavenLocal()
}
def minecraftVersion = '1.16.4'
def yarnBuild = 7
def loaderVersion = '0.10.8'
def fabricApiVersion = '0.28.4+1.16'
dependencies {
// Fabric Stuff, We don't specifically target only a single version but yarn mappings require a version to be specified.
minecraft "com.mojang:minecraft:${minecraftVersion}"
mappings "net.fabricmc:yarn:${minecraftVersion}+build.${yarnBuild}:v2"
modImplementation "net.fabricmc:fabric-loader:${loaderVersion}"
// https://modmuss50.me/fabric.html
minecraft 'com.mojang:minecraft:1.17.1'
mappings 'net.fabricmc:yarn:1.17.1+build.39:v2'
modImplementation 'net.fabricmc:fabric-loader:0.11.6'
Set<String> apiModules = [
'fabric-api-base',
@ -31,7 +26,7 @@ dependencies {
]
apiModules.forEach {
modImplementation(fabricApi.module(it, fabricApiVersion))
modImplementation(fabricApi.module(it, '0.38.0+1.17'))
}
include(modImplementation('me.lucko:fabric-permissions-api:0.1-SNAPSHOT'))

View File

@ -101,7 +101,7 @@ public class FabricSenderFactory extends SenderFactory<LPFabricPlugin, ServerCom
@Override
protected void performCommand(ServerCommandSource sender, String command) {
sender.getMinecraftServer().getCommandManager().execute(sender, command);
sender.getServer().getCommandManager().execute(sender, command);
}
@Override

View File

@ -230,13 +230,13 @@ public final class LPFabricBootstrap implements LuckPermsBootstrap, DedicatedSer
@Override
public Optional<UUID> lookupUniqueId(String username) {
return getServer().map(MinecraftServer::getUserCache).map(c -> c.findByName(username)).map(GameProfile::getId);
return getServer().map(MinecraftServer::getUserCache).flatMap(c -> c.findByName(username)).map(GameProfile::getId);
}
@Override
public Optional<String> lookupUsername(UUID uniqueId) {
return getServer().map(MinecraftServer::getUserCache).map(c -> c.getByUuid(uniqueId)).map(GameProfile::getName);
return getServer().map(MinecraftServer::getUserCache).flatMap(c -> c.getByUuid(uniqueId)).map(GameProfile::getName);
}
@Override

View File

@ -16,7 +16,7 @@ dependencies {
processResources {
filesMatching('plugin.yml') {
expand 'version': project.ext.fullVersion
expand 'pluginVersion': project.ext.fullVersion
}
}

View File

@ -1,5 +1,5 @@
name: LuckPerms
version: @pluginVersion@
version: ${pluginVersion}
api: ["1.0.5"]
description: A permissions plugin
author: Luck