Search in sources :

Example 11 with SimplePetsException

use of simplepets.brainsynder.errors.SimplePetsException in project SimplePets by brainsynder-Dev.

the class MySQL method addColumn.

public void addColumn(Connection connection, String column, String type) {
    try {
        Statement statement = connection.createStatement();
        statement.executeUpdate("ALTER TABLE `SimplePets` ADD " + column + " " + type + " NOT NULL");
    } catch (Exception e) {
        throw new SimplePetsException("Unable to add '" + column + "' to the database", e);
    }
}
Also used : Statement(java.sql.Statement) SimplePetsException(simplepets.brainsynder.errors.SimplePetsException) SimplePetsException(simplepets.brainsynder.errors.SimplePetsException)

Aggregations

SimplePetsException (simplepets.brainsynder.errors.SimplePetsException)11 ArmorStand (org.bukkit.entity.ArmorStand)6 Shulker (org.bukkit.entity.Shulker)6 EulerAngle (org.bukkit.util.EulerAngle)6 IEntityControllerPet (simplepets.brainsynder.api.entity.IEntityControllerPet)6 IEntityPet (simplepets.brainsynder.api.entity.IEntityPet)6 ArmorStandDefault (simplepets.brainsynder.pet.types.ArmorStandDefault)6 ShulkerDefault (simplepets.brainsynder.pet.types.ShulkerDefault)6 IOException (java.io.IOException)2 ISpawner (simplepets.brainsynder.utils.ISpawner)2 Statement (java.sql.Statement)1 World (net.minecraft.server.v1_11_R1.World)1 World (net.minecraft.server.v1_12_R1.World)1 World (net.minecraft.server.v1_13_R1.World)1 World (net.minecraft.server.v1_13_R2.World)1 World (net.minecraft.server.v1_14_R1.World)1 World (net.minecraft.server.v1_15_R1.World)1 CraftWorld (org.bukkit.craftbukkit.v1_11_R1.CraftWorld)1 CraftWorld (org.bukkit.craftbukkit.v1_12_R1.CraftWorld)1 CraftEntity (org.bukkit.craftbukkit.v1_12_R1.entity.CraftEntity)1