[RPG/MECH] mcMMO v1.2.07 - RPG Addiction Redefined! Multi-Lingual! [1337][1549]

Discussion in 'Inactive/Unsupported Plugins' started by nossr50, Feb 5, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    nossr50

  2. Offline

    NuclearW

    Could you provide a stack trace, the full error message?
     
  3. Offline

    Huns

    Thanks for continuing to work on this plugin! We love it on our public server, and a lot of our customers seem to think Minecraft would be really boring without it. I just have a question real quick.

    I guess I can write a migration script that will take care of this for my users, but I wonder why it was necessary to do this in the first place. It violates the filesystem standard of putting plugin configurations into plugins/pluginName. It also makes extra work for server admins, and complicates wiring up control panels to support mcMMO. I don't mind doing that, but what did this do to improve the plugin? I did a search, but it doesn't seem any other plugins use this standard.

    If there's some way you can make mcMMO handle migration automatically, that would be awesome!
     
  4. Offline

    nossr50

    Ah, maybe it was not necessary. I just felt like I should shove all the flat file stuff into its own folder as it was becoming an eyesore to me. I'm sorry I didn't give it more thought!

    Customers? I'm intrigued...

    It's on my TODO list, I'll see if I can't get it sorted.

    It does have to do with how BukkitContrib works, and thankfully it works in such a manner!

    Arigato

    I have one more thing I want to do for 1.0.37 before I release it, and thats to rewrite the Party System. Expect Party leaders and privatized parties soon!
     
  5. Offline

    Darcion

    is there any chance to get exp from killing monsters?
     
  6. Offline

    Huns

    That's cool. I am updating our stuff to symlink plugins/mcMMO to plugins/FlatFileStuff. I think that will have the intended effect.

    Yes, about 30% use it.
     
  7. Offline

    darkwarriors

    i need some help, i want to disable all recived exp in a specific world but i want to enable all the skill active and passive, what i have to do? i try many combination of permission but nothing seems to work!
     
  8. Offline

    Ratchet

  9. Offline

    nossr50

    The priority is set to normal for the respawn event, couldn't the author of that plugin change his?

    So you want the skills to work but no xp gaining?
     
  10. Offline

    revslaughter

    Hello, you've made an awesome plugin, nossr50, it's a truly fantastic experience and everyone on my server just loves it.

    We've gotten a couple more people on the server though, and before now I've been using the flatfile and want to move to MySQL. I've got a MySQL server running, with a new mcmmo database defined, and I've granted my normal user account all permissions on that database. There's just one option in config.yml that has me somewhat confused, the Name definition underneath User. Currently I have it like this:


    Code:
    MySQL:
        Enabled: true
        Server:
            Address: localhost
            Port: 3306
        Database:
            Name: mcmmo
            User: myusernameformysql
                Name:
                Password: mypasswordformysql
            TablePrefix: mcmmo_
    What should I put for Name up here? Any help is much appreciated, thanks.
     
  11. Offline

    nossr50

    The name is the account name for MySQL, for me I use root because I haven't setup a user on my MySQL server (I know I should)
     
  12. Offline

    revslaughter

    Hm, using my username in MySQL has the same problem with Name - how is Name distinct from User?

    I tried using root for one and my account name on the other, and the console is saying "mapping values are not allowed here"

    Ah, I eliminated the spaces between the colon between Name and Password under User though it does say this now:

    Code:
    08:39:44 [INFO] [mcMMO] Using Bukkit Permissions.
    08:39:44 [INFO] Loading Config File...
    08:39:47 [INFO] SQLException: Access denied for user 'null'@'localhost' (using password: NO)
    08:39:47 [INFO] SQLState: 28000
    08:39:47 [INFO] VendorError: 1045
    08:39:47 [SEVERE] Error occurred while enabling mcMMO v1.0.36 (Is it up to date?): null
    java.lang.NullPointerException
            at com.gmail.nossr50.Database.Write(Database.java:135)
            at com.gmail.nossr50.Database.createStructure(Database.java:45)
            at com.gmail.nossr50.mcMMO.onEnable(mcMMO.java:111)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    Hm, it doesn't seem to see my username/password.

    Oh, and thank you very much for your quick reply :D

    (edited for more complete error report)


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 18, 2016
  13. Offline

    nossr50

    Ah I see the problem on closer inspection

    Code:
    MySQL:
        Enabled: true
        Server:
            Address: localhost
            Port: 3306
        Database:
            Name: mcmmo
            User:
                Name: myusernameformysql
                Password: mypasswordformysql
            TablePrefix: mcmmo_
    Do it like this
     
  14. Offline

    yuckfoooo

    Edit: Nossr beat me to it.

    @revslaughter

    The way that this config.yml is setup is that you should only define each leaf node (meaning nodes with no children. Nodes being the headers with colons after them, i.e. "User:")

    For example:
    Code:
    MySQL:
        Enabled: true
        Server:
            Address: [MySql location, default: localhost]
            Port: [MySql port, default: 3306]
        Database:
            Name: [The name of the MySql database goes here]
            User:
                Name: [The name of the MySql user goes here]
                Password: [The password for aforementioned MySql user goes here]
            TablePrefix: [Table prefix here, default: mcmmo_]
    It looks like you're having trouble writing to the DB. Make sure your settings are correct and that your user has sufficient privileges to create/modify the table. In the example above, "User:" is just the parent of User.Name and User.Password, and should not be filled out.
     
  15. Offline

    revslaughter

    OMG I'm dumb. Geez. I'm not supposed to put a value at 'User:', that's defining the block below. So sorry for wasting your time...:'(

    Thanks so much, nossr50 and yuckfoooo
     
  16. Offline

    nossr50

    I can see why you made the error, don't feel stupid.
     
  17. Offline

    ACStache

    quick question @nossr50
    been using MobArena, and before taming exp was being gained rampantly for no apparent reason. That has since been fixed.
    now you can have a 'pet class' and have tamed wolves fighting with you that are invincible. But you still don't get taming exp. The wolves are set with you as the owner, so they're the same as a legitimate tamed wolf

    How exactly do you calculate the taming exp? MobArena's thread is curious to see how exactly it works.
     
  18. Offline

    nossr50

    It's very similar to how the other combat skills work

    Code:
    /*
             * OFFENSIVE CHECKS FOR WOLVES VERSUS ENTITIES
             */
            if(event instanceof EntityDamageByEntityEvent && ((EntityDamageByEntityEvent) event).getDamager() instanceof Wolf)
            {
                EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent) event;
                Wolf theWolf = (Wolf) eventb.getDamager();
                if(theWolf.isTamed() && Taming.ownerOnline(theWolf, pluginx))
                {
                    if(Taming.getOwner(theWolf, pluginx) == null)
                        return;
                    Player master = Taming.getOwner(theWolf, pluginx);
                    PlayerProfile PPo = Users.getProfile(master);
    
                    if(mcPermissions.getInstance().taming(master))
                    {
                        //Sharpened Claws
                        if(PPo.getSkillLevel(SkillType.TAMING) >= 750)
                        {
                            event.setDamage(event.getDamage() + 2);
                        }
    
                        //Gore
                        if(Math.random() * 1000 <= PPo.getSkillLevel(SkillType.TAMING))
                        {
                            event.setDamage(event.getDamage() * 2);
    
                            if(event.getEntity() instanceof Player)
                            {
                                Player target = (Player)event.getEntity();
                                target.sendMessage(mcLocale.getString("Combat.StruckByGore")); //$NON-NLS-1$
                                Users.getProfile(target).setBleedTicks(2);
                            }
                            else
                                pluginx.misc.addToBleedQue((LivingEntity) event.getEntity());
    
                            master.sendMessage(mcLocale.getString("Combat.Gore")); //$NON-NLS-1$
                        }
                        if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity()))
                        {
                            int xp = 0;
                            if(event.getEntity() instanceof Monster)
                            {
                                  if(event.getEntity() instanceof Creeper)
                                    xp = (event.getDamage() * 6) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Spider)
                                    xp = (event.getDamage() * 5) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Skeleton)
                                    xp = (event.getDamage() * 3) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Zombie)
                                    xp = (event.getDamage() * 3) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof PigZombie)
                                    xp = (event.getDamage() * 4) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Slime)
                                    xp = (event.getDamage() * 4) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Ghast)
                                    xp = (event.getDamage() * 4) * LoadProperties.xpGainMultiplier;
                                Users.getProfile(master).addXP(SkillType.TAMING, xp);
                            }
                            if(event.getEntity() instanceof Player)
                            {
                                xp = (event.getDamage() * 2) * LoadProperties.xpGainMultiplier;
                                Users.getProfile(master).addXP(SkillType.TAMING, xp);
                            }
                            Skills.XpCheckSkill(SkillType.TAMING, master);
                        }
                    }
                }
            }
    I only do a few checks and it should be working with MobArena. All MobArena has to make sure of is that the Wolf's master is properly setup.

    Here is the code snippit where I grab its master

    Code:
    public static Player getOwner(Entity wolf, Plugin pluginx)
        {
            if(wolf instanceof Wolf)
            {
                Wolf theWolf = (Wolf)wolf;
                for(Player x : pluginx.getServer().getOnlinePlayers())
                {
                    if(x instanceof AnimalTamer)
                    {
                        AnimalTamer tamer = (AnimalTamer)x;
                        if(theWolf.getOwner() == tamer)
                            return x;
                    }
                }
            }
            return null;
        }
    So in getOwner I wrote some code to loop through online players to find the master of the wolf.
    I'm using the method .getOwner() and comparing the result to each of the players to see if anyone online is the Master and if they are then this returns their Player object (and if it gets this far it should work).

    EDIT: Looks like I missed the question, this is how I calculate the XP

    Code:
    if(event.getEntity() instanceof Monster)
                            {
                                if(event.getEntity() instanceof Creeper)
                                    xp = (event.getDamage() * 6) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Spider)
                                    xp = (event.getDamage() * 5) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Skeleton)
                                    xp = (event.getDamage() * 3) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Zombie)
                                    xp = (event.getDamage() * 3) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof PigZombie)
                                    xp = (event.getDamage() * 4) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Slime)
                                    xp = (event.getDamage() * 4) * LoadProperties.xpGainMultiplier;
                                if(event.getEntity() instanceof Ghast)
                                    xp = (event.getDamage() * 4) * LoadProperties.xpGainMultiplier;
                                Users.getProfile(master).addXP(SkillType.TAMING, xp);
                            }
     
  19. Offline

    darkwarriors

    yes i want skill work but not exp in a specific world with permissions plugin!
     
  20. Offline

    nossr50

    Hmm.. if you want it on a world basis I'll have to modify my code
     
  21. Offline

    ShaDooM

    @nossr50

    in /stats "woodcutting" is not listed for people with "mcmmo.skills.*" or "mcmmo.skills.woodcutting" node
    If they type /woodcutting they still can see their level though

    Admins can see it on /stats though
     
  22. Offline

    ACStache

    @nossr50
    @ShaDooM
    the issue is this:
    if the player has mcmmo.skills.* but not mcmmo.ability.* woodcutting won't show up (just tested and confirmed myself)

    edit: a little bit more testing revealed that if a group has mcmmo.skills.* and not mcmmo.ability.*, woodcutting won't appear in /stats but is still used to calculate power level and still is whatever it should be (if it were being listed) and /woodcutting still displays the right information.
    adding either mcmmo.ability.* or mcmmo.ability.woodcutting makes it show up in /stats again. adding anything other than those 2 doesn't make it show up
     
  23. Offline

    ShaDooM

    @ACStache

    ah okay :)

    thanks for the info
     
  24. Offline

    nossr50

    I see the issue, this will be fixed in 1.0.37
     
  25. Offline

    darkwarriors

    exatcly same thing with Axes.. so i am not able to add only skill in a specific world!
     
  26. Offline

    nossr50

    Version 1.0.39
    • mcMMO won't auto-download and auto-run BukkitContrib anymore
    Version 1.0.38
    • Commented code for the half-finished Infernal Pick subskill (Whoops)​
    Version 1.0.37
    [pig] mcMMO now with 100% more pop-ups [pig]
    WARNING THIS POST CONTAINS SOME HUMEROUS REMARKS

    GENERAL
    • The donation message in /mcmmo is now toggle-able
    • The anvil message now only gets shown the first time you place an anvil (after login)
    • Reworked /mcmmo (an improvement I would say)
    • Added /mcmmo text to localization file
    • Archery fire rate now configurable
    • Berserk mode stops items from being collected
    • Taming no longer receives xp from wolves being harmed
    • Fixed bug where /stats required Tree Feller permission to show Woodcutting skill
    • Fixed bug where players with mcgod could be harmed by AoE
    • Fixed bug where modifying a skill also modified the xp to the same amount (when it should be zero)
    BUKKITCONTRIB STUFF (IT IS COMPLETELY OPTIONAL BTW)

    • Added a pop-up when placing an Anvil
    • Added pop-ups on levelup
    • Added basic sound effects to various abilities (Berserk, Tree Feller, Super Breaker, Leaf Blower, etc...)
    CODE STUFF

    • Added checkXp(SkillType, Player) for plugin devs (use this after modifying XP to check for levels)
    • Added getPlayerProfile() which returns a PlayerProfile object for plugin devs (You can do almost everything with this object)
    • 100% more enums
    • Changed how checking skill xp worked to be more efficient
    HOW DO I RUN BUKKIT CONTRIB?
    ...Or you could always manually install
    Q: HOW DOES THAT WORK?​
    A: It's magic​
    BukkitContrib is an amazing mod developed by that wizard with the minecart fetish that provides an API for client side modding, and it is required to experience some features of mcMMO. If you do not have BukkitContrib installed you will feel like you are missing out and it may lead to depression.


    When you run mcMMO BukkitContrib is downloaded and loaded into your bukkit server by default, yell at me if you want this changed. However, keep in mind it is AWESOME.

    Surprise, you have to install it manually now.
     
    ACStache likes this.
  27. Offline

    DragonMasterNYC

    Now it will feel more like an rpg.

    Thanks for the update.
     
  28. Offline

    triarry

    My users are getting iron bars along with their iron ore drops.

    (in 1.0.37)

    and this is the only thing I've updated since it started happening.
     
  29. Offline

    Dec64

    So, i assume this has been asked before, but i cant see the answer, what is wrong with using permissions 3.1.6 with this?
     
  30. Offline

    Huns

    OK, so the first post says that the FlatFileStuff issue can be solved by moving mcmmo.users into FlatFileStuff. What you actually have to do is move mcmmo.users into FlatFileStuff and then move *.mcmmo into FlatFileStuff/Leaderboards. If you don't do this, everyone's stats are zeroed.

    Because this change cannot be performed live (since the old version will not be able to properly save its data if the files are moved), and because the plugin throws an exception if I try to just symlink the files, it's necessary to disable the plugin or just stop the server before moving the files.

    Please consider reversing this. It's going to be a headache for GSPs. We are all happy to add BukkitContrib as a separate piece. Generally, a plugin should not download other plugins unless absolutely necessary, as it will use memory without benefit for those who don't want it, and may generate confusion, i.e. "why is this thing here? I don't remember putting it here."
     
  31. Offline

    nossr50

    Grab the patch

    I suppose you are right, I'll change how it works next patch.

    Patch'd

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 18, 2016
Thread Status:
Not open for further replies.

Share This Page