Number Numerals?

Discussion in 'Spigot Plugin Help' started by Uzi, May 15, 2017.

  1. Uzi

    Uzi

    Anyone know of any plugins that can change Roman Numerals to Numbers?

    :cool: It would mean lots thanks everyone :cool:

    Token Enchant plugin not working atm well it does but it messes up gives no sound and the enchantments change back to roman numerals even when you disable it so please someone help thanks! <3​
     
    #1 Uzi, May 15, 2017
    Last edited: May 16, 2017
  2. Uzi

    Uzi

    Are you being for real? ^
     
    #2 Uzi, May 16, 2017
    Last edited: May 16, 2017
  3. Uzi

    Uzi

    Has anyone found out how to do this or if this is even possible Token Enchant works sometimes but very buggy, if someone can please help it would mean lots thanks everyone! <3
     
  4. Thought I did but let em reload the server to find out, I'm looking for a plugin that does the same
     
  5. Code (Java):

    public int romanToInteger(String s) {
        if(s == null) {
            return 0;
        }

        int length = s.length();
        int sum = 0;
        int pre = 0;

        for(int i = length - 1; i >= 0; i--){
            int cur = romanTable(s.charAt(i)); //uses method below

            if(i == length - 1){
                sum = sum + cur;
            }else{
                if(cur < pre){
                    sum = sum - cur;
                }else{
                    sum = sum + cur;
                }
            }
            pre = cur;
        }
        return sum;
    }
     
    Code (Java):

    private int romanTable(char c){
        int num;
        switch(c){
            case 'I':
                num = 1;
                break;
            case 'V':
                num = 5;
                break;
            case 'X':
                num = 10;
                break;
            case 'L':
                num = 50;
                break;
            case 'C':
                num = 100;
                break;
            case 'D':
                num = 500;
                break;
            case 'M':
                num = 1000;
                break;
            default:
                num = 0;
                break;
        }
        return num;
    }
     
    try this.
     
    • Funny Funny x 1
  6. Who is going to release it?
     
    • Agree Agree x 1
  7. Uzi

    Uzi

    Wow well I bought the plugin asked him I even made a Ticket I bought the Premium plugin of Token Enchant unless there is another version like you said which he only releases to private customers.....
    I have bought this plugin and have had it since 2015 so thanks ......
     
  8. Uzi

    Uzi


    Also thanks for this I have eclipse so if this works ill let you know thanks... <3

    Update: A bit confusing will message you more about it.. thanks again <3
     
    #8 Uzi, May 17, 2017
    Last edited: May 17, 2017
  9. Uzi

    Uzi

    Anyone else have any suggestions or know how to fix this?