forked from External/mage
Restructured Mage module
This commit is contained in:
parent
727d62babb
commit
46eb6c0525
1502 changed files with 11 additions and 9 deletions
19
Mage/src/main/java/mage/abilities/MageSingleton.java
Normal file
19
Mage/src/main/java/mage/abilities/MageSingleton.java
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package mage.abilities;
|
||||
|
||||
/**
|
||||
* Marker class for singleton abilities and effects.
|
||||
* Prevents effects and abilities to get new Id across the games on the server.
|
||||
* Can be used only for stateless effects and abilities. (e.g. no Duration)
|
||||
*
|
||||
* Intended to be used to avoid bugs and for performance reasons.
|
||||
*
|
||||
* "Must" be used for abilities that use getId() as compare parameter like:
|
||||
* FlyingAbility.getInstance().getId()
|
||||
* in
|
||||
* permanent.getAbilities().containsKey(FlyingAbility.getInstance().getId())
|
||||
*
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public interface MageSingleton {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue