mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +01:00
API: remove uuid cache
This commit is contained in:
parent
5577e3f590
commit
a823290d66
@ -198,19 +198,6 @@ public interface LuckPermsApi {
|
|||||||
*/
|
*/
|
||||||
@NonNull ActionLogger getActionLogger();
|
@NonNull ActionLogger getActionLogger();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a {@link UuidCache}.
|
|
||||||
*
|
|
||||||
* <p>The uuid cache provides read access to the internal LuckPerms uuid
|
|
||||||
* mapping system.</p>
|
|
||||||
*
|
|
||||||
* @return the uuid cache
|
|
||||||
* @deprecated this feature is now handled internally - and the API returns a
|
|
||||||
* No-op implementation of this class.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@NonNull UuidCache getUuidCache();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link ContextManager}.
|
* Gets the {@link ContextManager}.
|
||||||
*
|
*
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of LuckPerms, licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Copyright (c) lucko (Luck) <luck@lucko.me>
|
|
||||||
* Copyright (c) contributors
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package me.lucko.luckperms.api;
|
|
||||||
|
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A UUID cache for online users, between external Mojang UUIDs, and internal
|
|
||||||
* LuckPerms UUIDs.
|
|
||||||
*
|
|
||||||
* @deprecated this feature is now handled internally - and the API returns a
|
|
||||||
* No-op implementation of this class.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public interface UuidCache {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a users "internal" LuckPerms UUID, from the one given by the server.
|
|
||||||
*
|
|
||||||
* <p>When <code>use-server-uuids</code> is true, this returns the same UUID
|
|
||||||
* instance.</p>
|
|
||||||
*
|
|
||||||
* @param mojangUuid the UUID assigned by the server, through
|
|
||||||
* <code>Player#getUniqueId</code> or
|
|
||||||
* <code>ProxiedPlayer#getUniqueId</code>
|
|
||||||
* @return the corresponding internal UUID
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@NonNull UUID getUUID(@NonNull UUID mojangUuid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a users "external", server assigned unique id, from the internal
|
|
||||||
* one used within LuckPerms.
|
|
||||||
*
|
|
||||||
* @param internalUuid the UUID used within LuckPerms, through
|
|
||||||
* <code>User#getUuid</code>
|
|
||||||
* @return the corresponding external UUID
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@NonNull UUID getExternalUUID(@NonNull UUID internalUuid);
|
|
||||||
|
|
||||||
}
|
|
@ -31,7 +31,6 @@ import me.lucko.luckperms.api.LuckPermsApi;
|
|||||||
import me.lucko.luckperms.api.MessagingService;
|
import me.lucko.luckperms.api.MessagingService;
|
||||||
import me.lucko.luckperms.api.NodeFactory;
|
import me.lucko.luckperms.api.NodeFactory;
|
||||||
import me.lucko.luckperms.api.Storage;
|
import me.lucko.luckperms.api.Storage;
|
||||||
import me.lucko.luckperms.api.UuidCache;
|
|
||||||
import me.lucko.luckperms.api.context.ContextManager;
|
import me.lucko.luckperms.api.context.ContextManager;
|
||||||
import me.lucko.luckperms.api.event.EventBus;
|
import me.lucko.luckperms.api.event.EventBus;
|
||||||
import me.lucko.luckperms.api.manager.CachedDataManager;
|
import me.lucko.luckperms.api.manager.CachedDataManager;
|
||||||
@ -51,7 +50,6 @@ import me.lucko.luckperms.common.api.implementation.ApiNodeFactory;
|
|||||||
import me.lucko.luckperms.common.api.implementation.ApiPlatformInfo;
|
import me.lucko.luckperms.common.api.implementation.ApiPlatformInfo;
|
||||||
import me.lucko.luckperms.common.api.implementation.ApiTrackManager;
|
import me.lucko.luckperms.common.api.implementation.ApiTrackManager;
|
||||||
import me.lucko.luckperms.common.api.implementation.ApiUserManager;
|
import me.lucko.luckperms.common.api.implementation.ApiUserManager;
|
||||||
import me.lucko.luckperms.common.api.implementation.NoopUuidCache;
|
|
||||||
import me.lucko.luckperms.common.config.ConfigKeys;
|
import me.lucko.luckperms.common.config.ConfigKeys;
|
||||||
import me.lucko.luckperms.common.messaging.LuckPermsMessagingService;
|
import me.lucko.luckperms.common.messaging.LuckPermsMessagingService;
|
||||||
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
|
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
|
||||||
@ -153,12 +151,6 @@ public class LuckPermsApiProvider implements LuckPermsApi {
|
|||||||
return this.actionLogger;
|
return this.actionLogger;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public @NonNull UuidCache getUuidCache() {
|
|
||||||
return NoopUuidCache.INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NonNull ContextManager getContextManager() {
|
public @NonNull ContextManager getContextManager() {
|
||||||
return this.contextManager;
|
return this.contextManager;
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of LuckPerms, licensed under the MIT License.
|
|
||||||
*
|
|
||||||
* Copyright (c) lucko (Luck) <luck@lucko.me>
|
|
||||||
* Copyright (c) contributors
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package me.lucko.luckperms.common.api.implementation;
|
|
||||||
|
|
||||||
import me.lucko.luckperms.api.UuidCache;
|
|
||||||
|
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"})
|
|
||||||
public class NoopUuidCache implements UuidCache {
|
|
||||||
public static final NoopUuidCache INSTANCE = new NoopUuidCache();
|
|
||||||
|
|
||||||
private NoopUuidCache() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public @NonNull UUID getUUID(@NonNull UUID external) {
|
|
||||||
return external;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public @NonNull UUID getExternalUUID(@NonNull UUID internal) {
|
|
||||||
return internal;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user