001package net.tnemc.item.attribute;
002/*
003 * The New Item Library Minecraft Server Plugin
004 *
005 * Copyright (C) 2022 - 2025 Daniel "creatorfromhell" Vidmar
006 *
007 * This program is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 3 of the License, or (at your option) any later version.
011 *
012 * This program is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015 * Lesser General Public License for more details.
016 *
017 * You should have received a copy of the GNU Lesser General Public License
018 * along with this program; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
020 */
021
022import net.tnemc.item.component.helper.EquipSlot;
023
024import java.util.UUID;
025
026public class SerialAttribute {
027
028  private UUID identifier;
029  private String name;
030  private double amount;
031  private EquipSlot slot = null;
032  private SerialAttributeOperation operation;
033
034  public SerialAttribute(final String name, final double amount, final SerialAttributeOperation operation) {
035
036    this(UUID.randomUUID(), name, amount, operation);
037  }
038
039  public SerialAttribute(final UUID identifier, final String name, final double amount, final SerialAttributeOperation operation) {
040
041    this(identifier, name, amount, operation, null);
042  }
043
044  public SerialAttribute(final UUID identifier, final String name, final double amount, final SerialAttributeOperation operation, final EquipSlot slot) {
045
046    this.identifier = identifier;
047    this.name = name;
048    this.amount = amount;
049    this.operation = operation;
050    if(slot != null) {
051      this.slot = slot;
052    }
053  }
054
055  public UUID getIdentifier() {
056
057    return identifier;
058  }
059
060  public void setIdentifier(final UUID identifier) {
061
062    this.identifier = identifier;
063  }
064
065  public String getName() {
066
067    return name;
068  }
069
070  public void setName(final String name) {
071
072    this.name = name;
073  }
074
075  public double getAmount() {
076
077    return amount;
078  }
079
080  public void setAmount(final double amount) {
081
082    this.amount = amount;
083  }
084
085  public EquipSlot getSlot() {
086
087    return slot;
088  }
089
090  public void setSlot(final EquipSlot slot) {
091
092    this.slot = slot;
093  }
094
095  public SerialAttributeOperation getOperation() {
096
097    return operation;
098  }
099
100  public void setOperation(final SerialAttributeOperation operation) {
101
102    this.operation = operation;
103  }
104}