Antipixel / nexus-map

Enables you to navigate the Nexus portal menu as an interactive map
BSD 2-Clause "Simplified" License
7 stars 6 forks source link

Teleports not showing on map if binded with a modifier key #4

Closed derekmu closed 3 years ago

derekmu commented 3 years ago

I just installed this plugin and I also have Better Teleport Menu installed.

I've bound Fenkenstrain's Castle to Shift+F. It shows as disabled on the map. The same issue occurs for Watchtower, which is bound to Ctrl+W. All teleports that have a modifier key are disabled, and all teleports that don't have modifier keys are enabled.

If I change these keybindings to a single letter and re-open the nexus teleport menu, the map shows the teleports as enabled.

Is it possible to allow modifier keys not to interfere with the plugin map?

derekmu commented 3 years ago

I took a peek, and I might dig into this a bit later, but it looks like this regex could be causing the issue:

https://github.com/Antipixel/nexus-map/blob/f2527527bb92ca77aeaf5dcea18293783a6c7b7f/src/main/java/net/antipixel/nexus/NexusMapPlugin.java#L93

It appears that it's looking up available teleports from the UI, but only finds them if it matches a single non-whitespace character in the keybinding element. Could it work to look for any number of non-whitespace characters by adding a +?

Antipixel commented 3 years ago

That appears to work flawlessly. I'll iron out a few other compatibility issues with the Better Teleport Menu plugin and it'll be fixed in the next release. Thank you