Migsect / Inscription

Minecraft Bukkit Plugin to add Glyphs RPG mechanic to the Game
0 stars 1 forks source link

Add a better means of getting standard information during AttributeType construction #55

Closed Migsect closed 4 years ago

Migsect commented 4 years ago

The issue is that we have the variables:

type
name
description
model(Increment)

That have repeated code for ConfigurationSection accessing which can instead be covered by a single piece of code. This could probably be a nested class on the abstract class AttributeTypeConstructor and then normal constructors can take in this object, probably even the parent class can handle this setting.

Better yet, most AttributeTypes' constructors should be able to take in a configuration section and handle it themselves. However this would require a flag to be set during construction or to allow post constructor initialization.

Migsect commented 4 years ago

Provided in https://github.com/Migsect/Inscription/commit/fec8cae32a2429b889e6541f79a970ee9803dbd0