Thread: Properly remove fields from Player

Results 1 to 2 of 2
  1. #1 Properly remove fields from Player 
    Registered Member
    Join Date
    May 2018
    Posts
    19
    Thanks given
    1
    Thanks received
    5
    Rep Power
    20
    I'm wondering how to properly remove fields from Player.java and making it reflect onto the player character's file correctly. I'll give the example of what I did.

    In Player.java there is
    Code:
    	public void setPrestigeLevel(int level) {
    		this.prestigeLevel = level;
    	}
    	
    	public int getPrestigeLevel() {
    		return prestigeLevel;
    	}
    	
    	public Prestige getPrestige() {
    		return prestige;
    	}
    I removed that out of Player.java because I want to re-do prestiging my way and I don't need those fields there. (I know I could just leave them but that's not what I'm going for)
    Whenever I restart and try to log in I get the "Invalid loginserver requested. Please try using a different world." along with this in the console:
    Code:
    ERROR! THREAD NAME: New I/O worker #1
    com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException: No such field com.rs.game.player.Player.prestigeLevel
    ---- Debugging information ----
    field               : prestigeLevel
    class               : com.rs.game.player.Player
    required-type       : com.rs.game.player.Player
    converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
    path                : /player/prestigeLevel
    line number         : 327
    version             : 1.4.8
    -------------------------------
    [XMLFileManager] Recovering account: josh
    (All the recovering account statement does is just try to copy the old player file from backups, not fix it in this issue)

    Any help will be appreciated. Thank you.
    Reply With Quote  
     

  2. #2  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Quote Originally Posted by Joshwood22 View Post
    I'm wondering how to properly remove fields from Player.java and making it reflect onto the player character's file correctly. I'll give the example of what I did.

    In Player.java there is
    Code:
    	public void setPrestigeLevel(int level) {
    		this.prestigeLevel = level;
    	}
    	
    	public int getPrestigeLevel() {
    		return prestigeLevel;
    	}
    	
    	public Prestige getPrestige() {
    		return prestige;
    	}
    I removed that out of Player.java because I want to re-do prestiging my way and I don't need those fields there. (I know I could just leave them but that's not what I'm going for)
    Whenever I restart and try to log in I get the "Invalid loginserver requested. Please try using a different world." along with this in the console:
    Code:
    ERROR! THREAD NAME: New I/O worker #1
    com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException: No such field com.rs.game.player.Player.prestigeLevel
    ---- Debugging information ----
    field               : prestigeLevel
    class               : com.rs.game.player.Player
    required-type       : com.rs.game.player.Player
    converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
    path                : /player/prestigeLevel
    line number         : 327
    version             : 1.4.8
    -------------------------------
    [XMLFileManager] Recovering account: josh
    (All the recovering account statement does is just try to copy the old player file from backups, not fix it in this issue)

    Any help will be appreciated. Thank you.
    you'd have to make an xml transformer to remove the fields

    https://x-stream.github.io/manual-tweaking-output.html
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 8
    Last Post: 06-07-2012, 02:05 PM
  2. Removing "Attack" option from players
    By jordan641 in forum Help
    Replies: 8
    Last Post: 04-27-2012, 09:20 PM
  3. remove item from player [PI]
    By jester2290 in forum Help
    Replies: 0
    Last Post: 07-23-2011, 08:34 PM
  4. Replies: 10
    Last Post: 09-23-2009, 06:29 AM
  5. Removing items from players
    By Colby in forum Snippets
    Replies: 14
    Last Post: 07-24-2009, 01:22 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •