Coder Social home page Coder Social logo

drogtor's Introduction

Drogtor the Nickinator

 

Requires Fabric API.

 

It's a nickname mod for Fabric. You try naming mods; it's not easy.

 

Run /nick followed by your desired nickname. Run /color followed by a color to set your name color to that. 15 of the 16 Minecraft colors are supported. (No, you can't use black.)

Drogtor does not perform validation that the nick is not taken. It is assumed you trust your players. This may change in the future.

 

Run /nick or /color with no arguments to reset to default.

 

Works server-side only.

drogtor's People

Contributors

emilyploszaj avatar unascribed avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

drogtor's Issues

Ghost users logged in

Hey really like the Mod! I did run into an issue. Using AMP instance manager and a Whitelist for logging in.

If a user changes their name and signs out, the server does not recognize the user as signing off. So for example lets say my Username is Joseph and I use /nick Joe, when I sign onto the server the logs show Joseph as signing in, but show Joe as signing off. I have my limit set to 20 users able to log into the server. If 0 people are on the server and I log in it will show 1/20. When I log out it will still show 1/20. Then when I log back in it shows 2/20, log out it stays 2/20. Repeat until 20/20 and no one can login despite the server actually being empty.

Age of Exile uses display names to teleport

This doesn't happen with the Aether, but it does with Age of Exile.
Not sure why the nicknames would prevent entering a dimension. I reported it to AOE but I figured I'd report it here too just so you're aware this can happen.

A config option to disable using /nick would be nice for those who just want the name colors, even if thats not a real solution.

Request: Update for 1.17 (Fabric)

Currently the server crashes at startup when running on 1.17 (Fabric) with Drogor.

Environment:

  • Fabric loader 0.11.6
  • Fabric API 0.37.0

Output is as follows:

[19:43:12] [main/INFO]: Compatibility level set to JAVA_16
[19:43:13] [main/WARN]: @Mixin target net/minecraft/class_2474$class_5124 is public in fabric-tag-extensions-v0.mixins.json:MixinObjectBuilder and should be specified in value
[19:43:13] [main/WARN]: Error loading class: net/minecraft/class_2703$class_2704 (java.lang.ClassNotFoundException: net/minecraft/class_2703$class_2704)
[19:43:13] [main/WARN]: Error loading class: net/minecraft/class_2703$class_2704 (java.lang.ClassNotFoundException: net/minecraft/class_2703$class_2704)
[19:43:14] [main/WARN]: Error loading class: net/minecraft/class_2703$class_2704 (java.lang.ClassNotFoundException: net/minecraft/class_2703$class_2704)
Exception in thread "main" java.lang.RuntimeException: Failed to setup Fabric server environment!
        at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:58)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: An exception occurred when launching the server!
        at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:116)
        at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:56)
Caused by: java.lang.RuntimeException: An exception occurred when launching the server!
        at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:70)
        at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:114)
        ... 1 more
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:68)
        ... 2 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:236)
        at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
        at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:28)
        ... 7 more
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
        ... 9 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
        at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
        at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208)
        at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178)
        at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23)
        at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:162)
        at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:154)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
        at net.minecraft.class_2246.<clinit>(class_2246.java:103)
        at net.minecraft.class_3523.<clinit>(class_3523.java:13)
        at net.minecraft.class_5471.<clinit>(class_5471.java:11)
        at net.minecraft.class_5458.method_30573(class_5458.java:44)
        at net.minecraft.class_5458.method_30566(class_5458.java:75)
        at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:723)
        at net.minecraft.class_5458.<clinit>(class_5458.java:74)
        at net.minecraft.class_2378.<clinit>(class_2378.java:266)
        at net.minecraft.class_2966.method_12851(class_2966.java:44)
        at net.minecraft.server.Main.main(Main.java:92)
        ... 14 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinPreProcessorException: Attach error for drogtor.mixins.json:MixinPlayerEntity during activity: [Transform -> Method drogtor$updatePlayerListEntries()V -> GETSTATIC -> net/minecraft/class_2703$class_2704::field_12374Lnet/minecraft/class_2703$class_2704;]
        at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:300)
        at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:264)
        at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1272)
        at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:287)
        at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345)
        at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569)
        at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351)
        ... 30 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: net.minecraft.class_2703$class_2704
        at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMemberReference(MixinPreProcessorStandard.java:768)
        at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformField(MixinPreProcessorStandard.java:759)
        at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:722)
        at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:294)
        ... 36 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.class_2703$class_2704
        ... 40 more
        
        

Immediate ServerWide crash.

Crashes occur upon player death.

java.lang.NoSuchMethodError: 'void net.minecraft.class_2703.(net.minecraft.class_2703$class_5893, net.minecraft.class_3222[])'
at net.minecraft.class_1657.drogtor$updatePlayerListEntries(class_1657.java:2441)
at net.minecraft.class_1657.drogtor$setNickname(class_1657.java:2426)
at net.minecraft.class_3222.handler$zbj000$copyFrom(class_3222.java:2818)
at net.minecraft.class_3222.method_14203(class_3222.java)
at net.minecraft.class_3324.method_14556(class_3324.java:492)
at net.minecraft.class_3244.method_12068(class_3244.java:1635)
at net.minecraft.class_2799.method_12120(class_2799.java:24)
at net.minecraft.class_2799.method_11054(class_2799.java:6)
at net.minecraft.class_2600.method_11072(class_2600.java:22)
at net.minecraft.class_3738.run(class_3738.java:18)
at net.minecraft.class_1255.method_18859(class_1255.java:156)
at net.minecraft.class_4093.method_18859(class_4093.java:23)
at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:787)
at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:166)
at net.minecraft.class_1255.method_16075(class_1255.java:130)
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:769)
at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:763)
at net.minecraft.class_1255.method_18857(class_1255.java:139)
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:748)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:680)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:264)
at java.base/java.lang.Thread.run(Thread.java:1589)

Nicknames in Commands

I don't know if it's because of the way the mod is structured, but nicknames and commands don't mix well together.

Let's say player "poombus" was nicknamed "joe," and I wanted to TP him. MCs autofill recognizes "poombus" as "joe," so I write "tp joe ~ ~500 ~". But this actually doesn't work because the game recognizes the player as "joe," but is still expecting "poombus."

Now normally, this is just an inconvenience, if anything. It can be easily ignored by ignoring autofill and writing "tp poombus ~ ~500 ~". It's just I'm using Scarpet, the Carpet Mod (by gnembon)'s "programming" language. The thing about that is, it too only recognizes players by their nickname. And as far as I know, there is no way to find a player's actual username without avoiding Drogtor's function altogether.

What I request is that the nicknames are purely cosmetic, but don't change how the server sees them. I don't if this is possible or if it'll be too tedious, but if it's not too much trouble, it would be appreciated. :)

Support for Multi-colored Nicknames

Perhaps you could add support for complex-styled nicknames? This would make this mod a viable alternative to Styled Nicknames, which obviously wouldn't work with Drogtor.

Incompatibility with Player Roles

When a player with both a nickname and a player role dies, the respawn button does not work, instead throwing a lengthy error in the server console.
Removing the player role through the server console does not fix the issue (and neither does restarting the server).
drogtor-player-roles respawn error log.txt

Versions:
Minecraft: 1.18.1
Fabric: 0.12.12
Drogtor: 1.1.2
Player Roles: 1.5.1

Update: the only way I've found to fix this is to remove either the entire .dat file of said player (which holds the Drogtor nickname), or the player_roles file, and then restarting the server. Editing the player's .dat file to remove the nickname and then restarting the server does not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.