Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Bets

Members
  • Posts

    153
  • Joined

  • Last visited

Everything posted by Bets

  1. I tried searching everywhere, could not find a legit answer. Is it possible to add the autocomplete cycle to cycle through players when pressing TAB? (doesn't have to exactly be players, can be other strings inside an array)
  2. I made mods for 1.11.2 too, it's just most people don't like the new PVP system so they chose to stay on 1.8.9
  3. Most players still play on 1.8.9 - and a lot of the mods created for PVP players etc are mainly 1.8.9
  4. Oh, yeah I use 1.8.9 that makes sense.
  5. No idea honestly, it's like it doesn't exist for some reason. It's ok though, it works!
  6. I wasn't able to implement IClientCommand. However, I added an override to the permission level and it works now! thank you!
  7. It says I don't have perms to use the command @Mod.EventHandler public void init (FMLPostInitializationEvent event) { ClientCommandHandler.instance.registerCommand(new commandthing()); } public class commandthing extends CommandBase implements ICommand { @Override public String getCommandName() { // TODO Auto-generated method stub return "cmd"; } @Override public String getCommandUsage(ICommandSender sender) { // TODO Auto-generated method stub return "use it"; } @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { // TODO Auto-generated method stub System.out.println("THIS WORKS DANG IT"); } }
  8. Hi I tried adding a command that only the client can see, just to test things out and it did not work for some reason. I tried using the implementation ICommand into a class I added to my main class. I tried searching for hours, but I didn't find anything useful for what I want to do. most of the tutorials are including the server too. This is what I tried doing: public class command implements ICommand { @Override public int compareTo(ICommand arg0) { // TODO Auto-generated method stub return 0; } @Override public String getCommandName() { // TODO Auto-generated method stub return "test"; } @Override public String getCommandUsage(ICommandSender sender) { // TODO Auto-generated method stub return "test stuff"; } @Override public List<String> getCommandAliases() { return null; } @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { // TODO Auto-generated method stub System.out.println("testing complete"); } @Override public boolean canCommandSenderUseCommand(ICommandSender sender) { // TODO Auto-generated method stub return true; } @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { // TODO Auto-generated method stub return null; } @Override public boolean isUsernameIndex(String[] args, int index) { // TODO Auto-generated method stub return false; } } What am I doing wrong here? and will this method work only on the client? Thanks
  9. How do you get the player names? in some sort of an object?
  10. I'd like to put all the players that there are in the player list to an array. is this possible?
  11. I need to change someone's skin using my mod - or even reset it but it should change the model of the skin (Alex/Steve model) Is something like this possible?
  12. I'm trying to get the name of the player that send the current chat message. I'm using ClientChatReceivedEvent and I can get the formatted / unformatted text yet I don't know how can I get just the senders name, Anyone knows? thanks.
  13. Maybe it looks like I do because I run it for like 6 times to check 6 different players. The thing is, it works! I just want to know how to detect the "429 Error" and handle it. Is something like this even possible?
  14. No, it's getting called when you join a server, ones. Is that it? [Client thread/INFO]: [STDERR]: java.io.IOException: Server returned HTTP response code: 429 for URL: api url [Client thread/INFO]: [STDERR]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) [Client thread/INFO]: [STDERR]: at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source) ...
  15. This is what I've got in the TheAPI class. public class TheAPI { private String current_rank; public String get_current_rank() { return current_rank; } public void setCurrent_rank(String current_rank) { this.current_rank = current_rank; } @Override public String toString() { return current_rank; } } And this is the crash log: -- Head -- Thread: Client thread Stacktrace: at me.main.Engine.getRank(Engine.java:361) at me.main.Engine.onRenderText(Engine.java:178) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_9_Engine_onRenderText_Text.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) at net.minecraftforge.client.GuiIngameForge.renderHUDText(GuiIngameForge.java:695) at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:171)
  16. It's not much, but this is the code that loads the JSON: public static String[] getRank(String username) { String json = null; try { json = getJson("api url" + username); } catch (Exception e) { e.printStackTrace(); } Gson gson = new Gson(); TheAPI theapi = gson.fromJson(json, TheAPI.class); return new String[] { theapi.get_current_rank() }; } The result is just put in a String that's being displayed on the screen. The crash log points to the return line in the code I showed before ^
  17. I have a function that loads a specific URL from an API for some data. Sometimes I'll get an HTTP error 429 (too many requests) from the API server. When this happens for some reason the game just crashes. All I'm doing is checking an URL for some data and displaying that data on the screen. My first idea was to somehow detect when the API returns error 429 but I don't really know how I can do that.
  18. Thank you for replying fast haha - can I do something like this on client side?
  19. Wait, so is it possible to edit an already sent message?
  20. And that is why I probably was not able to find anything.
  21. I did without success. If I succeeded I'd just say "thank you" and not ask anything else.
  22. It was just an example, but yeah something like that. Where can I see the Chat event handler and how it edits the messages?
  23. Hi guys I need to make a function that when it detects a chat message with a specific string inside it it changes the sent message or deletes it completely (Client side of course). For example: Original: Someone: Hi, you smell Edited: Someone: Hi, you ***** Thanks
  24. Is it possible to add 1 to a variable every block the horse moves? and reset when needed?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.