1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-08-23 22:52:48 +02:00

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
12 changed files with 18 additions and 24 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -230,13 +230,13 @@ public final class LPFabricBootstrap implements LuckPermsBootstrap, DedicatedSer
@Override @Override
public Optional<UUID> lookupUniqueId(String username) { 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 @Override
public Optional<String> lookupUsername(UUID uniqueId) { 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 @Override

View File

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

View File

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